Status: PASS | Duration: 7ms | Subtests: 1/1 | Open test on wpt.live | Open ref on wpt.live | wpt.fyi
/css/css-overflow/line-clamp/line-clamp-038.html
<!DOCTYPE html> <meta charset="utf-8"> <title>CSS Overflow: a phantom line box after the last non-phantom line box in a container doesn't introduce a clamp point</title> <link rel="author" title="Andreu Botella" href="mailto:abotella@igalia.com"> <link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp"> <link rel="help" href="https://drafts.csswg.org/css-inline-3/#invisible-line-boxes"> <link rel="match" href="reference/webkit-line-clamp-001-ref.html"> <meta name="assert" content="Phantom line boxes are defined to be treated as not existing for any layout or rendering purpose other than determining the positions of any descendant, so if a regular line box is followed by a phantom line box, there's not a clamp point between them. This is also the case if the phantom line box is created as a result of block-in-inline splitting."> <style> .clamp { line-clamp: 5; font: 16px / 32px serif; background-color: yellow; } .clamp p { margin: 0; } </style> <div class="clamp"> <span> <div> <p>Line 1</p> <p>Line 2</p> <p>Line 3</p> <p>Line 4</p> <p>Line 5</p> </div> </span> </div>
/css/css-overflow/line-clamp/reference/webkit-line-clamp-001-ref.html
<!DOCTYPE html> <meta charset="utf-8"> <title>CSS Reference</title> <style> .clamp { font: 16px / 32px serif; white-space: pre; background-color: yellow; } </style> <div class="clamp">Line 1 Line 2 Line 3 Line 4 Line 5</div>