-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove default font styles from cookie banner Sass #2432
Merged
vanitabarrett
merged 2 commits into
main
from
make-missing-cookie-banner-classes-clearer
Nov 24, 2021
Merged
Remove default font styles from cookie banner Sass #2432
vanitabarrett
merged 2 commits into
main
from
make-missing-cookie-banner-classes-clearer
Nov 24, 2021
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
hannalaakso
approved these changes
Nov 23, 2021
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Makes sense, thanks @vanitabarrett 👍
b684dbe
to
cba080d
Compare
cba080d
to
15a3812
Compare
Removes the default font styles (setting the font and font-size) from the cookie banner Sass. This work was prompted by alphagov/govuk-design-system#1886 With the default font styles present, it's very difficult to spot if you forget to add the relevant `govuk-body` styles to any `html` you pass into the component. We had missed this ourselves when we added the cookie banner to the design system. This change should only affect users who are passing `html` to the cookie banner.
15a3812
to
b0fb211
Compare
b0fb211
to
973b462
Compare
973b462
to
2d24d6b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just suggesting a last tiny change, otherwise content is golden. :)
2d24d6b
to
66ea6e3
Compare
Merged
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #2358
What
Remove the default font styles (setting the font and font-size) from the cookie banner Sass.
Why
With the default font styles present, it's very difficult to spot if you forget to add the relevant
govuk-body
styles to anyhtml
you pass into the component. We had missed this ourselves when we added the cookie banner to the design system.Screenshots
Before change - cookie banner with
html
, withoutgovuk-body
classesAfter change - cookie banner with
html
, withoutgovuk-body
classesAfter change - cookie banner with
html
, with the correctgovuk-body
classesAfter change - in the Design System
This work was prompted by when we forgot to add our own styling classes to the cookie banner on the design system site, which resulted in slightly incorrect text spacing. This is what the design system cookie banner would now look like if we forgot to add the relevant classes:
Details of breaking change
This is a breaking change because any users who are relying on the default styles will see unstyled text in their cookie banner when they update. Users will need to add the correct classes to style the text - this will probably involve adding the govuk-body class to any HTML paragraph tags they're passing through to the component.
html
into the cookie banner componentgovuk-body
)