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

Added !default to the settings in _variables.scss #62

Closed

Conversation

martin-hofer
Copy link
Contributor

I propose that the settings in _variables.scss should have the !default flag set.

With this flag, it becomes so much easier to derive child templates while using Wave's original files. Creating a red theme is then as easy as this:

$brand-primary: #c00; @import '../../../wave/build/scss/variables'; ...

Without the default flag, this doesn't work, because Wave's _variables.scss overwrites these previously set variables again. Simply redefining $brand-primary after the import of _variables.scss doesn't help either, because other variables inside _variables.scss will by then already have inherited these values (e.g. $link-hover-color: $brand-primary;).

This is probably the reason why bootstrap itself is doing it this way, too:
https://github.com/twbs/bootstrap/blob/master/scss/_variables.scss

Sieg pushed a commit that referenced this pull request Aug 1, 2019
Sieg added a commit that referenced this pull request Aug 1, 2019
@Sieg
Copy link
Member

Sieg commented Aug 1, 2019

Hello @martin-hofer! Thanks for the improvement! Looks great, have just merged it.

@Sieg Sieg closed this Aug 1, 2019
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