Skip to content

Commit c64ee3f

Browse files
committed
Refactor header mixin to use inverse-text
Technically the colour had changed because the header used `link-style-inverse`. However, the intent was to set the text colour of the header to white, so it follows that we use `link-style-text` to pick up on that and reduce the risks of de-synchronising.
1 parent 5a88d18 commit c64ee3f

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

  • packages/govuk-frontend/src/govuk/components/generic-header

packages/govuk-frontend/src/govuk/components/generic-header/_mixin.scss

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,15 @@ $header-forced-colour-border-width: 1px;
2020

2121
// Add a transparent bottom border for forced-colour modes
2222
border-bottom: $header-forced-colour-border-width solid transparent;
23-
color: base.govuk-colour("white");
23+
24+
--govuk-text-colour: #{base.govuk-functional-colour(inverse-text)};
25+
color: base.govuk-functional-colour(text);
2426
background: $background;
2527

2628
@media print {
2729
border-bottom-width: 0;
28-
color: base.govuk-functional-colour(text);
30+
31+
--govuk-text-colour: inherit;
2932
background: transparent;
3033
}
3134
}
@@ -73,7 +76,7 @@ $header-forced-colour-border-width: 1px;
7376
font-size: 30px; // We don't have a mixin that produces 30px font size
7477
text-decoration: none;
7578

76-
@include base.govuk-link-style-inverse;
79+
@include base.govuk-link-style-text;
7780

7881
&:link,
7982
&:visited {

0 commit comments

Comments
 (0)