Skip to content
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

Calculate font-sizes in rem #858

Merged
merged 6 commits into from
Jul 10, 2018
Merged

Calculate font-sizes in rem #858

merged 6 commits into from
Jul 10, 2018

Commits on Jul 10, 2018

  1. Calculate font-sizes in rem

    Automatically calculate font-sizes in rem by adding a new setting $govuk-root-font-size, which should match the font-size on the html (root) element.
    36degrees committed Jul 10, 2018
    Configuration menu
    Copy the full SHA
    99be9f4 View commit details
    Browse the repository at this point in the history
  2. Disable rem by default

    Enabling rem for everyone would make this a breaking change for anyone who is using alphagov/govuk_template or otherwise setting the font-size on their HTML element to anything other than 16px - without them setting `$govuk-root-font-size` this would make their typography the wrong size.
    
    We can introduce it as a feature now and enable it by default in the next major release, whilst at the same time changing how the ‘compatibility’ flags work and updating the $govuk-root-font-size setting to set sensible defaults in both cases.
    36degrees committed Jul 10, 2018
    Configuration menu
    Copy the full SHA
    720b159 View commit details
    Browse the repository at this point in the history
  3. Do not set font-size on the html element

    Doing this makes it breaks users font-size preferences in some browsers (such as Chrome) – see twbs/bootstrap#19460 for more details. We should instead _assume_ the root font-size is 16px - the point being that if it’s not then the text should adjust accordingly.
    36degrees committed Jul 10, 2018
    Configuration menu
    Copy the full SHA
    50a9159 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0706d62 View commit details
    Browse the repository at this point in the history
  5. Document in CHANGELOG

    36degrees committed Jul 10, 2018
    Configuration menu
    Copy the full SHA
    7e8ebbb View commit details
    Browse the repository at this point in the history
  6. Doc tweaks

    36degrees committed Jul 10, 2018
    Configuration menu
    Copy the full SHA
    e6c470a View commit details
    Browse the repository at this point in the history