Skip to content

Feature request: Add @position-try allowed properties list #1769

@lifeiscontent

Description

@lifeiscontent

Summary

The @position-try at-rule currently shows an empty descriptors array in the webref data. It would be helpful to have the list of properties allowed within @position-try rules.

Current State

{
  "name": "@position-try",
  "descriptors": [],
  ...
}

Use Case

CSS-in-JS libraries and CSS validators need to know which properties are valid inside @position-try rules to provide proper validation and autocomplete.

Proposed Enhancement

Populate the descriptors array with the allowed properties:

{
  "name": "@position-try",
  "descriptors": [
    { "name": "position-anchor", ... },
    { "name": "position-area", ... },
    { "name": "top", ... },
    { "name": "right", ... },
    { "name": "bottom", ... },
    { "name": "left", ... },
    { "name": "inset", ... },
    { "name": "inset-block", ... },
    { "name": "inset-inline", ... },
    { "name": "margin", ... },
    { "name": "width", ... },
    { "name": "height", ... },
    { "name": "align-self", ... },
    { "name": "justify-self", ... },
    ...
  ]
}

Reference

Per the CSS Anchor Positioning spec, @position-try accepts:

  • Inset properties (top, right, bottom, left, inset, inset-block, inset-inline, etc.)
  • Margin properties
  • Sizing properties (width, height, min-, max-, block-size, inline-size, etc.)
  • Self-alignment properties (align-self, justify-self, place-self)
  • position-anchor, position-area

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