Skip to content

Commit

Permalink
WebKit export: [line-clamp] Incorrect clamped block height when conte…
Browse files Browse the repository at this point in the history
…nt added dynamically (#49881)

https://bugs.webkit.org/show_bug.cgi?id=284048

Co-authored-by: Alan Baradlay <zalan@apple.com>
  • Loading branch information
2 people authored and sadym-chromium committed Jan 14, 2025
1 parent 3459bd4 commit 3d3c608
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
<!DOCTYPE html>
<title>CSS Overflow: appending to a box with -webkit-line-clamp</title>
<style>
div {
font-family: Monospace;
font-size: 20px;
}
</style>
<body>
<div>first line<br>second line&#x2026;</div>
</body>
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
<!DOCTYPE html>
<title>CSS Overflow: appending to a box with -webkit-line-clamp</title>
<link rel="help" href="https://drafts.csswg.org/css-overflow-3/#webkit-line-clamp">
<link rel="match" href="reference/webkit-line-clamp-dynamic-001-ref.html">
<style>
#container {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
font-size: 20px;
font-family: Monospace;
overflow: hidden;
}
</style>
<body>
<div id="container">first line<br>second line<br>PASS if this is not visible<br></div>
<script>
document.body.offsetTop;
let span = document.createElement('span');
span.textContent = "PASS if this is not visible";
container.appendChild(span);
</script>
</body>

0 comments on commit 3d3c608

Please sign in to comment.