Skip to content

Bug: error when defining fallbacks in var in no-invalid-properties #180

Open
@Tanujkanti4441

Description

@Tanujkanti4441

Environment

ESLint version:
@eslint/css version: latest
Node version: latest
npm version: latest
Operating System: windows

Which language are you using?

stylesheet

What did you do?

/* eslint css/no-invalid-properties: ["error"] */

:root {
	--my-color: red;
}

a {
	color: var(--my-color, red);
}

.two {
	color: var(--my-color, var(--my-background, pink)); 
}

What did you expect to happen?

No error as variable --my-color is defined already.

What actually happened?

Unknown property 'color' found css/no-invalid-properties

Link to Minimal Reproducible Example

none

Participation

  • I am willing to submit a pull request for this issue.

Additional comments

No response

Metadata

Metadata

Labels

acceptedThere is consensus among the team that this change meets the criteria for inclusionbugSomething isn't working

Type

No type

Projects

Status

Implementing

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions