Skip to content

[css-cascade-7] What happens with duplicate @sheet identifiers? #12001

Open
@KurtCattiSchmidt

Description

@KurtCattiSchmidt

With the following CSS, what should happen?

@sheet sheet1 {
  * { font-family: serif; }
}
@sheet sheet1 {
  * { font-family: sans-serif; }
}

I can think of a few options:

  1. Last definition wins - this aligns with how CSS generally works and seems straightforward for developers.
  2. Rules with the same identifier are merged, like with duplicate @layer names. @layer is a bit different though, because source order of the name determines layer precedence, which isn't the case for @sheet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Thursday Morning

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions