-
Notifications
You must be signed in to change notification settings - Fork 757
Description
- https://drafts.csswg.org/css-cascade/#cascade-order
- https://drafts.csswg.org/css-cascade-5/#cascade-order
- https://drafts.csswg.org/css-cascade-6/#cascade-order
Quoting from this section (emphasis added):
Order of Appearance
The last declaration in document order wins. For this purpose:
- [...]
- Declarations from style attributes are ordered according to the document order of the element the style attribute appears on, and are all placed after any style sheets. [CSSSTYLEATTR]
Presumably "document order" refers to https://www.w3.org/TR/DOM-Level-3-Core/glossary.html#dt-document-order and should be hyperlinked thereto.
However, that spec is obsolete nowadays. I think y'all want "tree order" instead.
E.g. https://drafts.csswg.org/cssom/#css-style-sheet-collections already refers (with an extra level of unconditional indirection thru WHATWG HTML, for some reason) to WHATWG DOM's "tree order":
[...] Any CSS style sheets associated with the DocumentOrShadowRoot, in tree order
A grep of the CSS2 spec plaintext turned up references to "document order", but apparently it likewise neither defines the term nor references another spec for it.