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

The CSS Working Group just discussed ``[css-sizing] Does indefinite `stretch` behave as automatic size or as initial value?``, and agreed to the following:

* `RESOLVED: min-size: stretch behaves as zero, max-size; stretch as infinity, when in an indefinite container`

<details><summary>The full IRC log of that discussion</summary>
&lt;fantasai> oriol: Spec says stretch size is same behavior as automatic size + stretch alignment<br>
&lt;fantasai> oriol: but it doesn't restrict this defintion to preferred size property<br>
&lt;fantasai> oriol: my understanding is you can set this in min or max property<br>
&lt;fantasai> oriol: I've been implementing in servo, but doesn't match other browsers<br>
&lt;fantasai> oriol: they don't support keywords in the block axis<br>
&lt;fantasai> oriol: it ignores it in min-size, and in max-size it treats it as none<br>
&lt;fantasai> oriol: from what davidsgrogan said, this was the intention of the editors of the spec ?<br>
&lt;TabAtkins> fantasai: that seems a bit weird, if we're not supporting it we just shoudln't parse it<br>
&lt;TabAtkins> oriol: the status is inconsistent because browsers have been implementing these things...<br>
&lt;fantasai> oriol: state is inconsistent because actively changing implementations<br>
&lt;fantasai> oriol: in Firefox these keywords work in inline axis, but not in block one<br>
&lt;fantasai> oriol: and then you need to parse the value because you don't know the writing mode<br>
&lt;fantasai> oriol: Blink obeys these keywords in both axes<br>
&lt;fantasai> fantasai: is there a reason we can't make it mean what it says in the min/max properties?<br>
&lt;TabAtkins> fantasai: from an authors' perspective, stretch means "i want to fill the container"<br>
&lt;TabAtkins> fantasai: so if you said "i would like this box to have a width of 100px but a max-width of stretch", then it should be 100px if the container is larger than 100px but filling it exactly if it's smaller<br>
&lt;TabAtkins> fantasai: that's what i'd expect<br>
&lt;TabAtkins> oriol: this is just when the stretch size is indefinite, so we don't know the container size<br>
&lt;TabAtkins> oriol: so it happens in the block axis in block layout<br>
&lt;fantasai> fantasai: Ah, in that case that make ssense<br>
&lt;fantasai> oriol: Ian says 'stretch' is an extrinsic value, would be weird to treat it as intrinsic.<br>
&lt;fantasai> oriol: what I did in servo is slightly simpler to implement, but aligning with Blink is ok<br>
&lt;fantasai> astearns: resolving stretch to zero, infinity when available size is indefinite<br>
&lt;fantasai> astearns: can we resolve on it?<br>
&lt;fantasai> astearns: any objections<br>
&lt;fantasai> RESOLVED: min-size: stretch behaves as zero, max-size; stretch as infinity, when in an indefinite container<br>
</details>


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


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

Received on Wednesday, 19 February 2025 17:02:03 UTC