Skip to content

Commit

Permalink
fix(interruption card): fix body text color when govuk-global-styles …
Browse files Browse the repository at this point in the history
…is true (#1059)

If the component is used when govuk global styles is set to true, the i
specificity isn't high enough to override the text color to white.
This commit adds extra css to ensure elements within the interruption
card body are given the correct text size and color.
  • Loading branch information
chrispymm authored Jan 9, 2025
1 parent 2ab2996 commit a25af13
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/moj/components/interruption-card/_interruption-card.scss
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,13 @@
color: govuk-colour("white");
}

// If $govuk-global-styles is true, we need to override the color and size on elements
// within the body class directly
.moj-interruption-card__body > * {
@include govuk-font-size($size: 24);
color: govuk-colour("white");
}

.moj-interruption-card__body:last-child {
margin-bottom: 0;
}
Expand Down

0 comments on commit a25af13

Please sign in to comment.