demo · v136

attr() raw-string

CSSWG renamed attr(name string)attr(name raw-string) before attr() took its non-string types out of trial. Edit the attribute below and watch both forms read it.

Probing browser support…

old: attr(data-quote) — default reads as string

new: attr(data-quote raw-string) — explicit

the code

/* Pre-136 draft */
[data-quote]::before { content: attr(data-quote string); }

/* 136+ — "string" renamed to "raw-string"
   The default attr(x) without a type is still the raw string,
   so authors normally don't need to write the type. The rename
   matters for the new typed attr() shipping later. */
[data-quote]::before { content: attr(data-quote raw-string); }

see also