| Class | Description | |
|---|---|---|
aspectSets aspect-ratio via --aspect. E.g. 16/9, 4/3. CSS Rules Usage
The .aspect
class is flagged as a value-driven selector.
The variable --aspect is required. Responsive
Prefix
States
States are generated dynamically at runtime and always
come last. Append a state like
Supported pseudo-classes: Group Hover Example
The Pseudo-Elements
The Shorthand
Value-driven classes support a shorthand syntax like CLS Alert
This feature may cause CLS (Cumulative Layout
Shift). Make sure to include a
| .aspect | Sets aspect-ratio via --aspect. E.g. 16/9, 4/3. |
aspect-squareSets aspect-ratio: 1 / 1. CSS Rules Usage Responsive
Prefix
States
States are generated dynamically at runtime and always
come last. Append a state like
Supported pseudo-classes: Group Hover Example
The Pseudo-Elements
The | .aspect-square | Sets aspect-ratio: 1 / 1. |
aspect-videoSets aspect-ratio: 16 / 9. CSS Rules Usage Responsive
Prefix
States
States are generated dynamically at runtime and always
come last. Append a state like
Supported pseudo-classes: Group Hover Example
The Pseudo-Elements
The | .aspect-video | Sets aspect-ratio: 16 / 9. |
aspect-autoResets aspect ratio to auto so sizing follows intrinsic content and constraints. CSS Rules Usage Responsive
Prefix
States
States are generated dynamically at runtime and always
come last. Append a state like
Supported pseudo-classes: Group Hover Example
The Pseudo-Elements
The | .aspect-auto | Resets aspect ratio to auto so sizing follows intrinsic content and constraints. |