alphagov / govuk-design-system

One place for service teams to find styles, components and patterns for designing government services.
https://www.gov.uk/design-system
MIT License
511 stars 232 forks source link

Is there anything useful we can add to Updating your code page for $gutter? #431

Closed joelanman closed 6 years ago

joelanman commented 6 years ago

$gutter is a variable in Frontend Toolkit. If users are moving from that to Frontend, is there a useful section of the design system we can point them at to replace $gutter in their code?

kr8n3r commented 6 years ago

i guess that $gutter is now $govuk-gutter

https://github.com/alphagov/govuk-frontend/blob/master/src/settings/_measurements.scss

kr8n3r commented 6 years ago

having thought about it, i don't think gutter would have been customised and used across pages, like say for example class names.

dashouse commented 6 years ago

It's a good point, we really only use $govuk-gutter as a variable for the actual grid now, where as it was often used as a variable within other components to hang off the grid spacing as a unit.

I don't think any of the components use $govuk-gutter in this way, if they do they should probably be updated to use the spacing scale.

joelanman commented 6 years ago

So what should we say to users who were using $gutter in their own code, in the old world?

dashouse commented 6 years ago

They can use $govuk-gutter and $govuk-gutter-half if they just want to swap like for like...but I'd suggest they switch to to use the spacing scale...

If they want static 30px spacing margin-bottom: govuk-spacing(6) If they want responsive 30px / 20px spacing @include govuk-responsive-margin(6, "bottom");