Re: [csswg-drafts] [css-sizing] Does indefinite `stretch` behave as automatic size or as initial value? (#11006)

> > > Formally, its behavior is the same as specifying an [automatic size](https://drafts.csswg.org/css-sizing-3/#automatic-size) together with a [self-alignment property](https://drafts.csswg.org/css-align-3/#self-alignment-properties) value of [stretch](https://drafts.csswg.org/css-sizing-4/#valdef-width-stretch)
> 
> So I think this was intended just to be applicable to main sizes, (e.g. not min/max-sizes).
> 
> IMO this should be consistent with `min-height: 100%`, e.g. if a percentage is indefinite it behaves as zero for `min-height`, and Infinity for `max-height`.
> 
> (e.g. The Blink/Gecko behaviour).
> 
> For example it'd be pretty weird if:
> 
> ```
> <!DOCTYPE html>
> <div style="max-height: stretch; height: 200px; width: 200px; border: solid">lorem ipsum</div>
> ```
> 
> got clamped by the intrinsic size (when `stretch` is an extrinsic constraint).
> 
> cc/ @tabatkins

I talked to @tabatkins about this a few weeks ago. He confirmed that the spec authors _intended_ the Blink/Gecko behavior (min-size:stretch resolves to 0 and max-size:stretch resolves to infinity when available size is indefinite) and that it was indeed on the editors to better define the spec around min/max sizes behaving as auto, which should hopefully clear up the confusion here.

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


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

Received on Monday, 9 December 2024 20:54:47 UTC