8000 [css-sizing] Removing intrinsic aspect-ratio from an image · Issue #6257 · w3c/csswg-drafts · GitHub
[go: up one dir, main page]

Skip to content

[css-sizing] Removing intrinsic aspect-ratio from an image #6257

@mirisuzanne

Description

@mirisuzanne

The current specification for aspect-ratio allows explicit ratios, or the "natural" aspect ratio from a replaced element. But there is not currently any explicit way to remove the natural aspect ratio from replaced elements.

In grid & flexbox context, it is often useful to remove the natural ratio of an image, apply object-* properties, and allow the images to stretch in whatever space is available or defined by the grid-template. Currently, I'm not sure there's a way to do it without adding a wrapper, and using absolute position.

It seems like we should be able to do this with something like aspect-ratio: none?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0