question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Less Parse Error: Variable Body that starts with `&`

See original GitHub issue

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.

Issue Analytics

  • State:open
  • Created 5 years ago
  • Comments:14 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
fabbcommented, Nov 12, 2018

I checked out the postcss-less repo and tried reproducing the bug. They fixed it in 3.0.0. So please update your dependency.

0reactions
thorn0commented, Nov 17, 2019
Read more comments on GitHub >

github_iconTop Results From Across the Web

Less Parse Error css-varvalueexpected for Variable Body ...
It should be parsed correctly, but VSCode shows the error css-varvalueexpected . The text was updated successfully, but these errors were ...
Read more >
Less media-query variable returns ParseError: Expected
But when I run my website it returns the following error: ParseError: Expected ')' in main.less on line 1, column 27: 1 -...
Read more >
SyntaxError: JSON.parse: bad parsing - JavaScript | MDN
JSON.parse() parses a string as JSON. This string has to be valid JSON and will throw this error if incorrect syntax was encountered....
Read more >
Understanding Common Errors In Java
This error occurs when you use the wrong variable type in an expression. A very common example of this is sending a method...
Read more >
Erlang -- Expressions
An argument of the wrong type causes a badarg runtime error. ... Variables start with an uppercase letter or underscore (_). ... Less...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found