demo · v136

raw-string Tester

Type any HTML attribute value and watch four parallel attr() readings: the new type(raw-string), the deprecated type(string), the new shorthand type(*), and the legacy bare attr(name). The live ::after shows what each lane actually paints; CSS.supports shows what the engine actually accepts.

type(raw-string) — v136 canonical

.target::after { content: attr(data-label type(raw-string)); }

type(string) — deprecated alias

.target::after { content: attr(data-label type(string)); }

type(*) — type-agnostic

.target::after { content: attr(data-label type(*)); }

bare attr(name) — untyped legacy

.target::after { content: attr(data-label); }

CSS.supports() readouts

content: attr(x type(raw-string))
content: attr(x type(string))
content: attr(x type(*))
content: attr(x)

see also