- From: davidsgrogan via GitHub <sysbot+gh@w3.org>
- Date: Mon, 02 Nov 2020 22:44:09 +0000
- To: public-css-archive@w3.org
Actually, I think the case I posted in the last comment is controlled by https://www.w3.org/TR/CSS2/visudet.html#min-max-widths, is it not? I.e. Start with ```html <img src="https://placekitten.com/300/300" style="max-height:50px; width: max-content;"> ``` 1. https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes dictates its width of to be the width of ```html <div style="width: 9999"><img src="https://placekitten.com/300/300" style="max-height:50px; float: left;"> ``` 2. which https://www.w3.org/TR/CSS2/visudet.html#float-replaced-width defines to be the width of ```html <div style="width: 9999"><img src="https://placekitten.com/300/300" style="max-height:50px;"> ``` 3. Which https://www.w3.org/TR/CSS2/visudet.html#inline-replaced-width dictates is 300 because of > If 'height' and 'width' both have computed values of 'auto' and the element also has an intrinsic width, then that intrinsic width is the used value of 'width'. So, as of here the used width is 300. 4. But then in applying the `max-height` https://www.w3.org/TR/CSS2/visudet.html#min-max-heights says > for replaced elements with both 'width' and 'height' computed as 'auto', use the algorithm under [Minimum and maximum widths](https://www.w3.org/TR/CSS2/visudet.html#min-max-widths) above to find the used width and height. 5. For [Minimum and maximum widths](https://www.w3.org/TR/CSS2/visudet.html#min-max-widths), the 3rd line of the table, _h > max-height_, applies. Using its rules of `resolved width = max(max-height * w/h, min-width)` and `resolved height = max-height`, used width = used height = 50. Where did I go wrong? -- GitHub Notification of comment by davidsgrogan Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5583#issuecomment-720766799 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Monday, 2 November 2020 22:44:10 UTC