Skip to content

Bug: no-invalid-at-rules rejects page margin at-rules #525

Description

@Pixel998

Environment

ESLint version: v10.8.0
@eslint/css version: v1.4.0
Node version: v24.18.0
npm version: v11.16.0
Operating System: windows

Which language are you using?

stylesheet

What did you do?

Configuration
import css from "@eslint/css";

export default [
  {
    files: ["**/*.css"],
    plugins: { css },
    language: "css/css",
    rules: {
      "css/no-invalid-at-rules": "error",
    },
  },
];
@page {
  @top-left {
    /* page-margin-properties */
  }
}

What did you expect to happen?

@top-left should be accepted as a page margin at-rule when nested inside @page, so no-invalid-at-rules should report no error.

What actually happened?

Unknown at-rule '@top-left' found.

Link to Minimal Reproducible Example

https://stackblitz.com/edit/stackblitz-starters-gnlz6acj

Participation

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

AI acknowledgment

  • I did not use AI to generate this issue report.
  • (If the above is not checked) I have reviewed the AI-generated content before submitting.

Additional comments

https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/At-rules/@page#margin_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
Ready to Implement

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions