concept
Generated quotation depth — CSS reference
Generated open-quote and close-quote select a pair according to nesting depth. The quotes property defines successive pairs, and the last pair is reused for deeper levels. This example sets explicit ASCII pairs to make the nested result deterministic.
Formal Syntax & Structure
css syntaxcss
quotes: "[" "]" "(" ")";Working Example
Example Snippetcss
<!doctype html><html lang="en"><meta charset="utf-8"><title>Generated quotation depth</title><style>body{margin:0}#a{padding:8px;background:rgb(232,237,241);color:rgb(0,0,0);box-sizing:border-box}body{font:16px/1.5 sans-serif}#a{margin:16px;padding:8px 8px 8px 80px;background:white}li{padding-left:4px}#a{quotes:"[" "]" "(" ")"}q::before{content:open-quote}q::after{content:close-quote}</style><body><p id="a"><q>ONE <q>TWO</q> THREE</q></p></body></html>