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/white-space/white-space-trim-discard-before.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>white-space-trim: discard-before collapses collapsible white space before an inline box</title>
<link rel="match" href="reference/white-space-trim-discard-before-ref.html">
<meta name="assert" content="'white-space-trim: discard-before' on an inline box collapses the collapsible white space immediately before its start, so 'a <span>b</span>' renders as 'ab'.">
<style>
span { white-space-trim: discard-before; }
</style>
</head>
<body>
<p>Test passes if the letters below read "ab" with no space between them.</p>
<div>a <span>b</span></div>
</body>
</html>