Designate a mixin as !important
See original GitHub issueWhen calling a mixin (parametric or otherwise), if the call ends in !important
, it would be splendid if this !important
flowed down to all the mixin declarations.
So:
.bordered {
border-top: dotted 1px black;
border-bottom: solid 2px black;
}
#menu a {
color: #111;
.bordered !important;
}
Would generate:
#menu a {
color: #111;
border-top: dotted 1px black !important;
border-bottom: solid 2px black !important;
}
Issue Analytics
- State:
- Created 12 years ago
- Comments:12 (6 by maintainers)
Top Results From Across the Web
Adding `!important` to a mixin - css - Stack Overflow
important to a mixin. I tried both the following ways, and they return an error: @include linear-gradient(hsl(68%, 94%, 90%), hsl(68%, 90%, 80% ...
Read more >mixin and @include - Sass
If a mixin passes arguments to its content block, that content block must declare that it accepts those arguments. This means that it's...
Read more >Sass @mixin and @include - W3Schools
The @include directive is used to include a mixin. Sass @include mixin Syntax: selector { @include mixin-name; }. So, to include the important- ......
Read more >How to Use Mixins in Sass and Pass Arguments – With Code ...
First we define a mixin using the @mixin at-rule. Then we give it a name – choose whatever you think will fit what...
Read more >Sass Mixins: Keep Your Stylesheets DRY - Toptal
@mixin theme($name, $color) { // Define colors in your theme $primary: $color; ... The main reason I use this is because I will...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
ok, it’s in! https://github.com/cloudhead/less.js/commit/aab66a4d10e38a4d92c003ecb5ef03b9ff3067cc
Just to continue the conversation from Issue #100, I would say that specially designating a keyword as having a different mixin behavior is arbitrary and probably not ideal. With using variables, you can append any keyword value as you like into your mixin.