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

Make !important configurable. #78

Closed
adamjohnson opened this issue May 20, 2019 · 0 comments
Closed

Make !important configurable. #78

adamjohnson opened this issue May 20, 2019 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@adamjohnson
Copy link
Contributor

Right now, !important is applied to a lot of rules--likely intentionally.

Sometimes, users might not want to add !important to rules in their project. It'd be nice to be able to turn this on/of globally, or on a per mixin basis.

Code example:

$global-important: !important !default;
@mixin myMixin($is-important: $global-important) {
  color: red $is-important;
}

.example {
  @include myMixin();
  font-size: 16px $global-important;
}

Outputs:

.example {
  color: red !important;
  font-size: 16px !important;
}

Users will be able to explicitly override !important on a per mixin basis by doing:

.example-2 {
  @include myMixin($is-important: null); // `null` is used to omit `!important`
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant