Skip to content

Commit 481bfd4

Browse files
s-alipovmoz-wptsync-bot
authored andcommitted
Enable non-legacy line-clamp to work without special values.
Differential Revision: https://phabricator.services.mozilla.com/D312145 bugzilla-url: https://bugzilla.mozilla.org/show_bug.cgi?id=2042999 gecko-commit: fa790382d48a26db863f654c0f9130ba8c41f647 gecko-commit-git: 0e084adab8461876c1598731aa4ecb2793ee4ffc gecko-reviewers: firefox-style-system-reviewers, layout-reviewers, dshin, AlaskanEmily
1 parent f64f3e1 commit 481bfd4

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>A line-clamp container must establish an independent block formatting context</title>
4+
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=2042999">
5+
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp-containers">
6+
<link rel="author" title="Seva Alipov" href="mailto:salipov@mozilla.com">
7+
<link rel="stylesheet" href="/fonts/ahem.css">
8+
<style>
9+
.clamp-box {
10+
border: 1px solid;
11+
width: 50px;
12+
height: fit-content;
13+
display: flow-root;
14+
font-family: ahem;
15+
}
16+
.float {
17+
float: left;
18+
width: 100px;
19+
height: 100px;
20+
border: 1px solid black;
21+
padding: 10px;
22+
font-family: ahem;
23+
}
24+
</style>
25+
<div class="outer">
26+
<div class="float">F</div>
27+
<div class="clamp-box">A&hellip;</div>
28+
</div>
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>A line-clamp container must establish an independent block formatting context</title>
4+
<link rel="help" href="https://bugzilla.mozilla.org/show_bug.cgi?id=2042999">
5+
<link rel="help" href="https://drafts.csswg.org/css-overflow-4/#line-clamp-containers">
6+
<link rel="author" title="Seva Alipov" href="mailto:salipov@mozilla.com">
7+
<link rel="match" href="line-clamp-bfc-ref.html">
8+
<link rel="stylesheet" href="/fonts/ahem.css">
9+
<style>
10+
.clamp-box {
11+
border: 1px solid;
12+
width: 50px;
13+
overflow: clip;
14+
line-clamp: 1;
15+
font-family: ahem;
16+
}
17+
.float {
18+
float: left;
19+
width: 100px;
20+
height: 100px;
21+
border: 1px solid black;
22+
padding: 10px;
23+
font-family: ahem;
24+
}
25+
</style>
26+
<div class="float">F</div>
27+
<!-- .clamp-box should exclude .float -->
28+
<div class="clamp-box">A<br>B</div>

0 commit comments

Comments
 (0)