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.
Value support matrix
| value | CSS.supports() | declaration retained | status |
|---|
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.
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.