You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[scss] if selector ends with operator two spaces are put between it and bracket #3731
.this > .ends > .with > .an > .operator > {
// note the double space between the operator and bracket
}
.this > .ends > .with > .an > .operator + {
// note the double space between the operator and bracket
}
.this > .ends > .with > .an > .operator ~ {
// note the double space between the operator and bracket
}
Output:
.this > .ends > .with > .an > .operator > {
// note the double space between the operator and bracket
}
.this > .ends > .with > .an > .operator + {
// note the double space between the operator and bracket
}
.this > .ends > .with > .an > .operator ~ {
// note the double space between the operator and bracket
}
Expected behavior:
Expected there to only be one space between the last operator/combinator in the selector and the bracket (currently there are two spaces)
@zieka thanks! I had no idea it existed. We should definitely not add two spaces. We already have a special-case for the second version which is more common.
Activity
vjeux commentedon Jan 12, 2018
I'm curious, what does it even mean?
zieka commentedon Jan 12, 2018
while not the greatest use of the syntax, scss will let you end a selector with an operator/combinator
So this scss:
compiles to following css
in my opinion, the proper formatting for this should be the following scss:
but for now the double space printing is ugly.
lydell commentedon Jan 12, 2018
Wow, I had no idea that was a feature! TIL
vjeux commentedon Jan 12, 2018
@zieka thanks! I had no idea it existed. We should definitely not add two spaces. We already have a special-case for the second version which is more common.
ikatyang commentedon Jan 14, 2018
For reference, fixed in #3738.