inset
A modern shorthand property that sets the distance between an element and its parent container. It's much faster than writing out 'top', 'right', 'bottom', and 'left' separately.
It is documented as part of the CSS Logical Properties and Values, CSS Positioned Layout specification.
Syntax
/* Usage Example */
.full-screen-overlay {
position: fixed;
inset: 0;
/* stretches the element to fill the entire screen */
}
/* Syntax */
inset: top;
/* Global values */
inset: inherit;
inset: initial;
inset: revert;
inset: revert-layer;
inset: unset;
inset Browser support
Widely available
Since
2021 95% global usage
This feature is well established and works across many devices and browser versions. It has been available across browsers since 2021.
87+
66+
14.1+
87+