- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Wed, 11 Aug 2021 16:49:53 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `replaced elements percentage-sized within rows`, and agreed to the following: * `RESOLVED: clamp automatic minimum size of compressible elements, and the transferred size suggestion of non-compressible aspect-ratio elements` <details><summary>The full IRC log of that discussion</summary> <fantasai> Topic: replaced elements percentage-sized within rows<br> <fantasai> s/rows/grid areas/<br> <fantasai> github: https://github.com/w3c/csswg-drafts/issues/6278<br> <fantasai> github: https://github.com/w3c/csswg-drafts/issues/6278<br> <fantasai> iank_: There's concept of compressible elements, if you put a percentage width in one axis, it will compress to min-size<br> <fantasai> iank_: Chrome did a bunch of fixes in this area (replaced elements) recently<br> <fantasai> iank_: that brought our behavior more inline with the spec here<br> <fantasai> iank_: which applied an automatic minimum size in this case<br> <fantasai> iank_: web author found this really surprising behavior, filed issue<br> <fantasai> iank_: Question is do we want to ...?<br> <Rossen_> q<br> <fantasai> iank_: Firefox behaves as expected, because there is some behavior around transferred sizes that they still don't do correctly.<br> <florian> s/.../follow the spec, and if not, how do we match the author's expectation/<br> <fantasai> https://github.com/w3c/csswg-drafts/issues/6278#issuecomment-863439988<br> <florian> fantasai: tab and I looked over this<br> <florian> fantasai: our conclusion is summarized in the issue<br> <florian> fantasai: the author's expectation is reasonable in this case<br> <florian> fantasai: chrome and firefox used to match that, until chrome fixed to match the spec<br> <florian> fantasai: [explains example]<br> <fantasai> [ fantasai insert summary later]<br> <Rossen_> 1fr has an auto min implied and that's what's causing the breakage.<br> <Rossen_> fantasai: the auto min size is supposed to be xtronger constraint of specified height... and that's what's happening because the % isn't taking affect<br> <fantasai> s/xtronger/weaker/<br> <Rossen_> fantasai: the sln we are interested in is to make % resolve against min definite height. resolving against 0 is to clamp the min size. do it for compatible elements and potentionally all els<br> <Rossen_> fantasai: does that makes sense?<br> <Rossen_> iank_: I did :)<br> <TabAtkins> Summary: During Grid layout, we first lay out to figure out row heights, then lay out given that height to figure out column widths (then maybe do both of those again). A 1fr item size has an automatic minimum; during the first layout both dimensions are unknown so the auto-min doesn't trigger, but in the second layout there is a height so it *does* trigger, and this ends up giving us the bad behavior where the height is frozen as "large"<br> <fantasai> s/does that makes sense/did everyone follow, or should I explain something again<br> <fantasai> iank_: I'd be concerned about doing this for all elements<br> <fantasai> iank_: if we do, should only do for compressible elements<br> <TabAtkins> But our intention was always that auto-min be a relatively weak constraint - it shouldn't be taken as gospel in the middle of this algo and have this effect.<br> <fantasai> Rossen_: what's downside to doing it for all elements?<br> <fantasai> iank_: Currently, if you've got a non-replaced element with width:100%<br> <fantasai> iank_: that would change behavior pretty drastically<br> <fantasai> fantasai: what if we only clamp the transferred size<br> <TabAtkins> (because of the ordering of row vs height resolution, this behavior doesn't have a bad effect when the space is tall; it only makes the element too-large when the space is wide, which is an annoying discontinuity)<br> <fantasai> iank_: so only things with aspect ratio ...<br> <fantasai> iank_: would need to think about that a bit more<br> <fantasai> Rossen_: can add aspect-ratio to anything, now, right?<br> <fantasai> fantasai: 2 inputs into auto min size: content size in that axis, and for items with aspect ratio (previously only replaced elements), size trasferred<br> <fantasai> fantasai: suggestion would be to make transferred size weaker than percentage size<br> <fantasai> iank_: there's a difference between spec and implementations atm with this stuff<br> <fantasai> iank_: spec says to resolve lengths against zero, whereas implementations will actually ignore that length<br> <fantasai> iank_: ignoring that difference, your suggestion and mine are effectively equivalent<br> <fantasai> fantasai: no, yours was to do it to it for compressible elements<br> <emilio> fantasai: no, because you are saying to do it only for compressible elements and I'm suggesting to do it for all elements with a-r<br> <emilio> iank_: if I change my suggestion then it agrees right?<br> <emilio> fantasai: [missed]. It'd be more consitent if we only clamp the transferred size. If we do clamp AMS if you have an aspect-ratio then it changes behavior<br> <emilio> iank_: if a replaced element has an intrinsic size I don't think that we'll want to respect that in this case<br> <emilio> ... if you have width 100%<br> <emilio> ... that'd break the person's initial issue, the intrinsic size was actually quite large<br> <emilio> fantasai: in that case I wonder if that should depend on whether they're compressible. Clamp transferred size always, clamp content-based size if it's compressible<br> <emilio> iank_: why not do it for both then?<br> <emilio> fantasai: mainly because it means that aspect-ratio affects sizing in an axis where it'd otherwise not have any effect<br> <emilio> ... I don't have an objection but it's a bit weird<br> <Rossen_> q?<br> <emilio> ... if you apply an aspect-ratio to a div where we apply the content size, then it'd clamp to zero<br> <fantasai> s/clamp/suddenly clamp/<br> <emilio> Rossen_: can we go back to the previous proposal, to make it apply to all elements?<br> <emilio> ... we can try to constrain later if we have strong reasons to<br> <emilio> fantasai: I think we may have problems if we try to apply to all elements<br> <emilio> Rossen_: this is something we should be able to figure out quite quickly<br> <emilio> iank_: I think we can do the change for compressible and a-r elements quite easily. I need to think about non-replaced elements with a-r inside an auto-sized thing, dunno how to implement that yet<br> <TabAtkins> ian, let's do a video chat about this soon<br> <emilio> Rossen_: so, let's start with compressible, would that work?<br> <iank_> sure<br> <emilio> fantasai: I think my preferred suggestion would be all elements, but if we can't we should do it for compressible elements, do it for transferred and content size, and for a-r elements just the transferred size<br> <emilio> Rossen_: not opposed, but it's weird to make special elements more and more special, specially if the behavior is useful for all elements<br> <emilio> ... so I'd prefer to pursue that if possible<br> <tantek> +1 agreed with Rossen_<br> <tantek> and with that methodology in general<br> <emilio> fantasai: I'm fine with all elements, but if not I prefer the suggestion above, I think it's the closest<br> <emilio> Rossen_: can we resolve on all elements and if you come back with strong reasons why it doesn't work we can consider the other suggestion<br> <emilio> iank_: when we say all elements we mean all elements with a-r?<br> <emilio> fantasai: we meant all elements<br> <fantasai> s/fantasai/rossen/<br> <emilio> iank_: That's a very big change, I don't think that'd be ok<br> <emilio> fantasai: I'm also skeptical about that<br> <emilio> Rossen_: so should we resolve on compressible elements + a-r?<br> <emilio> fantasai: [explains her suggestion again]<br> <emilio> Rossen_: sounds reasonable, other comments / objections?<br> <Rossen_> s/a-r/aspect-ratio/<br> <fantasai> proposal: clamp automatic minimum size of compressible elements, and the transferred size suggestion of non-compressible aspect-ratio elements<br> <tantek> sounds reasonable to limit to those elements<br> <fantasai> RESOLVED: clamp automatic minimum size of compressible elements, and the transferred size suggestion of non-compressible aspect-ratio elements<br> <fantasai> fantasai: Thanks everyone. That was a complicated issue, and I understood it better by talking it through with all of you.<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/6278#issuecomment-896986632 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 11 August 2021 16:49:55 UTC