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 support to the previous Windows High Contrast Mode fixes in PR

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 20, 2021
1 parent 2b41586 commit 53ca3eb
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ We’ve made fixes to GOV.UK Frontend in the following pull requests:
- [#2265: Don’t remove focus outline from disabled link buttons in forced color mode](https://github.com/alphagov/govuk-frontend/pull/2265)
- [#2273: Fix invisible footer OGL logo in forced color mode](https://github.com/alphagov/govuk-frontend/pull/2273) – thanks to [@oscarduignan](https://github.com/oscarduignan) for reporting this issue.
- [#2277: Fix invisible start button chevron in forced color mode](https://github.com/alphagov/govuk-frontend/pull/2277)
- [#2290: Improve support for IE11 with Windows High Contrast Mode](https://github.com/alphagov/govuk-frontend/pull/2290)

## 3.13.0 (Feature release)

Expand Down
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 53ca3eb

Please sign in to comment.