Arxo Findings Register · Arxo Law

ARXO-2026-0335 · Reported

CSS Cascade 5: the Layer Ordering example gives two different orders when both media queries match

Example #example-87e2d331 in §6.4.3 says that when the width query matches, layout comes first, and that when the colour-scheme query matches, theme comes first. When both match, the two sentences give different orders. The rule of §6.4.3 (layers sort by first declaration) gives layout first; only the second sentence is wrong. The 2022 snapshot of the specification (13 January 2022) has the same example.

Consequence

A wide viewport with a dark colour-scheme preference and the same property in both layers: by the rule the later layer, theme, wins; by the second sentence of the example layout wins.

Proposed correction

Make the second sentence apply only when the width query does not match: “Otherwise, theme will come first in the layer order.”

Issued by
World Wide Web Consortium (W3C) — CSS Working Group
Act
CSS Cascading and Inheritance Level 5 (Editor's Draft, 13 April 2026)
Place
§6.4.3, example #example-87e2d331
Record
Discrepancy
Class
Text of the act
Where it arose
The text of the act
Arxo's conclusion
Confirmed
Official text
Unchanged at last check
Last checked
2026-10-31

Evidence

Reproduced by execution. Quotations are verbatim from the official material; translations are ours and marked.

Cascade layers are sorted by the order in which they first are declared, with nested layers grouped within their parent layer.
Normative text · CSS Cascading and Inheritance Level 5, Editor's Draft of 13 April 2026 (W3C CSS Working Group) · §6.4.3 Layer Ordering · Editor's Draft · retrieved 2026-10-30 · SHA-256 2c51fc71d5bfec21aee9acf5004344fc0b5197db31fc48a1ae5373f3fbc4670f · copy
If the first media-query matches based on viewport dimensions, then the layout layer will come first in the layer order.
Normative text · CSS Cascading and Inheritance Level 5, Editor's Draft of 13 April 2026 (W3C CSS Working Group) · §6.4.3 Layer Ordering, example #example-87e2d331 · Editor's Draft · retrieved 2026-10-30 · SHA-256 2c51fc71d5bfec21aee9acf5004344fc0b5197db31fc48a1ae5373f3fbc4670f · copy
If the color-scheme preference query matches, or if neither condition is true, then theme will come first in the layer order.
Normative text · CSS Cascading and Inheritance Level 5, Editor's Draft of 13 April 2026 (W3C CSS Working Group) · §6.4.3 Layer Ordering, example #example-87e2d331 · Editor's Draft · retrieved 2026-10-30 · SHA-256 2c51fc71d5bfec21aee9acf5004344fc0b5197db31fc48a1ae5373f3fbc4670f · copy

How to check it without Arxo's tools

  1. Open CSS Cascading and Inheritance Level 5, Editor's Draft of 13 April 2026 (W3C CSS Working Group) and find §6.4.3 Layer Ordering; §6.4.3 Layer Ordering, example #example-87e2d331. Compare the text with the quotation above. A copy is kept in this register: 2c51fc71d5bfec21-ed-css-cascade-5.html (SHA-256 2c51fc71d5bfec21aee9acf5004344fc0b5197db31fc48a1ae5373f3fbc4670f, copy of the official file).
  2. The finding holds if the quoted passages read as shown and the comparison gives the result stated at the top of this page. If it does not, write to us with the record ID.

How this finding was made

AI agents read the specifications and compared their sections; the example was also run through executable rules of both readings. An AI coordinator checked the place against the full Editor's Draft and the Working Group's issue tracker, and two further AI models checked the report before filing.

Responsible institutions

Reported to

DateInstitutionChannelReference
2026-10-31W3C CSS Working Grouppublic issue trackerhttps://github.com/w3c/csswg-drafts/issues/14703

Responses

No response recorded.

History

  1. 2026-10-31Confirmed by Arxo
  2. 2026-10-31Entered in the register
  3. 2026-10-31Reported to W3C CSS Working Group (public issue tracker)

Cite this record

Arxo Law, Arxo Findings Register, ARXO-2026-0335, https://arxo.io/findings/ARXO-2026-0335/ (status as of 2026-10-31). Data: ARXO-2026-0335.json.