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

Parsing issue in less variables #1548

Closed
ssivanatarajan opened this issue Mar 29, 2021 · 2 comments
Closed

Parsing issue in less variables #1548

ssivanatarajan opened this issue Mar 29, 2021 · 2 comments

Comments

@ssivanatarajan
Copy link

LESS

    @border-top:none !important;

while parsing the above code, getting property as "@borde-top:none" instead of "@border-top" . if there is no space between ":" and property, value getting incorrect results.

Seems the issue was due to the regexp(RE_AT_END) used in tokenize.js, this regexp is not contains ":" to split the property & value.

raised this issue in below dependants

stylelint- stylelint/stylelint#5210
postcss-less -shellscape/postcss-less#155

@Semigradsky
Copy link
Member

Looks like postcss-less should use own tokenizer.

@ai
Copy link
Member

ai commented Mar 29, 2021

You need a separated parser for Less. PostCSS core was not created to parse Less.

@ai ai closed this as completed Mar 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants