Skip to content

Bug: cannot parse container style query of form @container style(--foo) #142

Description

@uhyo

Environment

Node version: v24.15.0
npm version: v11.12.1
ESLint version: v10.8.0
Operating System: Mac

What did you do?

I tried to lint a CSS file with below content with ESLint (@eslint/css):

/* parses */
@container style(background-color: blue) {
}

/* does NOT parse */
@container style(--foo) {
  color: red;
}

What did you expect to happen?

ESLint can parse and lint it.

What actually happened?

Parse error:

/private/tmp/eslint-test/test.css
  6:23  error  Parsing error: Colon is expected
  7:9   error  Parsing error: Identifier is expected
  8:1   error  Parsing error: "{" is expected

Link to Minimal Reproducible Example

https://stackblitz.com/edit/stackblitz-starters-zgmoopby?file=test.css

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

Sorry if this should have been opened as a change request rather than a bug. 💖

Metadata

Metadata

Assignees

Labels

bugSomething 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