-
Notifications
You must be signed in to change notification settings - Fork 25
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
Add guidance for using heading classes and update examples #1974
Conversation
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.
Hope I've done this correctly. Have suggested changes.
Co-authored-by: Sara Wilcox <[email protected]>
Co-authored-by: Sara Wilcox <[email protected]>
Co-authored-by: Sara Wilcox <[email protected]>
Co-authored-by: Sara Wilcox <[email protected]>
I think the above looks fine. I am looking at adding some guidance around not going down to a heading level 5 in terms of content structure. (That suggests that content is too complex.) |
Co-authored-by: Frankie Roberto <[email protected]>
In branch https://github.com/nhsuk/nhsuk-service-manual/tree/review/1-release-7-0-0 awaiting final sign offs and release. |
Released as part of v7.0.0: #2040 |
Description
Per discussions on Slack, this adds guidance for which heading classes to use. I started with the guidance from GOV.UK, and have then modified after several rounds of discussions.
Why do this?
NHSUK-Frontend currently styles headings by default -
nhsuk-heading-xl
forh1s
, andnhsuk-heading-l
forh2s
. This results in very large headings which may not be suitable on transactional / shorter pages.Service teams should choose appropriate heading sizes to visually balance on the page, but this
nhsuk-frontend
default likely means that many are using larger headings than they might choose otherwise, thinking it is recommended. GOV.UK faced a similar issue some years ago (not defaulted in code, but all examples usedgovuk-heading-xl
), and added explicit guidance for headings and which is most appropriate.Updating
nhsuk-frontend
to not default sizes or to change the default may be something to investigate in the future. In the short term we can add guidance for teams to suggest what sizes are appropriate.Screenshot:
Checklist
package.json
(using SEMVER)