[css-sizing-4] Aspect ratio supplying the missing intrinsic size axis is weird
Nobody has claimed this yet.
- Dominant language
- Bikeshed
- Stars
- 4.9k
- Forks
- 816
- PR merge metrics
- PR metrics pending
Description
https://drafts.csswg.org/css-sizing-4/#aspect-ratio
If a replaced element’s only intrinsic dimension is an intrinsic width or an intrinsic height, giving it a preferred aspect ratio also gives it an intrinsic height or width, whichever was missing, by transferring the existing size through the preferred aspect ratio.
This is different from how an intrinsic aspect ratio behaves. For example, <svg viewBox="0 0 1 1" width="100" /> will not have an intrinsic height, but <img src='data:image/svg,<svg viewBox="0 0 1 1" width="100" />' style='aspect-ratio: 1/1'> will have an intrinsic height per the spec. This seems weird?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Read the linked CSS Sizing Level 4 aspect-ratio section and compare its preferred-aspect-ratio rule with the SVG and img examples in the report. Determine whether the intrinsic-size transfer behavior is intended, and make the specification's resolution or rationale explicit in that section.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- css
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100