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
@only directive #1187
Comments
Why aren't you using |
Probably because he doesn't want to have to write an else. body {
@if $forIE8 {
background: #FFF;
} @else if $forIE9 {
background: #CCC;
} @else {
background: #000;
}
} It is worth noting that Sass doesn't eliminate duplicate property declarations. If it did, we would have problems creating simple fallbacks like this: .foo {
background: blue;
background: rgba(blue, .5);
} |
This is different :)
This should be a part of all.css and should't be in ie.css So with @only you could avoid this necessary @if in each selectors when you don't have IE fixes.
Main point is to have something which will give possibility to split one selector between files. |
Also this: #116 (comment) |
|
FWIW, I thought this directive would be helpful as well. I've written a |
Idea is to define a block which will be used in particular selector if rule is true.
And all other properties in whole selector should be skipped.
As a simple example:
main.scss
ie8.scss
ie9.scss
all.scss
Output:
ie8.css
ie9.css
all.css
The text was updated successfully, but these errors were encountered: