- From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
- Date: Mon, 27 Jul 2020 22:29:52 +0000
- To: public-css-archive@w3.org
The CSS Working Group just discussed `[css-sizing] Import aspect-ratio from child image`. <details><summary>The full IRC log of that discussion</summary> <dael> Topic: [css-sizing] Import aspect-ratio from child image<br> <dael> github: https://github.com/w3c/csswg-drafts/issues/5269<br> <dael> TabAtkins: Two big use cases people run into that make a-r not work how they want<br> <dael> TabAtkins: In block layout if you have image with a-r and wrapper doesn't effect, but in flexbox or grid there is special code that is defeated by wrapper. Incl link or picture element which are common<br> <dael> TabAtkins: Req is for a parent element to get a-r from child but only if it has a single child with a-r. In all other cases acts like a-r none<br> <dael> TabAtkins: I don't think needs to grab other intrinsic sizes, but we can think about that. Flexbox only cases about ratio.<br> <dael> TabAtkins: Some unanswered questions. What do you want to do with m/b/p which change render size<br> <dael> TabAtkins: We can probably resolve in futher issues<br> <AmeliaBR> q+<br> <emilio> q+<br> <dael> TabAtkins: General case to pull a-r from single child do people think this is reasonable?<br> <cbiesinger> q+<br> <Rossen_> ack fantasai<br> <Zakim> fantasai, you wanted to ansewr that and to<br> <dael> fantasai: Not sure we want to take from an only child. A lot of cases where we pull something like this where you grab first child. Whatever we do for grab info from child should be conssitent. Not sure it should be check for only one child<br> <dael> TabAtkins: I don't think svg is useful for examples b/c it doesn't have layout. Further children don't effect. In this case if you have an element with image and fit caption if you take from image it's meaningless<br> <dael> fantasai: You can have positioned caption on top of picture which makes sense<br> <dael> TabAtkins: One inflow child than<br> <dael> AmeliaBR: That's my point, one inflow child for case of figure with caption on top of image.<br> <dael> AmeliaBR: I'm not sure what fantasai was thinking on svg but I can't think of a case where it gets a-r from children. SVG in a CSS layout having these behaviors is useful<br> <dael> fantasai: Not specifically a-r. I think some property in svg grabs info from children<br> <Rossen_> ack AmeliaBR<br> <dael> AmeliaBR: title and description?<br> <dael> AmeliaBR: Either way, need to think about would it be web compat to make this default change? We have lots of flex and grid layouts where if this was available authors would have loved but they have made adjustments and doing by default is problem<br> <dael> AmeliaBR: Could make keyword for a-r property. On you picture element have an a-r from content that would have this special behavior<br> <dael> AmeliaBR: If it's web compat to make it default where if you have one inflow child with an a-r container is a-r it would be great to be automatic.<br> <dael> TabAtkins: I strongly suspect its not web compat. I'd like to run on that assumption that this is specific property. an a-r keyword that does it<br> <dael> fantasai: Or some new syntax<br> <dael> fantasai: new keyword or something else<br> <Rossen_> ack emilio<br> <dael> emilio: I was going to say behavior will be weird with applied whitespace. Children create boxes which can be collapsed or suppressed but htat's optimization. Bit weird that whitespace around image this trick doesn't work<br> <dael> TabAtkins: How weird if we did ignore collapsed whitespace<br> <dael> emilio: Somewhat. I don't have strong opinions. Direction with single box is odd.<br> <dael> fantasai: I would have said first child element<br> <dael> Rossen_: In doc order?<br> <dael> emilio: Right<br> <dael> fantasai: Yes<br> <dael> TabAtkins: If you take first child element it exculdes text. Non-whitespace text would be ignored too so should trigger no a-r<br> <AmeliaBR> So… if the container has exactly one in-flow, non-collapsed-ws child box…, then `aspect-ratio: from-contents` works<br> <Rossen_> ack cbiesinger<br> <fantasai> I think we can let the author not specify the keyword if there's other content they want to ignore<br> <dael> cbiesinger: I'm also concerned it's a lot of magic. A lot like emilio comments<br> <dael> cbiesinger: Have to be careful to not add something that will break this<br> <dael> cbiesinger: Use cases I've heard from webdev is they wanted a-r and they were happy. Didn't ask for this<br> <dael> cbiesinger: Final, picture elmenet should probably take a-r from img tag<br> <dael> TabAtkins: I don't think just a-r is usable b/c of picture. Different source could provide different a-r and you can't easily predict<br> <heycam> in SVG we did at one point discuss allowing properties that refer to elements by URL to have a "from-child" or something keyword, e.g. so you could do <path style="marker-end: from-child"><marker>. but that didn't really go anywhere beyond an idea. (might be fantasai is thinking about this)<br> <dael> cbiesinger: Getting a-r from child makes most sense<br> <dael> TabAtkins: Don't see reasont o differentiate between picture and a. Picture into link is common and easy and I would prefer it didn't break layout<br> <dael> cbiesinger: Careful about lin breaks between a and img<br> <dael> TabAtkins: Unless we do something about collasable whitespace<br> <dael> fantasai: Collapsable whitespace doesn't generat box right?<br> <dael> emilio: Maybe. In Gecko we don't when we can prove it doesn't have to. But we need to deal with it.<br> <Rossen_> q?<br> <dael> TabAtkins: Unsure if it's clear if box is generated.<br> <dael> fantasai: If it did it would interrupt margin collapsing.<br> <dael> TabAtkins: Yeah, okay. Great observation. In that we observe this with margin collapising shoudl be able to observe without being particularly weird<br> <dael> Rossen_: Looking through issue this is mostly to introduce and feel room<br> <dael> Rossen_: Sounds like some level of anxiety but also use cases which are supported.<br> <dael> Rossen_: What's next step? Work more for concrete proposal?<br> <dael> TabAtkins: I was seeking if objections. Info is useful. We can put a proposal in spec and bring it to WG<br> <dael> Rossen_: Anything else on this?<br> </details> -- GitHub Notification of comment by css-meeting-bot Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5269#issuecomment-664670732 using your GitHub account
Received on Monday, 27 July 2020 22:29:54 UTC