W3C home > Mailing lists > Public > public-css-archive@w3.org > June 2020

[csswg-drafts] [css-sizing-4] How does a max-height affect the inline size computed through an aspect ratio (#5257)

From: Christian Biesinger via GitHub <sysbot+gh@w3.org>
Date: Wed, 24 Jun 2020 23:21:24 +0000
To: public-css-archive@w3.org
Message-ID: <issues.opened-645038071-1593040882-sysbot+gh@w3.org>
cbiesinger has just created a new issue for https://github.com/w3c/csswg-drafts:

== [css-sizing-4] How does a max-height affect the inline size computed through an aspect ratio ==

The title is not very descriptive, sorry -- I couldn't think of a succinct way to describe the issue. Basically:

  <div style="aspect-ratio: 1/1; max-height: 50px; font: 10px/1 Ahem; float: left;">
    XX XXX <!-- max-size 60px, min-size: 30px -->
So we have shrink-to-fit sizing in the inline axis and an aspect ratio size in the block axis. Since we have a lot of space, inline size is 60px (max intrinsic size), and height is 60px.

BUT, max-height is 50px. Should we:
- Clamp max-height to 50px and recompute the inline size based on that (here, 50px), like we do for <img>?

- Not do this complex thing and just let this be sized to 60x50?

Additional question if we do option one: Should min-block-size be taken into account too? If yes, auto should probably resolve to 0 for the purpose of inline sizing.

cc @bfgeek @fantasai 

Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/5257 using your GitHub account
Received on Wednesday, 24 June 2020 23:21:25 UTC

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