Originally filed at lesshint/lesshint#492
- Node Version:
10.10.0
- NPM Version:
6.4.1
- postcss-less Version:
2.0.0
If you have a large amount of code to share which demonstrates the problem you're experiencing, please provide a link to your
repository rather than pasting code. Otherwise, please paste relevant short snippets below.
LESS
This is apparently a new feature just released a few months ago (http://lesscss.org/features/#maps-feature).
JavaScript
const postcss= require('postcss');
const syntax = require('postcss-less');
const lessText = `@var: {
color: blue
};`;
postcss([])
.process(lessText, { syntax: syntax })
.then(function (result) {
console.log(result.root.first)
});
Expected Behavior
To be parsed and returned as a Declaration node, like other variable assignments (e.g @var: blue).
Actual Behavior
It's parsed and returned as a Rule node.
How can we reproduce the behavior?
Run the provided JS example.
Originally filed at lesshint/lesshint#492
10.10.06.4.12.0.0If you have a large amount of code to share which demonstrates the problem you're experiencing, please provide a link to your
repository rather than pasting code. Otherwise, please paste relevant short snippets below.
LESS
This is apparently a new feature just released a few months ago (http://lesscss.org/features/#maps-feature).
JavaScript
Expected Behavior
To be parsed and returned as a
Declarationnode, like other variable assignments (e.g@var: blue).Actual Behavior
It's parsed and returned as a
Rulenode.How can we reproduce the behavior?
Run the provided JS example.