-
Notifications
You must be signed in to change notification settings - Fork 332
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
Turn off compatibility mode by default and turn on relative typography (rem) by default #981
Conversation
This feature will need to be enabled by users.
e4359d0
to
a1970bb
Compare
a1970bb
to
cb477b4
Compare
src/all.test.js
Outdated
@@ -149,4 +149,21 @@ describe('GOV.UK Frontend', () => { | |||
|
|||
expect(functionCalls).toBeNull() | |||
}) | |||
describe('responsive typography', async () => { | |||
it('is enabled by default', async () => { |
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.
Rather than adding these, can we update the tests in src/helpers/typography.test.js
? (We currently explicitly disable responsive mode, and then have a test for when it's enabled, but we should probably flip that logic?)
Ensures that new projects are using rem units for font sizes, which allows end-users to adjust their font-size. This is only enabled by default if the user is not using the compatibility mode variables.
Since it is now turned off by default, it needs documenting to explain how to turn it on.
a64e054
to
ec1377f
Compare
src/helpers/typography.test.js
Outdated
$govuk-typography-use-rem: false; | ||
${sassBootstrap} |
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.
I have moved these around to better demonstrate how our users would write their SCSS
@36degrees updated the tests with your feedback |
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.
Top stuff 👍
Closes #868
This pull request turns on relative typography by default unless the user has compatibility mode turned on.
It also turns off compatibility mode by default.
If a user wants to try relative typography in their application they can still do so.
We have just determined that we do not want to risk this by default since we can't be sure how the interface will behave with some elements resizing based on font size and some not.
I have tested this by confirming:
https://trello.com/c/8iqDncHe/1389-2-enable-rem-based-typography-by-default