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

ParseError with variable interpolation after ':' in selector #52

Closed
plumbojumbo opened this issue Nov 30, 2020 · 1 comment
Closed

ParseError with variable interpolation after ':' in selector #52

plumbojumbo opened this issue Nov 30, 2020 · 1 comment
Assignees
Labels
Type: Bug Something isn't working

Comments

@plumbojumbo
Copy link

plumbojumbo commented Nov 30, 2020

This succeeds:

(new Less_Parser())->parse('@position: after; .@{position} {}');

This, however, fails:

(new Less_Parser())->parse('@position: after; &:@{position} {}');
ParseError: Unexpected input in anonymous-file-2.less on line 1, column 14
1| @foo: after; &:@{foo} {}

Both Less.js and lessphp compile it just fine. (cmp.)

@Krinkle Krinkle added the Type: Bug Something isn't working label Aug 9, 2021
@Krinkle
Copy link
Member

Krinkle commented Aug 9, 2021

I have confirmed that this passes on the specific Less.js version we aim to support (Less.js 2.5.3), e.g. via fiddle.

@position: after;

.foo {
    &:@{position} {
        color: green;
    }
}

Which Less.js 2.5.3 compiles to:

.foo:after {
  color: green;
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug Something isn't working
Development

No branches or pull requests

2 participants