Skip to content

Commit 842e574

Browse files
sakupi01servo-wpt-sync
authored andcommitted
add ref test for quote depth calculation
Signed-off-by: saku <[email protected]>
1 parent 13c6c36 commit 842e574

File tree

2 files changed

+77
-0
lines changed

2 files changed

+77
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>Reference: quote-depth behavior</title>
4+
<body>
5+
<div>&#x201c;Test1&#x201d;</div>
6+
<div>&#x201c;Test2&#x201d;</div>
7+
<div>&#x201c;Test3&#x2018;Test3 Inner&#x2019;&#x201d;</div>
8+
<div>Test4</div>
9+
<div>&#x201c;Test5</div>
10+
<div>Test6&#x201d;</div>
11+
</body>
Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
<!DOCTYPE html>
2+
<meta charset="utf-8">
3+
<title>CSS Content: quote-depth behavior</title>
4+
<link rel="author" href="mailto:[email protected]" title="saku">
5+
<link rel="help" href="https://www.w3.org/TR/css-content-3/#quotes">
6+
<meta name="assert" content="content quotes are correctly applied respecting to the depth of the element.">
7+
<link rel="match" href="content-quotes-depth-ref.html">
8+
<style>
9+
:root {
10+
quotes: "\201c" "\201d" "\2018" "\2019";
11+
}
12+
13+
/* quotes made only with before */
14+
.test1::before {
15+
content: open-quote "Test1" close-quote;
16+
}
17+
18+
/* quotes made only with before and after pseudo-elements */
19+
.test2::before {
20+
content: open-quote;
21+
}
22+
23+
.test2::after {
24+
content: close-quote;
25+
}
26+
27+
/* Nested quotes */
28+
.test3::before {
29+
content: open-quote;
30+
}
31+
32+
.test3::after {
33+
content: open-quote "Test3 Inner" close-quote close-quote;
34+
}
35+
36+
/* close-quote will be ignored */
37+
.test4::before {
38+
content: close-quote;
39+
}
40+
41+
/* close-quote will be ignored */
42+
.test5::before {
43+
content: open-quote;
44+
}
45+
46+
.test5::after {
47+
content: no-close-quote;
48+
}
49+
50+
/* open-quote will be ignored */
51+
.test6::before {
52+
content: no-open-quote;
53+
}
54+
55+
.test6::after {
56+
content: close-quote;
57+
}
58+
</style>
59+
<body>
60+
<div class="test1"></div>
61+
<div class="test2">Test2</div>
62+
<div class="test3">Test3</div>
63+
<div class="test4">Test4</div>
64+
<div class="test5">Test5</div>
65+
<div class="test6">Test6</div>
66+
</body>

0 commit comments

Comments
 (0)