Skip to content

Add CSS nesting tests - #4

Merged
ylafon merged 2 commits into
w3c:mainfrom
j9t:css-nesting
Sep 29, 2026
Merged

ylafon merged 2 commits into
w3c:mainfrom
j9t:css-nesting

Conversation

@j9t

@j9t j9t commented Sep 29, 2026

Copy link
Copy Markdown
Contributor

Tests for w3c/css-validator#522, which adds CSS nesting support. They fail on the validator’s current main and pass with that PR.

  • 12 files in general/selectors/nesting-*.css, plus a “Nesting” group in xml/general.xml
  • Positive: the examples from Nested Style Rule Parse Error css-validator#431, #481, and #521; & placement; relative selectors and selector lists; rules starting with type selectors or pseudo-classes, mixed with declarations; nested @media, @supports, and @layer
  • Negative: invalid nested selector, invalid property in a nested rule, &div, nesting under CSS 2.1, and nested unsupported at-rules. Each checks that parsing continues afterwards.
  • The tests use warning="no" so they don’t depend on unrelated warnings (e.g., “no background-color set”).

j9t added 2 commits September 29, 2026 15:08
Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
Signed-off-by: Jens Oliver Meiert <jens@meiert.com>
@ylafon
ylafon merged commit c49b0df into w3c:main Sep 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants