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-rtl.html - WPT Dashboard Interop Dashboard
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>white-space-trim: discard-before/after in right-to-left content</title>
<link rel="match" href="reference/white-space-trim-rtl-ref.html">
<meta name="assert" content="white-space-trim discards collapsible white space in logical (source) order regardless of bidi direction; the trimmed items are removed before bidi resolution.">
<style>
.db { white-space-trim: discard-before; }
.da { white-space-trim: discard-after; }
</style>
</head>
<body>
<p>Test passes if the two right-to-left lines below match the reference.</p>
<div dir="rtl">א <span class="db">ב</span>ג</div>
<div dir="rtl">א<span class="da">ב</span> ג</div>
</body>
</html>