Re: [csswg-drafts] [css-contain-3] "container width" and "container height" units (#5888)

I expect the vast majority of containers to be single-axis or style/state containers. Two-axis size containers are likely to be very rare. I think that makes your approach extremely limiting - these units would only be usable one at a time in very restricted ways. We'll almost never be able to combine inline & block units:

```css
@container my-inline-container (...) {
  /* only inline units can be used in here? */
}
```

We would rarely be able to use `qmin` or `qmax`, or anything like `padding: 2qb 2qi` with both inline & block units in a single property. The min/max units would only be allowed when querying a 2d container, and the combined property would have to be split into individual queries.

This approach is also complicated by nested container rules:

```css
@container my-inline-container (...) {
  @container my-block-container (...) {
    /* which container do we use for units in here? */
  }
}
```

The only way we can make these units broadly available & combine-able is to make them self-select their containers. I don't see a viable way around that.

-- 
GitHub Notification of comment by mirisuzanne
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5888#issuecomment-865247654 using your GitHub account


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Monday, 21 June 2021 18:21:48 UTC