Skip to content
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

Using "&" parent selector + Double-hyphens in a class name causes the compiler to fail #21

Open
egesd opened this issue Apr 13, 2022 · 1 comment

Comments

@egesd
Copy link

egesd commented Apr 13, 2022

I noticed weird behaviour when naming my CSS classes with BEM-naming convention, using & and double hyphens. When naming my classes in a following way

.foo { &__bar { &--baz { } } }

the error occurs

ERROR file:/** 260:8 mismatched character 'b' expecting '>' 259: &__bar { 260: &--baz { 261:

When using the double hyphens without the "&" parent selector, it seems to be working fine.

To add: it also works with .foo__bar--baz so the problem isn't the double hyphens, but the combination of &-selector and double hyphens.

@Deraen
Copy link
Owner

Deraen commented Apr 13, 2022

I don't know if this has been supported in Less.js since some new versioon, but seems like less4j difference or just not implemented.

As less4j has been deprecated, this isn't going to be fixed.

https://github.com/SomMeri/less4j/wiki/Differences-Between-Less.js-and-Less4j

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants