Status: FAIL | Duration: 13ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-text/letter-spacing/letter-spacing-bidi-004.xht
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8"/> <title>CSS Text level 3 Test: letter spacing is between letters, with bidi</title> <link rel="author" title="Mike Bremford" href="http://bfo.com" /> <link rel="help" href="https://drafts.csswg.org/css-text-3/#letter-spacing-property" /> <link rel="match" href="reference/letter-spacing-bidi-004-ref.xht" /> <meta name="assert" content="letter spacing should be applied between letters, not after letters. The latter will cause the colored backgrounds of the span elements to expand."/> <style> .test, .control { font: 50px/1 monospace; font-kerning: none; } .control { position: absolute; color: red; z-index: -1; white-space: pre; } .control span { /* to ensure both background and text must overlay */ background: linear-gradient(to bottom, red 50%, green 50%, green 100%); } .test span { background: linear-gradient(to bottom, green 50%, transparent 50%, transparent 100%); } .wide { letter-spacing: 2ch; } .narrow { letter-spacing: 1ch; } </style> </head> <body> <p>Test passes if no red is visible except for anti-aliasing differences, and the green boxes are the width of a single letter.</p> <!-- A <ls> B <ls> <bg>C</bg> <ls> gimel <ls> bet <ls> <bg>alef</bg> <gap> --> <div class="control">A B <span>C</span> ב ג <span style="unicode-bidi:embed">א</span></div> <div class="test narrow">AB<span class="wide">Cא</span>בג</div> </body> </html>
/css/css-text/letter-spacing/reference/letter-spacing-bidi-004-ref.xht
<html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta charset="utf-8" /> <link rel="author" title="Mike Bremford" href="http://bfo.com" /> <style> .control { font: 50px/1 monospace; font-kerning: none; white-space: pre; } .red { color: red; position: absolute; z-index: -1; } .control span { background: green; } </style> </head> <body> <p>Test passes if no red is visible except for anti-aliasing differences, and the green boxes are the width of a single letter.</p> <!-- A <ls> B <ls> <bg>C</bg> <ls> gimel <ls> bet <ls> <bg>alef</bg> <gap> --> <div class="control red">A B <span>C</span> ב ג <span style="unicode-bidi:embed">א</span></div> <div class="control">A B <span>C</span> ב ג <span style="unicode-bidi:embed">א</span></div> </body> </html>