Re: [csswg-drafts] [css-sizing-4] Does aspect-ratio work on the content box or the border box? (#4007)

The CSS Working Group just discussed `Aspect Ratio`, and agreed to the following:

* `RESOLVED: Explicit a-r applies to whichever box the box-sizing property specifies.`

<details><summary>The full IRC log of that discussion</summary>
&lt;TabAtkins> Topic: Aspect Ratio<br>
&lt;TabAtkins> fantasai: Question was, does aspect-ratio affect the calculations for content-box or border-box? Good question.<br>
&lt;TabAtkins> fantasai: Images, intrinsic aspect ratio always affects the content box; to do otherwise would screw up the iamge.<br>
&lt;TabAtkins> fantasai: But for non-replaced elements, not a great answer; often you want to a-r the border box, as that's the visible bounds of the element.<br>
&lt;TabAtkins> fantasai: As a reminder, a-r has two values, "auto" which means there's no a-r unless you're a replaced element with an intrinsic ratio...<br>
&lt;TabAtkins> fantasai: So our proposal is that with "auto" the intrinsic ratio is used, so we only affect the content box.<br>
&lt;TabAtkins> fantasai: But if you give an explicit ratio, it affects whihicever box box-sizing says.<br>
&lt;leaverou> q+<br>
&lt;dbaron> sounds good to me<br>
&lt;TabAtkins> AmeliaBR: I want to read this carefully and see how it compares with how SVG behaves.<br>
&lt;TabAtkins> AmeliaBR: I think your proposal is a good default.<br>
&lt;leaverou> q-<br>
&lt;heycam> github: https://github.com/w3c/csswg-drafts/issues/4007<br>
&lt;TabAtkins> AmeliaBR: I might come back with a request to be able to specify the box for the aspect ratio separate from box-sizing box.<br>
&lt;TabAtkins> AmeliaBR: So might want to set the width of an element's border box, but still set a-r of the content box.<br>
&lt;TabAtkins> florian: You want to investigate how much that idea would be needed?<br>
&lt;TabAtkins> AmeliaBR: Yeah, I think fantasai's proposal will cover most cases. Might just need an addition.<br>
&lt;TabAtkins> Rossen_: Unfortunate thing is there will be yet another % resolution that'll by cyclic.<br>
&lt;TabAtkins> TabAtkins: It won't be a new one.<br>
&lt;TabAtkins> AmeliaBR: a-r didn't use a %...<br>
&lt;TabAtkins> Rossen_: Padding can be a % which is affected by the width which is affected by the height which is affected by the width...<br>
&lt;TabAtkins> Rossen_: But let's go with it and see how it goes.<br>
&lt;TabAtkins> fantasai: So do we want to accept the proposal?<br>
&lt;TabAtkins> AmeliaBR: Already pushed a draft?<br>
&lt;TabAtkins> fantasai: Yeah, and think there's a disposition of changes.<br>
&lt;TabAtkins> Rossen_: Any objections?<br>
&lt;TabAtkins> RESOLVED: Explicit a-r applies to whichever box the box-sizing property specifies.<br>
&lt;tantek> +1<br>
</details>


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

Received on Thursday, 6 June 2019 13:31:12 UTC