Skip to content

[css-sizing-4] How to parse "contain-intrinsic-size: 10px auto 20px;" #6391

Open

Description

@cbiesinger

https://www.w3.org/TR/css-sizing-4/#intrinsic-size-override

The grammar allows the length and auto in any order. Therefore, the following is valid:
contain-intrinsic-size: 10px auto 20px;

However, should it be interpreted as contain-intrinsic-width: auto 10px; contain-intrinsic-height: 20px; or as contain-intrinsic-width: 10px; contain-intrinsic-height: auto 20px;?

@fantasai @tabatkins

Activity

  1. tabatkins commented on Sep 8, 2021

    @tabatkins
    Member

    Following up: we just fixed the ordering as auto <length>, since that reflects the importance of the values and solves the parsing issue - 10px auto 20px is thus c-i-width: 10px; c-i-height: auto 20px;.

  2. Loirooriol commented on Sep 8, 2021

    @Loirooriol
    Contributor

    <length> | auto <length> could be shortened to auto? <length>

  3. tabatkins commented on Sep 8, 2021

    @tabatkins
    Member

    It can be, yes, but we sometimes separate out clauses like this when the behavior is significantly different and we want to talk about the cases separately.

  4. cbiesinger commented on Sep 8, 2021

    @cbiesinger
    Author
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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