Skip to content

Less Parse Error: Variable Body that starts with & #5420

@fabb

Description

@fabb

Prettier 1.15.1
Playground link

--parser less

Input:

@just-text-type-input-selectors: &:not([type='file']):not([type='checkbox']):not([type='radio']):not([type='range']):not([type='hidden']);

Output:

SyntaxError: (postcss) CssSyntaxError Missed semicolon (1:34)
> 1 | @just-text-type-input-selectors: &:not([type='file']):not([type='checkbox']):not([type='radio']):not([type='range']):not([type='hidden']);
    |                                  ^
  2 | 

Expected behavior:
The line should parse fine, since it is valid less syntax, and the less compiler parses this fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    lang:css/scss/lessIssues affecting CSS, Less or SCSSlang:lessIssues affecting Less-specific syntax (not plain CSS)priority:highCode is printed in a way that alters the AST, breaks syntax, or is a significant regression. Urgent!

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions