position-anchor
Specifies which defined anchor element a positioned element should track. It connects the positioned element to its anchor by name.
It is documented as part of the CSS Anchor Positioning specification.
Syntax
/* Usage Example */
.tooltip {
position: absolute;
/* Links this tooltip to an element with 'anchor-name: --my-btn' */
position-anchor: --my-btn;
top: anchor(bottom);
}
/* Syntax */
position-anchor: auto;
position-anchor: none;
/* Global values */
position-anchor: inherit;
position-anchor: initial;
position-anchor: revert;
position-anchor: revert-layer;
position-anchor: unset;
position-anchor Browser support
Limited availability
Since
2020 77% global usage
This feature is not Baseline because it does not work in some of the most widely-used browsers.
125+
125+