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

Remove !important from property value, possible? #2574

Closed
naumanjkhan opened this issue Oct 11, 2018 · 1 comment
Closed

Remove !important from property value, possible? #2574

naumanjkhan opened this issue Oct 11, 2018 · 1 comment

Comments

@naumanjkhan
Copy link

naumanjkhan commented Oct 11, 2018

Consider following two classes

.foo {
  color: red !important;
}
.bar {
  color: blue !important;
}
.biz {
  @extend .foo;
}

it will output something like this

.foo, .biz {
  color: red !important;
}
.bar {
  color: blue !important;
}

i want some mechanism to remove !important from the extending class

.foo {
  color: red !important;
}
.bar {
  color: blue !important;
}
.biz {
  color: red;
}
@nex3
Copy link
Contributor

nex3 commented Oct 11, 2018

No, there is no way to do this. @extend always re-uses the same CSS as the original selector, by design. The goal is to style your HTML the same way it would be styled if you manually wrote class="biz foo" instead of class="biz".

@nex3 nex3 closed this as completed Oct 11, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants