Skip to content

Rule Change: no-invalid-properties incorrectly reports for valid CSS with var() in functions #223

@thecalamiity

Description

@thecalamiity

What rule do you want to change?

no-invalid-properties

What change do you want to make?

Generate fewer warnings

How do you think the change should be implemented?

A new default behavior

Example code

:root {
  --width: 10px;
}

div {
  width: calc(100% - var(--width))
}

What does the rule currently do for this code?

The rule incorrectly reports: Unknown property 'width' found. This is a regression in the main branch, as the same code works correctly in v0.10.0.

What will the rule do after it's changed?

The rule should recognize that width is a valid CSS property and that calc(100% - var(--width)) is a valid value for the width property. It should not report any errors for this code.

Participation

  • I am willing to submit a pull request to implement this change.

Additional comments

No response

Metadata

Metadata

Assignees

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionenhancementNew feature or request

Type

No type

Projects

Status

Ready to Implement

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions