<anchor-size>
A function that retrieves the width or height of the anchor element. It's incredibly useful for making a popup or menu match the exact dimensions of the button that triggered it.
Syntax
/* Usage Example */
.tooltip {
/* Makes the tooltip exactly as wide as its anchor */
width: anchor-size(width);
position: absolute;
}
<anchor-size> 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+