From 4b4882af6a942d2bea9cf6083f772adc672a6233 Mon Sep 17 00:00:00 2001 From: Laurence de Bruxelles Date: Fri, 30 Jul 2021 09:23:18 +0100 Subject: [PATCH] Add IE11 support forced color mode tweaks 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. --- src/govuk/components/checkboxes/_index.scss | 2 +- src/govuk/components/radios/_index.scss | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/govuk/components/checkboxes/_index.scss b/src/govuk/components/checkboxes/_index.scss index 204ff14a6d..cc103b6151 100644 --- a/src/govuk/components/checkboxes/_index.scss +++ b/src/govuk/components/checkboxes/_index.scss @@ -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; } diff --git a/src/govuk/components/radios/_index.scss b/src/govuk/components/radios/_index.scss index 1b3801ea67..5078c9a059 100644 --- a/src/govuk/components/radios/_index.scss +++ b/src/govuk/components/radios/_index.scss @@ -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; }