-
Notifications
You must be signed in to change notification settings - Fork 334
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
Use !default
variables in components to allow easier overrides
#1159
Comments
Hey Ross, We're thinking about enabling theming (or white-labelling) in the future but one of the blockers to this right now is not just adding Variables without If we were to add This is not the best idea right now since they're all very inconsistent, which means we'll need to change them again with a breaking change forcing projects to change their code. We do want to make sure we expose overridable variables in a consistent way across the framework in the future... But this would require thinking about these default variables system-wide on how theming is done which may not be possible just by adding You can follow our roadmap for that work by subscribing to this issue: alphagov/govuk-design-system#777 Which is part of our roadmap for the GOV.UK Design System: https://github.com/orgs/alphagov/projects/5?fullscreen=true |
Thanks for the explanation Nick, that seems reasonable. We'll continue manually overriding for now. Cheers |
I got a little bit stuck while trying to re-use variables from a
I didn’t initially understand what the I think it would be useful for some or all of the variables a component creates to be available to developers writing their own SASS, if only for consistency? |
Hey,
I'm working on a project where we need to override some colours in the govuk components.
Button for example: https://github.com/alphagov/govuk-frontend/blob/master/src/components/button/_button.scss
Since these variables don't have the default flag, to override the button colours we need to do:
This is prone to human-error as we need to copy all class names and specific rules. Ideally, with default flags, we'd be able to do the following which is much safer:
I see default flags are set up for the global variables under
/settings
, but is there a reason they're not set up for component variables? If not, I'd be more than happy to submit a PR to change this.Thanks!
The text was updated successfully, but these errors were encountered: