v157 · css · anchor positioning

Validity probe

Every position-visibility value, probed two ways in this browser: CSS.supports(), and whether the declaration survives being set on a real element. A value the parser drops leaves no trace in style.cssText — that is how you tell a genuinely-absent value from one that parses but does nothing.

Probing this browser…

Value support matrix

position-visibility values and whether this browser supports them
valueCSS.supports()declaration retainedstatus

Apply to a live anchored tooltip

Each button sets position-visibility on the tooltip below and reads back the computed value. A dropped value leaves the previous one in place — the readout says which.

anchor anchored tooltip
No value applied yet.

what the probe is testing

// Not enough on its own: a browser can return false for a value it
// simply does not know, which is the same answer as "not a value".
CSS.supports("position-visibility", "anchor-valid");

// The stronger check — set it and see whether the parser kept it:
const el = document.createElement("div");
el.style.setProperty("position-visibility", "anchor-valid");
el.style.getPropertyValue("position-visibility"); // "" if dropped

Both probes name the exact property and value from the spec. Neither infers support from a related feature such as anchor-name, which this browser does support — anchor positioning shipping does not imply position-visibility shipping, and the matrix above shows them diverging.

see also