Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-text/hanging-punctuation/hanging-punctuation-variable-font-size.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Text: hanging-punctuation first last with variable font size</title>
<link rel="help" href="https://drafts.csswg.org/css-text-3/#hanging-punctuation-property">
<link rel="match" href="reference/hanging-punctuation-variable-font-size-ref.html">
<meta name="assert" content="hanging-punctuation: first last hangs punctuation by the width of the punctuation character itself, even when the punctuation has a different font size than the surrounding text.">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
body { font-family: 'Ahem'; color:green }
.hang { hanging-punctuation: first last; margin:1em; float:left }
</style>
<div class="hang" style="font-size:32px"><span style="font-size:16px">(</span>1234</div>
<div class="hang" style="font-size:32px">1234<span style="font-size:16px">)</span></div>