KEMBAR78
[css-contain-3] Spec syntax for size queries · Issue #6870 · w3c/csswg-drafts · GitHub
Skip to content

[css-contain-3] Spec syntax for size queries #6870

@una

Description

@una

Contain level 3 adds a size() function for querying the parent size.

I understand this makes it more explicit due to multiple types of queries (i.e. its possible to query a style() in this spec). However, this might be potentially confusing for someone expecting the same experience as @media, i.e @media (min-width: 300px).

  1. Would it be possible to support both syntaxes (@container (min-width: 300px) and @container size(min-width: 300px)) to reduce developer confusion and possible frustration?

  2. If we introduce size() for @container, we should probably also support size() for @media.

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