v150 · CSS · Feature Detection
Anchor-position Feature Flag
@supports named-feature(anchor-position-follows-transforms) is the first real-world named feature defined by the spec. Test it in this browser, see what it means for anchor-positioned elements, and compare CSS vs JavaScript probing.
move the anchored target
Press move to transform the blue anchor. In browsers that support transform-aware anchor positioning, the popover remains centered below the anchor; without that named feature, the readout exposes any drift between the transformed anchor box and the positioned popover.
/* CSS approach */
@supports named-feature(anchor-position-follows-transforms) {
/* Enhanced: use transform-aware anchor positioning */
.tooltip {
position-anchor: --my-anchor;
top: anchor(bottom);
/* this will track correctly through transforms */
}
}
/* JavaScript approach */
const supported = CSS.supports(
'named-feature(anchor-position-follows-transforms)'
);
if (supported) {
/* opt into transform-tracking anchor layout */
}
what this feature means
anchor-position-follows-transforms is a named feature flag indicating whether this browser's anchor-positioning implementation correctly tracks anchor elements through CSS transform and will-change: transform changes. Without this support, an anchor-positioned tooltip may drift away from its anchor when the anchor is transformed (e.g. animated via CSS). With support, the positioned element recomputes its coordinates after transforms are applied, so the tooltip stays glued to its anchor regardless of animation.
see also
- Feature Query Explorer — all @supports condition types
- Compound Condition — named-feature() with and/or/not
- Progressive Enhancement — layout using the named feature
- ChromeStatus entry
- CSS Conditional Rules Level 5 named-feature() syntax
implementation reference
Need the exact API surface, compatibility boundaries, errors, lifecycle, and source links? Read the matching gendn reference ↗