Skip to content

Fix declaration-property-value-no-unknown false positives for calc() with mixed operations #9066

@ehoogeveen-medweb

Description

@ehoogeveen-medweb

What minimal example or steps are needed to reproduce the bug?

.foo-5 {
  top: calc(0.3 * 100vh + 15px)
}

What minimal configuration is needed to reproduce the bug?

{
  "rules": {
    "declaration-property-value-no-unknown": true
  }
}

How did you run Stylelint?

Demo

Which Stylelint-related dependencies are you using?

{
  "stylelint": "17.2.0"
}

What did you expect to happen?

No problems to be reported.

What actually happened?

The following problems were reported;

18:8-32
    error
    Unexpected invalid math expression "calc(0.3 * 100vh + 15px)" for property "top"
    [(declaration-property-value-no-unknown)](https://stylelint.io/user-guide/rules/declaration-property-value-no-unknown)

Do you have a proposal to fix the bug?

This regressed between v17.1.1 and v17.2.0.

Metadata

Metadata

Assignees

No one assigned

    Labels

    status: wipis being worked on by someone

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions