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
p .foo {
font-weight: bold;
}
p .foop .foo.bar {
color: red;
}
.foo and p were mashed together to make .foop. I don't know what else should happen -- a syntax error makes the most sense to me. You can also add more ampersands for even more hilarious results:
Yes, you are right people are using it to postfix everything.
I just think its nice that selectors stay selectors e.g. I might expect in
this example for the p tag to be moved to be p.foo.. anyway it can be
worked around and I agree thus should be closed.
Tested in
less.js
1.6.0
.The following code has very predictable output:
As such:
Being the smartass I am, I then decided I wanted to know what would happen if I tried multiple ampersands:
Produces the following css:
.foo
andp
were mashed together to make.foop
. I don't know what else should happen -- a syntax error makes the most sense to me. You can also add more ampersands for even more hilarious results:Produces:
I therefore declare this the foop foop foop bug.
FWIW Sass (SCSS) produces a syntax error with the same code.
The text was updated successfully, but these errors were encountered: