Skip to content

[css-grid] Should grid-template-areas accept empty strings? #5110

Closed
@Loirooriol

Description

@Loirooriol
CSS.supports("grid-template-areas", `""`)
CSS.supports("grid-template-areas", `"" ""`)

They are both true in Firefox and false in Chromium and old Edge. Looking at https://drafts.csswg.org/css-grid/#propdef-grid-template-areas,

  • There is no trash token.
  • All strings have the same number of columns (0).
  • There's in no non-rectangular named grid area (since there's no named grid area).

So it seems valid per the spec. But also pretty pointless, so possibly it was not deliberate. Given that neither Chromium nor old Edge support that, should we really allow 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