Source code
Revision control
Copy as Markdown
Other Tools
Test Info:
- This WPT test may be referenced by the following Test IDs:
- /css/css-pseudo/first-letter-trailing-punctuation.html - WPT Dashboard Interop Dashboard
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>CSS Test: ::first-letter punctuation surrounding the first letter</title>
<link rel="match" href="first-letter-trailing-punctuation-ref.html">
<meta name="assert" content="Test checks that ::first-letter includes any P* punctuation preceding the first letter, includes following P* punctuation except Open (Ps) and Dash (Pd), that word separators do not count as intervening typographic space in the trailing direction, and that intervening non-word-separator typographic space bridges to following punctuation but is not absorbed when alone after the final punctuation.">
<style>
div {
font-size: 36px;
}
div::first-letter {
color: green;
background: yellow;
}
</style>
</head>
<body>
<p>Test passes if the green-on-yellow text in each line matches the reference.</p>
<div>(T)est</div>
<div>“T”est</div>
<div>_T_est</div>
<div>–Test</div>
<div>T(rail</div>
<div>T–rail</div>
<div>« T »est</div>
<div>𐄀T𐄀est</div>
<div>T .est</div>
<div>T. est</div>
</body>
</html>