Skip to content

Commit

Permalink
Add IE11 support forced color mode tweaks
Browse files Browse the repository at this point in the history
Adds IE11 supportto the previous Windows High Contrast Mode fixes in PR
#2264.

Internet Explorer 11 doesn't support the `forced-colors` media feature
or the `forced-color-adjust` property, but it has equivalents in
`-ms-high-contrast` and `-ms-high-contrast-adjust`.
We can use those CSS features to extend fixes to high contrast mode that
previously only worked on more modern browsers.

Adds a tweak to changes in commit 7dcba7d, so that the highlight works
in Internet Explorer 11 as well.
  • Loading branch information
lfdebrux committed Aug 19, 2021
1 parent 2b41586 commit 7f78f81
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/govuk/components/checkboxes/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@

// When in an explicit forced-color mode, we can use the Highlight system
// color for the outline to better match focus states of native controls
@media screen and (forced-colors: active) {
@media screen and (forced-colors: active), (-ms-high-contrast: active) {
outline-color: Highlight;
}

Expand Down
2 changes: 1 addition & 1 deletion src/govuk/components/radios/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@

// When in an explicit forced-color mode, we can use the Highlight system
// color for the outline to better match focus states of native controls
@media screen and (forced-colors: active) {
@media screen and (forced-colors: active), (-ms-high-contrast: active) {
outline-color: Highlight;
}

Expand Down

0 comments on commit 7f78f81

Please sign in to comment.