Inset
Position an element relative to its edges.
The inset property (historically top, right, bottom, left) defines the offsets for positioned elements. Its behavior depends on the position property.
Properties
inset is a helper property in Taffy (and CSS shorthand) that sets:
| Property | Description |
|---|---|
top | Distance from the top edge. |
bottom | Distance from the bottom edge. |
left | Distance from the left edge. |
right | Distance from the right edge. |
Behavior
- For
Position.Absolute: Offsets are relative to the nearest positioned ancestor. - For
Position.Relative: Offsets move the item relative to its normal position in the flow.
Example
Loading Preview…