- From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
- Date: Tue, 09 Aug 2022 12:53:45 +0000
- To: public-css-archive@w3.org
Loirooriol has just created a new issue for https://github.com/w3c/csswg-drafts: == [css-contain] Does inline-size containment remove the natural aspect ratio? == From https://drafts.csswg.org/css-contain-2/#containment-size, with full size containment, > [Replaced elements](https://drafts.csswg.org/css-display-3/#replaced-element) must be treated as having an [natural](https://drafts.csswg.org/css-images-3/#natural-dimensions) width and height of 0 and no [natural aspect ratio](https://drafts.csswg.org/css-images-3/#natural-aspect-ratio). From https://drafts.csswg.org/css-contain-3/#containment-inline-size, > Giving an element inline-size containment applies [size containment](https://drafts.csswg.org/css-contain-2/#size-containment) to the [inline-axis](https://drafts.csswg.org/css-writing-modes-4/#inline-axis) sizing of its [principal box](https://drafts.csswg.org/css-display-3/#principal-box). This means the inline-axis [intrinsic sizes](https://drafts.csswg.org/css-sizing-3/#intrinsic-size) of the principal box are determined as if the element had no content. However, content continues to impact the box’s [block-axis](https://drafts.csswg.org/css-writing-modes-4/#block-axis) intrinsic sizes as usual, and the box is allowed to [fragment](https://drafts.csswg.org/css-break-3/#fragmentation) normally in the block axis. I guess this means that online the natural inline-size is treated as 0, the natural block-size is preserved. But what about the aspect ratio? Blink keeps it, Firefox removes it like in full size containment. ```html <img src="image" style="contain: inline-size; border: solid; height: 100px"> ``` Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/7583 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Tuesday, 9 August 2022 12:53:47 UTC