Skip to content

[css-contain] What should container font relative units match against by default? #9255

@nt1m

Description

@nt1m

#8855 resolved on adding new container-font relative units, however it's not clear which container they should query against. cqw & cqh can match against different containers depending on the container type (inline-size vs. size).

Some options are:

  • nearest named container: useful by default, drawback would be the inconsistency with cqw/cqh (which may be confusing if you are using them in an un-named @container at-rule)
  • style containers: this makes sense, and is somewhat consistent with cqw/cqh, drawback is that this would always be the parent element, so the units would be useless without the notation from [css-contain-3] Reference named containers for cq units #7858
  • inline-size containers: would be somewhat consistent with the majority of the cqw cases, but not really obvious behavior.
  • adding a new font container-type
  • only allowing those units with the notation from [css-contain-3] Reference named containers for cq units #7858, although having to always specify a container name might be extra-verbose.

cc @mirisuzanne @tabatkins @fantasai

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Status

    Friday Morning

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions