-
Notifications
You must be signed in to change notification settings - Fork 333
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
Simplify font family settings #3949
Conversation
638a7b1
to
6b59673
Compare
6b59673
to
e110288
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.
Happy to approve
Should we have deprecated the class first?
Probably want to add a CHANGELOG entry to add:
- Removed public variable
$govuk-font-family-gds-transport
- Action to use variable
$govuk-font-family
instead
Hmm, yeah, I think ideally we would have – it looks like the other font family 'settings' were deprecated at the point the new font was introduced back in 2019! Not sure it's worth doing an extra 4.x release just for this, but if we do another before v5 maybe we should include this deprecation then? Alternatively we hold off on this change until v6?
Yep, we also haven't mentioned the removal of the settings for the old version of the font which have already been removed. A quick search of Google suggests that people are most often using |
Thanks @36degrees I keep forgetting about GitHub code search too: Perhaps see if issues like #3918 will become another v4 release? Good to deprecate it before v5 |
Before we removed compatibility mode, the font-families file included multiple ‘settings’ (realistically, more like constants) that defined the font to be used depending on whether compatibility mode was enabled or not. Now that we only have one possible default font stack, we can remove the unnecessary abstraction. We also need to update the default value for the `$govuk-include-default-font-face` setting. Previously it checked whether the chosen font family was the default stack based on GDS Transport, but we can instead just check whether “GDS Transport” is in the font list. This also makes it more robust if somebody for example wants to update the setting to change the fallback fonts.
e110288
to
de9bd97
Compare
Rebased and added a changelog entry |
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.
🎉
If there is another 4.x release to deprecate things, please don’t forget #3877 |
Before we removed compatibility mode, the font-families file included multiple ‘settings’ (realistically, more like constants) that defined the font to be used depending on whether compatibility mode was enabled or not.
Now that we only have one possible default font stack, we can remove the unnecessary abstraction.
We also need to update the default value for the
$govuk-include-default-font-face
setting. Previously it checked whether the chosen font family was the default stack based on GDS Transport, but we can instead just check whether “GDS Transport” is in the font list. This also makes it more robust if somebody for example wants to update the setting to change the fallback fonts.