Skip to content

Commit 12986c2

Browse files
committed
Added some simple cascade layer tests
1 parent 10c2f4c commit 12986c2

File tree

3 files changed

+54
-0
lines changed

3 files changed

+54
-0
lines changed

cascade-attachment.html

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>03 Cascade Element Attachment</title>
6+
<style type="text/css">
7+
p#one {color: red;}
8+
p#two {color: green: !important;}
9+
</style>
10+
</head>
11+
<body>
12+
13+
<p id="one" style="color: green;">
14+
This is a paragraph with an ID of one.
15+
</p>
16+
<p id="two" style="color: red !important;">
17+
This is a paragraph with an ID of two.
18+
</p>
19+
20+
</body>
21+
</html>

cascade-layers.html

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="utf-8" />
5+
<title>03 Cascade Layers</title>
6+
<style type="text/css">
7+
@layer page {
8+
h1 {color: maroon;}
9+
p {margin-top: 0;}
10+
}
11+
12+
@layer site {
13+
body {font-size: 1.1rem;}
14+
h1 {color: orange;}
15+
p {margin-top: 0.5em;}
16+
}
17+
18+
p {margin-top: 1em;}
19+
20+
@layer site, component, page;
21+
</style>
22+
</head>
23+
<body>
24+
25+
26+
<h1>This is an H1</h1>
27+
<p>
28+
This is a paragraph.
29+
</p>
30+
31+
</body>
32+
</html>

pseudo-selection.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!DOCTYPE html><html><head><meta charset="utf-8" /><title>::selection</title><style type="text/css">.test1 {color: black; background-color: white;}.test2 {color: white; background-color: black;}.test1::selection {color: silver; background-color: rebeccapurple;}.test2::selection {color: rebeccapurple; background-color: silver;}</style></head><body id="www-meyerweb-com" class="css"><p>This paragraph has no class, and should be styled as default for the user agent. Text can be selected in this paragrapha in order to see default selection styles.</p><p class="test1">This paragraph has a <code>class</code> of <code>test1</code>, and its text should be black on white. Text should be selected starting somewhere inside this paragraph, and continuing into the next paragaph.</p><p class="test2">This paragraph has a <code>class</code> of <code>test2</code>, and its text should be white on black. Text should be selected starting somewhere inside the previous paragraph, and continuing into this paragaph.</p></body></html>

0 commit comments

Comments
 (0)