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

Move measurement into static from toolkit #2023

Merged
merged 3 commits into from
Feb 4, 2020
Merged

Conversation

injms
Copy link
Contributor

@injms injms commented Feb 3, 2020

What

Moved the spacing function (govuk-spacing(𝖷)) into static so it can be used without importing all of the publishing components gem.

Replaced the all of the $gutter variables and hardcoded variables that could be directly replaced with a spacing function without impacting the layout. So 30px and $gutter were replaced with govuk-spacing(6), but any magic numbers like48px were left alone.

Why

The Sass functions and variables are useful. But if we import publishing components we'll inflate the amount of CSS in static dramatically - so we need to add just the functions and variables on their own. This is a quick way of doing it until the publishing components gem allows only importing specific parts on their own.

Visual changes

None

 - Copied the spacing function from GOV.UK Frontend over into it's own
   stylesheet - this should be removed when possible to avoid stagnation.
 - Removed the `govuk_toolkit` measurements partial from the header-footer
   stylesheet
 - The `$gutter` variables have been replaced with `govuk-spacing(x)` with
   drastic no change.
 - All spacings set in pixels that can be replaced witha `govuk-spacing(x)`
   function have been replaced.
 - There are a fair few magic numbers dotted around the place, which can be
   looked at when the updated version of the Transport font is being used.
   These are outside the scope of this task at the moment.
@injms injms changed the title 🚧 Move measurement into static from toolkit Move measurement into static from toolkit Feb 4, 2020
@injms injms marked this pull request as ready for review February 4, 2020 09:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants