Re: [csswg-drafts] [css-sizing-4] Should we mention aspect-ratio in margin collapsing? (#5328)

The CSS Working Group just discussed `. [css-sizing-4] Should we mention aspect-ratio in margin collapsing?`, and agreed to the following:

* `RESOLVED: Non-0 height as a result of aspect-ratio disables margin collapsing between top and bottom`

<details><summary>The full IRC log of that discussion</summary>
&lt;dael> Topic:. [css-sizing-4] Should we mention aspect-ratio in margin collapsing?<br>
&lt;dael> github: https://github.com/w3c/csswg-drafts/issues/5328<br>
&lt;dael> fantasai: Question was let's say there's an aspect-ratio and the width is 0 so height is therefore 0<br>
&lt;dael> fantasai: Should that trigger margin-collapsing between top and bottom margin of box<br>
&lt;dael> fantasai: In CSS 2 top and bottom margins of box with 0 computed height and no inflow children.<br>
&lt;dael> fantasai: a-r does not cause computed height to be 0, it's auto.<br>
&lt;dael> fantasai: Question that came up was if the used value is 0 should it be the same was computed value is 0<br>
&lt;dael> fantasai: In CSS 2 there's no way to get 0 used height that doesn't fall into this category. If we change computed to used in CSS 2 nothing changes. BUt not lot sof ways for used height of 0 where it's not computed 0. margin-collapsing could be changed to based on used. BUt do we want to?<br>
&lt;dael> fantasai: Based on emilio comment and others in issue it seems like Chrome is using used value. Seems their a-r impl collapsed but MOzilla wants to use computed<br>
&lt;dael> iank_: We use used heights and it falls out straight forward. It sort of makes sense to do in light of everything else<br>
&lt;dael> florian: If a-r is the only thing causing top and bottom margin to not be adjacent is that question solved?<br>
&lt;dael> fantasai: Good point. a-r causes height to be 1px. That should not cause top and bottom to collapse.<br>
&lt;dael> fantasai: For continuity it would be weird if 1px does not but 0px does<br>
&lt;dael> iank_: Same as height 0px<br>
&lt;dael> AmeliaBR: I think the most important case is it's clearly defined that and auto height that's definite b/c a-r is treated as a definite height for margin-collapsing. I don't know if we need to special case a-r width:0 and therefore height:0.<br>
&lt;dael> AmeliaBR: For basic case of empty element with a-r there's no way we can collapse margin through something with definite height<br>
&lt;dael> florian: I don't think people have strong idea of if they should collapse. But when margins are not visually next to each other people are clear it should not collapse. Make sure that's true and then we can be sensible about habdling 0 b/c people don't have expectations<br>
&lt;dael> fantasai: Difference expectations from different impl. My take is it was a mistake for height0px and height:1px to have different behaviors. Adding more cases that do that is not good. So I would lean toward saying it should not collapse if a-r takes effect<br>
&lt;dael> iank_: Don't agree. Rule is simple at the moment. If used height is 0 margins collapse through<br>
&lt;dael> fantasai: Spec says computed<br>
&lt;dael> iank_: Previously that was the same<br>
&lt;dael> fantasai: Back to css 2.0<br>
&lt;dael> iank_: We had to do 0 work to get this to work correctly. It falls out from what happens if you set height:0 on an element<br>
&lt;dael> fantasai: I don't think we have anyone from Mozilla. I think their input is important<br>
&lt;fantasai> s/anyone from Mozilla/emilio or dbaron from Mozilla/<br>
&lt;dael> heycam: dholbert and I are here. I have not looke dat margin collapsing much.<br>
&lt;dael> dholbert: I have not recently<br>
&lt;dael> Rossen_: If we have concrete prop everyone agrees on we can resolve and when dbaron and emilio read we can revisit. Do we have consensus?<br>
&lt;dael> florian: I don't think we do<br>
&lt;dael> Rossen_: Then it's fine to postpone for another week until emilio is here<br>
&lt;dael> florian: We have consensus on if it's non-0 the margins don't collapse. I don't think anyone disagrees with that.<br>
&lt;dael> Rossen_: That's good. I'd like to resolve on that one<br>
&lt;dael> fantasai: Prop: Non-0 height as a result of aspect-ratio disables margin collapsing between top and bottom<br>
&lt;dael> Rossen_: Behaves similar to fixed height<br>
&lt;dael> florian: I think just the result. If it's non-0 due to aspect ratio it does not collpase. Why we'll get to later<br>
&lt;dael> Rossen_: Additional thoughts or objections?<br>
&lt;dael> RESOLVED: Non-0 height as a result of aspect-ratio disables margin collapsing between top and bottom<br>
&lt;dael> Rossen_: Any additional progress or back to GH?<br>
&lt;dael> fantasai: Back to GH. I think having people from Mozilla who are familiar with this code is important. It's a complex part of layout so people have opinions<br>
&lt;dael> Rossen_: Agree. Just looking for other low hanging fruit<br>
</details>


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


-- 
Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config

Received on Wednesday, 5 August 2020 23:29:16 UTC