Re: [csswg-drafts] Proposal: intrinsic-size CSS property (#4229)

(I got here via w3ctag/design-reviews#437.)

I reviewed the [current definitions of the `intrinsic-*` properties](https://drafts.csswg.org/css-sizing-4/#intrinsic-size-override), and I'm somewhat concerned about the naming here given the way this interacts with `overflow`.

The current default behavior for the scrollable values of `overflow` (which include `hidden`) is that they lead to the min-content size being zeroed out (as far as the parent sees), but the max-content size propagating through the element to its parent.  In other words, this is a "middle" behavior in between propagating the intrinsic size through for both min-content and max-content, and zeroing out for both min-content and max-content.  (At least, I believe this is what Gecko implements, and I believe it had to implement it this way for compatibility.)

I recall seeing strong use cases for both behaviors for min-content size (zero out, or propagate through).  I'm less sure about for max-content size.  This makes me hesitant to have the default behavior called `legacy`; it is a behavior for which a good set of use cases exist.

I suspect (though I'm not sure) the non-default `auto` behavior is actually the less interesting deviation from the current default; I think there may be stronger use cases for "don't zero out min-content" than for "zero out max-content" (particularly with `overflow: hidden`).  At the very least, I'm pretty sure I recall seeing such use cases, but it's been a few years so I don't remember details.  I think we should offer this option.

Given that I think there are three reasonable options here for `overflow` interaction rather than two (and they should probably all be offered), I think `legacy` and `auto` are not good names.

(Also, if any of the three options *shouldn't* be offered because it doesn't have strong use cases, the one I would skip is the one currently defined as `auto`.  This is both because of the three I recall seeing the fewest use cases that needed it, and because it is largely achievable by specifying `0` (although only for certain `overflow` values).)

-----

I also think the definitions that refer to `overflow: visible` also should also include `overflow: clip`; I think the way to do that is to refer to whether the box establishes a [scroll container](https://drafts.csswg.org/css-overflow-3/#scroll-container).

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

Received on Tuesday, 19 November 2019 01:18:48 UTC