-
Notifications
You must be signed in to change notification settings - Fork 464
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
@extend loops output selectors in the wrong order #1392
Comments
Have seen this one already, IMO it only happens with circular extends ... |
As pointed out by @andybenedict in #1539 this can actually cause broken code when attribute selectors are involved. .foo{
&[disabled]{
display: none;
}
}
.bar {
@extend .foo;
} Libsass
|
@chriseppstein maybe you have any pointers as to how the ordering works? |
This is another interestingly similar issue: .thing[disabled] {
@extend .thing;
background: blue;
} ruby sass: .thing[disabled] {
background: blue; } libsass: [disabled].thing {
background: blue; } |
I'd really like to make sass-spec agnostic of non-semantic differences like this. The order doesn't matter and I don't think libsass should work very hard to achieve that level of consistency when there are bigger fish to fry. |
@xzyfer you pointed out that "by @andybenedict in #1539 this can actually cause broken code when attribute selectors are involved." Can you provide an example of this? I agree with @chriseppstein that it should not make any difference!? |
You're both correct. I realised my mistake but hadn't removed the comment. This is why I removed the milestone as per #2174 |
Thanks for the clarification, so it's basically a whitespace issue ... |
Correct. |
Once we have semantic equivalence in sass spec, as opposed to exact matching, this will be "fixed". |
Closing as dart-sass also exhibits inconsistent order with extend and doesn't seem to care. |
Ruby Sass
LibSass
Spec https://github.com/sass/sass-spec/tree/master/spec/libsass-todo-tests/180_test_basic_extend_loop
Spec https://github.com/sass/sass-spec/tree/master/spec/libsass-todo-tests/181_test_three_level_extend_loop
The text was updated successfully, but these errors were encountered: