Skip to content

[css-cascade] "document order" is undefined #8551

@cvrebert

Description

@cvrebert

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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions