Status: FAIL | Duration: 19ms | Subtests: 0/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-inline/text-box-trim/text-box-trim-start-002.html
<!DOCTYPE html> <title>Test `text-box: trim-start text` selects correct text-over baseline</title> <link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-edge"> <link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-trim"> <link rel="help" href="https://drafts.csswg.org/css-inline-3/#typedef-text-edge"> <link rel="match" href="text-box-trim-start-002-ref.html"> <meta charset="utf-8"> <style> @font-face { /** * CSSTest font has non-zero internal leading (max ascent + max descent is * greater than the em-size). Trimming to the `text` edge should only trim * external leading (from the line-height) and not a font's internal leading. * * https://drafts.csswg.org/css-inline-3/#typedef-text-edge */ font-family: CSSTest; src: url(/fonts/CSSTest/csstest-basic-regular.ttf); } .spacer { background: lightgray; block-size: 100px; } .target { font: 100px/2 CSSTest; text-box: trim-start text; } canvas { background: green; vertical-align: text-top; } .inner { background: orange; } </style> <div class="spacer"></div> <div class="target"> <canvas width="50" height="50"></canvas><span class="inner">Test</span> </div> <div class="spacer"></div>
/css/css-inline/text-box-trim/text-box-trim-start-002-ref.html
<!DOCTYPE html> <title>Test `text-box: trim-start text` selects correct text-over baseline</title> <link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-edge"> <link rel="help" href="https://drafts.csswg.org/css-inline-3/#text-box-trim"> <link rel="help" href="https://drafts.csswg.org/css-inline-3/#typedef-text-edge"> <meta charset="utf-8"> <style> @font-face { /** * CSSTest font has non-zero internal leading (max ascent + max descent is * greater than the em-size). Trimming to the `text` edge should only trim * external leading (from the line-height) and not a font's internal leading. * * https://drafts.csswg.org/css-inline-3/#typedef-text-edge */ font-family: CSSTest; src: url(/fonts/CSSTest/csstest-basic-regular.ttf); } .spacer { background: lightgray; block-size: 100px; } .target { font: 100px/1 CSSTest; margin-block-end: 0.5em; } canvas { background: green; vertical-align: text-top; } .inner { background: orange; } </style> <div class="spacer"></div> <div class="target"> <canvas class="text-top" width="50" height="50"></canvas><span class="inner">Test</span> </div> <div class="spacer"></div>