wpt / css / css-text / hanging-punctuation / hanging-punctuation-first-whitespace.html

Status: FAIL | Duration: 12ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi

/css/css-text/hanging-punctuation/hanging-punctuation-first-whitespace.html

<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Text: hanging-punctuation first with leading whitespace</title>
<link rel="help" href="https://drafts.csswg.org/css-text-3/#hanging-punctuation-property">
<link rel="match" href="reference/hanging-punctuation-first-whitespace-ref.html">
<meta name="assert" content="hanging-punctuation: first causes opening punctuation to hang even when preceded by collapsible whitespace. The whitespace is removed and the punctuation hangs as if it were at the start of the line.">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
    body { font-family: 'Ahem'; color:green }
    .hang { hanging-punctuation: first; margin:1em }
</style>
<div style="float:left" class="hang">    (Hang test)</div>
<div style="clear:both">
<div class="hang">    (This should hang.<br>(This should not.</div>
<div class="hang" style="text-align:justify; width:300px;">   (This should hang and justifybecause and now were fine.</div>
<div class="hang" style="text-align:justify; width:300px;">   <span>   (</span>This should hang.</div>
<div class="hang" style="text-align:justify; width:300px;">   <span style="border-left:1em solid blue">  (</span>This should not hang.</div>
<div class="hang" style="text-indent:2em; text-align:justify; width:300px;">   (This should hang into the text-indent.</div>

/css/css-text/hanging-punctuation/reference/hanging-punctuation-first-whitespace-ref.html

<!DOCTYPE html>
<meta charset="UTF-8">
<title>CSS Reference</title>
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
    body { font-family: 'Ahem'; color:green }
    .hang { text-indent: -1em; margin:1em }
</style>
<div style="float:left" class="hang">(Hang test)</div>
<div style="clear:both">
<div class="hang">(This should hang.<br>(This should not.</div>
<div class="hang" style="text-align:justify; width:300px;">(This should hang and justifybecause and now were fine.</div>
<div class="hang" style="text-align:justify; width:300px;"><span>(</span>This should hang.</div>
<div style="margin-left:1em; text-align:justify; width:300px;"><span style="border-left:1em solid blue">(</span>This should not hang.</div>
<div class="hang" style="text-indent:1em; text-align:justify; width:300px;">(This should hang into the text-indent.</div>