mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
b3768a1145
- Ensure help blocks show more appropriately in Windows High Contrast Mode with less reliance on communication via colour alone - fixes #8817 - added dashed-dotted borders styles and removed forced-colors-adjust:none properties to/from help boxes
76 lines
1.2 KiB
SCSS
76 lines
1.2 KiB
SCSS
@use 'sass:color';
|
|
@use 'sass:map';
|
|
// Help text formatters
|
|
.help-block {
|
|
padding: 1em;
|
|
margin: 1em 0;
|
|
clear: both;
|
|
color: $color-text-base;
|
|
|
|
p {
|
|
margin-top: 0;
|
|
|
|
&:last-child {
|
|
margin-bottom: 0;
|
|
}
|
|
}
|
|
|
|
a {
|
|
color: $color-link;
|
|
}
|
|
}
|
|
|
|
.help-info,
|
|
.help-warning,
|
|
.help-critical {
|
|
border-radius: 3px;
|
|
padding-inline-start: 3.5em;
|
|
position: relative;
|
|
|
|
.icon {
|
|
@include svg-icon(1.25rem);
|
|
position: absolute;
|
|
inset-inline-start: 1.125rem;
|
|
top: 0.8125rem;
|
|
}
|
|
}
|
|
|
|
.help-info {
|
|
background-color: color.adjust($color-blue, $lightness: 30%);
|
|
|
|
.icon-help {
|
|
color: $color-blue;
|
|
}
|
|
}
|
|
|
|
.help-warning {
|
|
background-color: color.adjust($color-orange, $lightness: 30%);
|
|
|
|
.icon-warning {
|
|
color: $color-orange;
|
|
}
|
|
}
|
|
|
|
.help-critical {
|
|
background-color: color.adjust($color-red, $lightness: 40%);
|
|
|
|
.icon-warning {
|
|
color: $color-red;
|
|
}
|
|
}
|
|
|
|
// Media for Windows High Contrast
|
|
@media (forced-colors: active) {
|
|
.help-block {
|
|
border: 3px solid currentColor; // ensure visible separation in Windows High Contrast mode
|
|
}
|
|
|
|
.help-warning {
|
|
border-style: dotted;
|
|
}
|
|
|
|
.help-critical {
|
|
border-style: dashed;
|
|
}
|
|
}
|