Skip to content

[css-syntax] Dashed-ident rules and error recovery #9336

Description

@andruud

After a recent edit in relation to relaxed nesting, css-syntax now says this:

<{-token>
If the first two non- values of rule’s prelude are an whose value starts with "--" followed by a , consume the remnants of a bad declaration from input, with nested, and return nothing.

Unless I'm mistaken, this means that encountering this situation top-level means we'll treat the entire rest of the stylesheet as a "bad declaration".

--foo:hover {
  color: red;
}
/* Lots of other innocent and valid rules here */

That is probably a bit extreme, and makes the change a bit hard to ship, since it could affects existing sites (drastically).

Perhaps we can limit the behavior to when nested is true? Or something else? @tabatkins

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