Skip to content

Bug: no-invalid-properties ignores invalid declarations inside nested at-rules #363

@xbinaryx

Description

@xbinaryx

Environment

ESLint version: 9.39.2
@eslint/css version: 0.14.1
Node version: 24.13.0
npm version: 11.6.2
Operating System: Win11

Which language are you using?

stylesheet

What did you do?

Configuration
<!-- Paste your configuration here -->
.responsive {
  width: red;

  @media (max-width: 800px) {
    width: red;
  }
}

What did you expect to happen?

All invalid declarations (width: red) should be reported as errors, including those inside nested at-rules.

Per the CSS Nesting spec, declarations inside nested at-rules are valid CSS and behave as if they were wrapped in an implicit & {} block, so they should be linted the same way as top-level declarations.

What actually happened?

Only the top-level width: red; declaration is reported.

Link to Minimal Reproducible Example

N/A

Participation

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

Additional comments

https://developer.mozilla.org/en-US/docs/Web/CSS/Guides/Nesting/At-rules

Metadata

Metadata

Assignees

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