v157 · css · anchor positioning

Alias probe

If the plural spellings are aliased to the singular ones, that is observable: set anchors-visible, read the value back, and see which spelling comes out. An alias serialises as its canonical form. This page checks all four values, in both directions, in whatever browser you are running.

Probing this browser…
Running the alias test…

Per-value results

Each position-visibility spelling, whether it parses, and what it serialises back as
declared parsed serialised back as aliased?

Try a spelling by hand

Type any value and see exactly what the parser does with it — including values that do not exist, so you can see what “dropped” looks like.

Nothing tested yet.

how the probe works

const el = document.createElement("div");
el.style.setProperty("position-visibility", "anchors-visible");

// Dropped entirely? The parser does not know this value.
const parsed = el.style.getPropertyValue("position-visibility");

// Parsed, but comes back as something else? It is an ALIAS:
// the browser canonicalised it to the name it prefers.
const aliased = parsed && parsed !== "anchors-visible";

This is a stronger test than CSS.supports() alone, which answers “would you accept this?” but not “what do you call it?”. The rename is precisely a question about naming, so the round-trip is the check that matters.

see also