-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
Problem with repeated selectors in output. #1038
Comments
That's how extends work in Sass. See http://blackfalcon.roughdraft.io/4693231 for explanations. My rule of thumb: never extend real selectors, only extend silent selectors. |
Ok thx, but why something like this happens when I do only this ?: article > header + .element2,
article > header + .element2 + .element2 {
margin-top: 10px;
} CSS: article > header + .element2,
article > header + .element,
article > header + .element2 + .element2,
article > header + .element + .element2,
article > header + .element2 + .element,
article > header + .element + .element {
margin-top: 10px;
} |
It does not. |
I mean, that when I extend .element2 class by .element class and write this selector it still create additional variations. |
I gave you a link to an article that explains why it works this way. |
Ok so this isn't an error and I am only stupid :) |
Hi
Few days ago I found this interesting issue in sass - pre, and in stable version.
When I tried to change margin on few elements already styled I found that Sass compiles this rule:
to this:
As you see, some selectors are repeated and some shouldn't even be created. Tried and repeated this thing on codepen.io also:
http://codepen.io/anon/pen/LFHcI
The text was updated successfully, but these errors were encountered: