Skip to content

CssSyntaxError: not support functions be called at any level #169

@igauch

Description

@igauch

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?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions