Re: [csswg-drafts] [css-align] Does stretch work when width/height only behaves as auto? (#4525)

The CSS Working Group just discussed `Does stretch work when width/height only behaves as auto?`, and agreed to the following:

* `RESOLUTION: Keep the spec text about auto and stretching that aligns with Chromium behavior, but add some clarification.`

<details><summary>The full IRC log of that discussion</summary>
&lt;heycam> Topic: Does stretch work when width/height only behaves as auto?<br>
&lt;heycam> github: https://github.com/w3c/csswg-drafts/issues/4525<br>
&lt;heycam> oriol: this is about grid items the default alignment is stretch<br>
&lt;heycam> ... this is supposed to stretch an element to cover tis container<br>
&lt;heycam> ... but not if the computed width computes to auto<br>
&lt;heycam> ... the spec has some ambiguity about computing to auto<br>
&lt;heycam> ... but it's "behaves" as auto<br>
&lt;heycam> ... FIrefox thinks this is the case, and instead of checking the computed value being auto, it checks whether it behaves as auto<br>
&lt;heycam> ... e.g. if you set the height to max-content it behaves as auto, in Firefox it stretches, but in Chromium it doesn't<br>
&lt;RossenF2F> q?<br>
&lt;heycam> ... the question is whether if the width/height is set to a value that behaves as auto but isn't auto itself, does this stretch?<br>
&lt;RossenF2F> q+<br>
&lt;heycam> fantasai: I think the author did not want automatic behavior<br>
&lt;heycam> ... in the most common behavior, automatic behavior is sizing to the content<br>
&lt;RossenF2F> Zakim, open queue<br>
&lt;Zakim> ok, RossenF2F, the speaker queue is open<br>
&lt;heycam> ... in the context of grid and flex, auto isn't equivalent to that<br>
&lt;heycam> ... if the author has set it to a value that's not auto, we shouldn't automatically stretch<br>
&lt;heycam> ... I think the spec is correct to rely on computing to auto, so we should align on Chromium's behavior<br>
&lt;heycam> TabAtkins: mats also says that sounds reasonable<br>
&lt;tantek_> is there a test case for Chromium's behavior?<br>
&lt;heycam> emilio: it's a bit weird that it max-content behaves as auto for some things but not others<br>
&lt;rego> tantek_:<br>
&lt;rego> https://software.hixie.ch/utilities/js/live-dom-viewer/?%3C!DOCTYPE%20html%3E%0A%3Cstyle%3E%0A%23grid%20%7B%0A%20%20display%3A%20grid%3B%0A%20%20width%3A%20100px%3B%0A%20%20height%3A%20100px%3B%0A%20%20grid-template%3A%20100%25%20%2F%20100%25%3B%0A%20%20background%3A%20yellow%3B%0A%7D%0A%23item%20%7B%0A%20%20height%3A%20max-content%3B%0A%20%20align-self%3A%20stretch%3B%0A%20%20background%3A%20cyan%3B%0A%7D%0A%3C%2Fstyle%3E%0A%3Cdiv%20id%3D%22grid%22%3E%0A<br>
&lt;rego> %20%20%3Cdiv%20id%3D%22item%22%3EText%3C%2Fdiv%3E%0A%3C%2Fdiv%3E<br>
&lt;tantek_> IRC broke that<br>
&lt;tantek_> across a line<br>
&lt;rego> yep, linked on the issue<br>
&lt;rego> at the begginig<br>
&lt;rego> https://github.com/w3c/csswg-drafts/issues/4525<br>
&lt;tantek_> thank you<br>
&lt;heycam> RESOLUTION: Keep the spec text about auto and stretching that aligns with Chromium behavior, but add some clarification.<br>
&lt;heycam> astearns: let's get that test case into WPT<br>
&lt;fantasai> s/RESOLUTION/RESOLVED?<br>
&lt;fantasai> s/RESOLUTION/RESOLVED/<br>
</details>


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

Received on Wednesday, 22 January 2020 14:28:08 UTC