Skip to content

Add intrinsic-w and instrinsic-h #5045

@jods4

Description

@jods4

Clear and concise description of the problem

UnoCSS supports intrinsic-size-{size} for contain-intrinsic-size: {size}.

This is a limited access to that CSS feature, as "-size" defines both the width and height.
It's useful to specify the intrinsic size in a single direction only; having width and height variants feel natural and consistent with other size properties.

Suggested solution

Add support for
intrinsic-w-{size} --> contain-intrinsic-width: {size}
intrinsic-h-{size} --> contain-intrinsic-height: {size}

Maybe also -inline- and -block- for exhaustiveness? margin- has them for example.

Alternative

Users define their own rules

Additional context

https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/contain-intrinsic-width

Validations

  • Read the Contributing Guidelines.
  • Read the README.md of using the package.
  • Already used the Interactive Docs.
  • Check that there isn't already an issue that request the same feature to avoid creating a duplicate.

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