Skip to content

Commit

Permalink
Merge pull request #2237 from alphagov/govuk-logo-high-contrast
Browse files Browse the repository at this point in the history
Fix GOV.UK logo disappearing on light background in Windows High Contrast Mode
  • Loading branch information
36degrees authored Jun 2, 2021
2 parents 4f71da6 + cf53b67 commit b65af00
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 6 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@
- [#2228: Fix display of checkboxes in Internet Explorer 8](https://github.com/alphagov/govuk-frontend/pull/2228)
- [#2229: Change approach to fallback PNG in the header to fix blank data URI from triggering Content Security Policy errors](https://github.com/alphagov/govuk-frontend/pull/2229)
- [#2229: Fix alignment of fallback PNG in the header](https://github.com/alphagov/govuk-frontend/pull/2229)
- [#2237: Fix GOV.UK logo disappearing on light background in Windows High Contrast Mode](https://github.com/alphagov/govuk-frontend/pull/2237)

## 3.12.0 (Feature release)

Expand Down
16 changes: 10 additions & 6 deletions src/govuk/components/header/_index.scss
Original file line number Diff line number Diff line change
Expand Up @@ -36,15 +36,19 @@
.govuk-header__logotype {
display: inline-block;

// Add a gap between logo and any product name
// Add a gap after the logo in case it's followed by a product name. This
// gets removed later if the logotype is a :last-child.
margin-right: govuk-spacing(1);

// Prevent readability backplate from obscuring underline in Windows
// High Contrast Mode
forced-color-adjust: none;
// Prevent readability backplate from obscuring underline in Windows High
// Contrast Mode
@media (forced-colors: active) {
forced-color-adjust: none;
color: linktext;
}

// But remove it if there's nothing after the logo to keep hover and focus
// states neat
// Remove the gap after the logo if there's no product name to keep hover
// and focus states neat
&:last-child {
margin-right: 0;
}
Expand Down

0 comments on commit b65af00

Please sign in to comment.