Less Parse Error: Variable Body that starts with `&`
See original GitHub issuePrettier 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:
- Created 5 years ago
- Comments:14 (6 by maintainers)
Top 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 >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I checked out the
postcss-less
repo and tried reproducing the bug. They fixed it in 3.0.0. So please update your dependency.doc reference: http://lesscss.org/features/#variables-feature-selectors