nhsuk-frontend
nhsuk-frontend copied to clipboard
Use fallback font if not including NHS font face
Description
There is a configuration option $nhsuk-include-font-face
which controls if the NHS corporate font is included in the compiled CSS. In the current implementation, if this option is false then font-face
is not set at all, which leads to unstyled text.
This change makes it so that if the fonts are not included, a font-face
declaration is still made using only the fallback fonts (as set in $nhsuk-font-fallback
).
Checklist
- [x] Tested against our testing policy (Resolution, Browser & Accessibility)
- [x] Follows our coding standards and style guide
- [x] CHANGELOG entry
Not passing judgement on this either negatively or positively, but just wanted to link to this pull request which has some background to why it is like it is right now, i.e. mimicing the way it works in govuk-frontend. And to note that whatever path is taken here needs to be compatible with the needs from this thread - where someone is self hosting the nhs fonts.
https://github.com/nhsuk/nhsuk-frontend/pull/732