-
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
Nested &
will result strange line break with nested
or extended
style
#1373
Comments
Ditto here, another example: .foo a,
.bar a {
&:hover, &:focus {
color: red;
}
} Results in: .foo a:hover, .foo a:focus,
.bar a:hover,
.bar a:focus {
color: red;
} Note: Only the first 2 selectors in the rule are incorrectly on the single line. Instead of: .foo a:hover,
.foo a:focus,
.bar a:hover,
.bar a:focus {
color: red;
} |
@brian-hay I'd expect that to produce .foo a:hover, .foo a:focus,
.bar a:hover, .bar a:focus {
color: red;
} |
This is definitely worth fixing, but at some point I plan to make parent-selector resolution use the same backend logic as |
Thanks for your clear response. I'm waiting for your fix! |
@nex3 the SASS documentation doesn't seem to be clear on this but I personally I would have thought that for the ":expanded" style, it's more consistent to have each selector on it's own line (i.e. line break after comma), rather than grouping pseudo selectors. |
@nex3 Disclosure: I work a lot with Drupal and its code style guidelines (and automated code review tools) demand one selector per line. So, I'm happy to acknowledge my bias / self-interest :-) Regardless I think one selector per line (always breaking at comma) is more consistent and easier to code because there are no special cases. |
I'd expect them all to be on different lines if |
I'm moving this issue to the new Ruby Sass repository because it's specific to Ruby Sass's implementation. Once it's there, I'm going to close it as "on ice" because Ruby Sass is deprecated and no additional features are planned for it. |
If I write nested
&
like this:I get:
It should be:
Tested on Sass 3.4.0.rc.3, ruby 2.0.0p353 (2013-11-22) [x64-mingw32].
The text was updated successfully, but these errors were encountered: