-
Notifications
You must be signed in to change notification settings - Fork 466
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
Extending self can lead to non-semanticly different output #2053
Comments
@mgreter I'm no expert in the extend code. But it seems like this is the reason: This is a non-semantic difference in a corner case where the |
Rescoping this to 3.4.1 since it shouldn't block 3.4.0. |
Input: .bar.baz {
@extend .bar;
background: blue;
} Expected: .bar.baz {
background: blue;
} Current: .baz.bar {
background: blue;
} Reason: if modified_original || !replace || groups.empty?
# First Law of Extend: the result of extending a selector should
# (almost) always contain the base selector.
# See https://github.com/nex3/sass/issues/324.
original = Sequence.new([SimpleSequence.new(members, @subject, source_range)])
original.add_sources! sources
groups.unshift original
end
groups.uniq! |
IMHO we shouldn't worry about non-semantically different output anymore. Dart Sass already produces semantically equivalent but different output. In sass-spec we can added libsass specific output with Up to you @mgreter if you think this is worth investing in. I'm happy to close it. |
ruby sass:
libsass with #2052
//CC @chriseppstein any idea why ruby sass differs in
.bar[disabled]
vs[disabled].baz
?The text was updated successfully, but these errors were encountered: