blob: 3b45e919ad7295c0aef7d401325978cabb62298d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
|
<!DOCTYPE html>
<html>
<head>
<title>CSS test reference: background-clip: text paints multi-line text in the wrong place</title>
<link rel="author" href="mailto:mmaxfield@apple.com" title="Myles C. Maxfield">
<link rel="stylesheet" href="/fonts/ahem.css">
<style>
#container {
position: relative;
padding: 3px;
}
span {
color: green;
font: 48px "Ahem";
}
div.cover {
position: absolute;
background: green;
}
</style>
</head>
<body>
<p>This test makes sure that multi-line elements with <code>background-clip: text</code> are placed correctly. The test passes if the top rectangle is (roughly) half as wide as the bottom rectangle.</p>
<div id="container">
<span>AAA<br>AAAAAA</span>
<div class="cover" style="left: 0px; top: 0px; width: calc(48px * 3 + 3px); height: 3px;"></div>
<div class="cover" style="left: 0px; top: 48px; width: calc(48px * 6 + 3px); height: 6px;"></div>
<div class="cover" style="left: 0px; top: calc(48px * 2); width: calc(48px * 6 + 3px); height: 3px;"></div>
<div class="cover" style="left: 0px; top: 0px; width: 3px; height: calc(48px * 2);"></div>
<div class="cover" style="left: calc(48px * 3); top: 0px; width: 3px; height: 48px;"></div>
<div class="cover" style="left: calc(48px * 6); top: 48px; width: 3px; height: 48px;"></div>
</body>
</html>
|