Skip to content

[css-sizing-4] Decimals in intrinsic sizes  #4009

Closed
@scottkellum

Description

@scottkellum

[https://drafts.csswg.org/css-sizing-4/#aspect-ratio](CSS Sizing 4, Aspect Ratio)

The spec looks like it currently requires values to be written in fraction format: aspect-ratio: 1/1

It would be nice to be able to write these as decimals or integers as well. For example, 1/1 can be simplified to 1. So aspect-ratio: 1 would be valid as well.

.square {
  aspect-ratio: 1/1;
  aspect-ratio: 1;
}

.double-wide {
  aspect-ratio: 2/1;
  aspect-ratio: 2;
}

.golden-ratio {
  aspect-ratio: 1.618;
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions