postcss-less
postcss-less copied to clipboard
CssSyntaxError: not support functions be called at any level
As of Less 3.0, functions can return any kind of Node type, and can be called at any level. but postcss-less not support. plugin-atrules-feature
- Node Version: v16.14.0
- NPM Version: 8.13.2
- postcss Version: 8.4.14
- postcss-less Version: 6.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
:root {
fontSize();
}
JavaScript
functions.add('fontSize', () => {
return Object.entries(fontSize).reduce((prev, [key, val]) => {
return prev + `--font-size-${key}: ${val}px;`
}, '')
})
Errors
Unknown word CssSyntaxError
Expected Behavior
passed
Actual Behavior
failed
How can we reproduce the behavior?
Happy to review a PR that resolves this.