You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Space in merge declaration causes CssSyntaxError #160
Less allows (or gracefully handles) spaces in merge declarations, like filter +_: blur(2px); but throws an exception in postcss. This happens inside after tokenization inside decl so it looks like the tokens could be sanitized before passing it to super.decl but I'm a bit out of my depths with whether or not that'll break something else.
Node Version: v12.13.1
NPM Version: 7.4.0
postcss Version: 8.1.2
postcss-less Version: 4.0.1
LESS
.test1
{
rule+_: 'value';
}
JavaScript
consttest=require('ava');const{ parse }=require('../../lib');test('should not fail when spaces are in merge rules',(t)=>{constless=`.test1 { rule +_: 'value'; }`;parse(less);});
Errors
CssSyntaxError
<css input>:3:11: Unknown word
Expected Behavior
The Less should parse maybe with prop: "rule+_" to match match the existing. Or both should have something like prop: "rule", merge: true. I'm just using stylelint so I'm unopinionated.
Activity
shellscape commentedon Jun 11, 2021
I'd welcome a pull request to resolve this.