| <!DOCTYPE html> |
| <meta charset="utf-8"> |
| <title>CSS Overflow: line-clamp with text-overflow<string></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="match" href="reference/webkit-line-clamp-005-ref.html"> |
| <meta name="assert" content="line-clamp should clamp with default ellipsis even if text-overflow has string value. This is the case even if the inline root of the ellipsized line is not the line-clamp container, but a descendant of it."> |
| <style> |
| .clamp { |
| display: -webkit-box; |
| -webkit-box-orient: vertical; |
| -webkit-line-clamp: 4; |
| line-clamp: 4; |
| font: 16px / 32px serif; |
| white-space: pre; |
| background-color: yellow; |
| padding: 0 4px; |
| text-overflow: "-"; |
| overflow: hidden; |
| } |
| </style> |
| <div class="clamp"><div>Line 1 |
| Line 2 |
| Line 3 |
| Line 4 |
| Line 5</div></div> |