-
Notifications
You must be signed in to change notification settings - Fork 331
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
Warning text does not explicitly set font-weight #5279
Labels
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
small story
warning text
Comments
matteason
added
awaiting triage
Needs triaging by team
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
labels
Sep 1, 2024
romaricpascal
added
warning text
small story
and removed
awaiting triage
Needs triaging by team
labels
Sep 10, 2024
romaricpascal
added a commit
that referenced
this issue
Sep 17, 2024
There's no guarantee browser defaults of `bold` or `bolder` have not been overriden so we need to set the font-weight explicitely. Closes #5279
romaricpascal
added a commit
that referenced
this issue
Sep 17, 2024
There's no guarantee browser defaults of `bold` or `bolder` have not been overriden so we need to set the font-weight explicitely. Closes #5279
Hi @matteason, that's a good spot, we missed that subtlety at the time! I've opened a PR with a fix which hopefully will be able to ship with our next release. |
patrickpatrickpatrick
pushed a commit
that referenced
this issue
Oct 7, 2024
There's no guarantee browser defaults of `bold` or `bolder` have not been overriden so we need to set the font-weight explicitely. Closes #5279
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
🐛 bug
Something isn't working the way it should (including incorrect wording in documentation)
small story
warning text
The warning text component doesn't explicitly set a font weight, instead assuming that
<strong>
will always be bold because of browser default styles:govuk-frontend/packages/govuk-frontend/src/govuk/components/warning-text/_index.scss
Lines 9 to 12 in a5a50ea
I think this was introduced in GOV.UK Frontend 5.0.0: 18caff5#diff-245553285fc1127f05c68705df40d7fdf95abebef3173eab71ea6b4d8bf89546
I think in almost all other places, Frontend is very careful to avoid relying on default styles.
<strong>
is a semantic element and the spec doesn't specify that user agents should render <strong> as bold, though it's a common convention.I happened to run into this on a project using the Meyer reset, where the warning text was rendering as
normal
weight, but it may also affect similar reset/normalise stylesheets.The text was updated successfully, but these errors were encountered: