W3C home > Mailing lists > Public > public-css-archive@w3.org > May 2021

Re: [csswg-drafts] [css-sizing] Removing intrinsic aspect-ratio from an image (#6257)

From: CSS Meeting Bot via GitHub <sysbot+gh@w3.org>
Date: Wed, 26 May 2021 16:25:18 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-848915622-1622046316-sysbot+gh@w3.org>
The CSS Working Group just discussed `[css-sizing] Removing intrinsic aspect-ratio from an image`.

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic: [css-sizing] Removing intrinsic aspect-ratio from an image<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/6257<br>
&lt;dael> TabAtkins: If miriam isn't on I can take it<br>
&lt;dael> miriam: I was playing with images in a grid. Wanted to be able to remove a-r and use object:position and fit to have it fit without contributing to grid sizing. I thought a-r:none would be a way to do that<br>
&lt;dael> TabAtkins: Makes sense<br>
&lt;dael> iank_: Made a comment on GH just now. contain:size does it todya. a-r:none might not be best b/c won't clear out natural size of image. Could fallback to 300x150 which might still contribute. Want to be cognizant of that<br>
&lt;dael> Rossen_: Is that behavior of sizing today which is based on actual size and that's how you infer the a-r?<br>
&lt;dael> iank_: Yes, it's subtle. image has a-r and natural size. a-r:none would 0 out the a-r. Wouldn't 0 out natural size and that may still contriute to grid area. contain:size does both, null hte a-r and set the natural size to 0.<br>
&lt;dael> iank_: If the use case if we want both we've got contain:size to do that<br>
&lt;dael> Rossen_: Isn't prop only to remove a-r and not the size an image contributes to the grid area if being sized for its contribution to the sizing algo? Question to miriam<br>
&lt;dael> miriam: I think my goal was to remove any size contribution so might be more what contain:size does. a-r is what I assume would allow me to remove it<br>
&lt;dael> Rossen_: I think a-r willl only remove 2:1 or whatever it happens to be. Height might be different than expect. 2x1 grid where first cell is image and that image contributes a width. Auto height and not natural intrinisic height.<br>
&lt;dael> Rossen_: Let's say image has 100w x 50h. a-r by sizing algo computes as 2:1. We can say this is ignored but then your height can be changed by sizing algo based on second cell.<br>
&lt;dael> Rossen_: Subtle difference. not discounting that a-r:none will still be effective and useful. Certainly what you're looking for is contain:size to not have any contribution<br>
&lt;dael> miriam: Okay<br>
&lt;dael> Rossen_: I guess issue boils down to do we have enough use cases to justify a-r:none by itself<br>
&lt;TabAtkins> Actually now I'm confused as to what 'aspect-ratio: 1/1' does to the natural sizes of an image with 300x150 size :/<br>
&lt;dael> Rossen_: I see TYLin linked another issue discussing this which was closed<br>
&lt;dael> emilio: Another tricky thing. Object:fit doensn't interact well with containment<br>
&lt;dael> miriam: Seeing that in my demo. Trying to add contain:size<br>
&lt;dael> [everyone silently experiments]<br>
&lt;dael> Rossen_: Back to the proposal. a-r:none the way you described the anticipated behavior is more than a-r:none. I think we agree on that for this use case<br>
&lt;dael> Rossen_: First quesiton is what is the best wya to achieve intended behavior. Second question is does a-r:none make sense in other use cases. If we need more time we can revisit next week<br>
&lt;dael> miriam: Works for me<br>
&lt;dael> Rossen_: Any other comments? I think we've captured enough feedback and lines of thought<br>
&lt;dael> Rossen_: if there's findings to have a-r:none we can bring it back<br>

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

Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Wednesday, 26 May 2021 16:25:21 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:42:33 UTC