-
Notifications
You must be signed in to change notification settings - Fork 109
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
REQ: Utility classes scoped to breakpoints #1153
Comments
As they'd generate a bunch of css perhaps they could be optionally configured in settings? So they are only outputted to css when needed. |
I've certainly come across this need before - though have typically made a custom class then and used the media query mixins to do what I needed. A risk with these might be that they don't get used? |
Yeh, I thought about that. Maybe a Sass setting variable |
GOV.UK Frontend includes I could update our grid styles to pick them up as a freebie? They've deprecated https://github.com/search?q=org%3Anhsuk+govuk-grid-row%28&type=code Not necessarily a problem |
Ahh so the NHS grid layout uses So from mobile and up, the class But I've given it a go in #1154 and it's all working 🙌 .nhsuk-grid-column-one-quarter-from-tablet
.nhsuk-grid-column-one-third-from-tablet
.nhsuk-grid-column-one-half-from-tablet
.nhsuk-grid-column-two-thirds-from-tablet
.nhsuk-grid-column-three-quarters-from-tablet
.nhsuk-grid-column-full-from-tablet |
Utility classes are very useful, they save us needing to write new scss/css selectors to tweak spacing but by default they apply across all 'breakpoints'.
Often as components go from being stacked on small viewports to being laid out in columns for larger viewports, it would be helpful to be able to declaratively adjust that spacing.
For example:
.nhsuk-u-margin-bottom-0--from-desktop
or.nhsuk-u-margin-bottom-0--until-desktop
The text was updated successfully, but these errors were encountered: