Skip to content

Parsing issue in less variables #1548

Closed

Description

@ssivanatarajan

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 -prettier/postcss-less#155

Activity

  1. Semigradsky commented on Mar 29, 2021

    @Semigradsky
    Member

    Looks like postcss-less should use own tokenizer.

  2. ai commented on Mar 29, 2021

    @ai
    Member

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

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions