A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://github.com/w3c/csswg-drafts/issues/5151 below:

[css-sizing-4] Should aspect-ratio be used for abspos `top: 0; bottom: 0;`? · Issue #5151 · w3c/csswg-drafts · GitHub

https://drafts.csswg.org/css-sizing-3/#intrinsic-sizes
https://drafts.csswg.org/css-sizing-4/#aspect-ratio

In this code:

<div style="width: 500px; height: 100px; position: relative;">
  <div style="background: green; aspect-ratio: 1/1; position: absolute; left: 0; top: 0; bottom: 0;"></div>

Should the width be computed using the aspect-ratio, since top and bottom establish a size that could be used?

Note that the first link says not to:

For boxes with an intrinsic aspect ratio, but no intrinsic size:
If the available space is definite in the inline axis, use the stretch fit into that size for the inline size and calculate the block size using the aspect ratio.


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4