Skip to content

Commit bc4ca9a

Browse files
authored
Merge branch 'main' into cascadelayer
2 parents f05e390 + 73d4826 commit bc4ca9a

14 files changed

+131
-30
lines changed

flow/block-inline/flex.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@
9292
</textarea>
9393
<textarea id="code" class="playable-html">
9494
<div class="container">
95-
<div>FLex Item</div>
95+
<div>Flex Item</div>
9696
<div>Flex Item</div>
9797
<div>
9898
<div>Children</div>

learn/cascade/cascade-layers.html

+96
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
<!doctype html>
2+
<html lang="en">
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<title>cascade layers demo</title>
7+
<link rel="stylesheet" href="../styles.css">
8+
<style>
9+
10+
</style>
11+
12+
<style class="editable">
13+
@layer firstLayer, secondLayer;
14+
15+
p { /* 0-0-1 */
16+
background-color: red;
17+
color: grey !important;
18+
border: 5px inset purple;
19+
margin: 15px;
20+
}
21+
p#addSpecificity { /* 1-0-1 */
22+
border-style: solid !important;
23+
}
24+
25+
@layer firstLayer {
26+
#addSpecificity { /* 1-0-0 */
27+
background-color: blue;
28+
color: white !important;
29+
border-width: 5px;
30+
border-style: dashed !important;
31+
}
32+
}
33+
34+
@layer secondLayer {
35+
p#addSpecificity { /* 1-0-1 */
36+
background-color: green;
37+
color: orange !important;
38+
border-width: 10px;
39+
border-style: dotted !important;
40+
}
41+
}
42+
43+
</style>
44+
</head>
45+
46+
<body>
47+
<section class="preview">
48+
<p id="addSpecificity">
49+
A paragraph with a border and background
50+
</p>
51+
</section>
52+
53+
<textarea class="playable playable-css" style="height: 280px;">
54+
@layer firstLayer, secondLayer;
55+
56+
p { /* 0-0-1 */
57+
background-color: red;
58+
color: grey !important;
59+
border: 5px inset purple;
60+
}
61+
p#addSpecificity { /* 1-0-1 */
62+
border-style: solid !important;
63+
}
64+
65+
@layer firstLayer {
66+
#addSpecificity { /* 1-0-0 */
67+
background-color: blue;
68+
color: white !important;
69+
border-width: 5px;
70+
border-style: dashed !important;
71+
}
72+
}
73+
74+
@layer secondLayer {
75+
p#addSpecificity { /* 1-0-1 */
76+
background-color: green;
77+
color: orange !important;
78+
border-width: 10px;
79+
border-style: dotted !important;
80+
}
81+
}
82+
</textarea>
83+
84+
<textarea class="playable playable-html" style="height: 140px;">
85+
<p id="addSpecificity">
86+
A paragraph with a border and background
87+
</p>
88+
</textarea>
89+
90+
<div class="playable-buttons">
91+
<input id="reset" type="button" value="Reset">
92+
</div>
93+
</body>
94+
<script src="../playable.js"></script>
95+
96+
</html>

learn/cascade/specificity-boxes.html

+14-14
Original file line numberDiff line numberDiff line change
@@ -10,37 +10,37 @@
1010
</style>
1111

1212
<style class="editable">
13-
/* specificity: 0101 */
13+
/* 1. specificity: 1-0-1 */
1414
#outer a {
1515
background-color: red;
1616
}
1717

18-
/* specificity: 0201 */
18+
/* 2. specificity: 2-0-1 */
1919
#outer #inner a {
2020
background-color: blue;
2121
}
2222

23-
/* specificity: 0104 */
23+
/* 3. specificity: 1-0-4 */
2424
#outer div ul li a {
2525
color: yellow;
2626
}
2727

28-
/* specificity: 0113 */
28+
/* 4. specificity: 1-1-3 */
2929
#outer div ul .nav a {
3030
color: white;
3131
}
3232

33-
/* specificity: 0024 */
33+
/* 5. specificity: 0-2-4 */
3434
div div li:nth-child(2) a:hover {
3535
border: 10px solid black;
3636
}
3737

38-
/* specificity: 0023 */
38+
/* 6. specificity: 0-2-3 */
3939
div li:nth-child(2) a:hover {
4040
border: 10px dashed black;
4141
}
4242

43-
/* specificity: 0033 */
43+
/* 7. specificity: 0-3-3 */
4444
div div .nav:nth-child(2) a:hover {
4545
border: 10px double black;
4646
}
@@ -81,37 +81,37 @@
8181

8282
<textarea class="playable playable-css" style="height: 280px;">
8383

84-
/* specificity: 0101 */
84+
/* 1. specificity: 1-0-1 */
8585
#outer a {
8686
background-color: red;
8787
}
8888

89-
/* specificity: 0201 */
89+
/* 2. specificity: 2-0-1 */
9090
#outer #inner a {
9191
background-color: blue;
9292
}
9393

94-
/* specificity: 0104 */
94+
/* 3. specificity: 1-0-4 */
9595
#outer div ul li a {
9696
color: yellow;
9797
}
9898

99-
/* specificity: 0113 */
99+
/* 4. specificity: 1-1-3 */
100100
#outer div ul .nav a {
101101
color: white;
102102
}
103103

104-
/* specificity: 0024 */
104+
/* 5. specificity: 0-2-4 */
105105
div div li:nth-child(2) a:hover {
106106
border: 10px solid black;
107107
}
108108

109-
/* specificity: 0023 */
109+
/* 6. specificity: 0-2-3 */
110110
div li:nth-child(2) a:hover {
111111
border: 10px dashed black;
112112
}
113113

114-
/* specificity: 0033 */
114+
/* 7. specificity: 0-3-3 */
115115
div div .nav:nth-child(2) a:hover {
116116
border: 10px double black;
117117
}

learn/tasks/cascade/cascade-download.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,14 @@
1515
margin: 0;
1616
}
1717
#outer div ul .nav a {
18-
background-color: blue;
18+
background-color: yellow;
1919
padding: 5px;
2020
display: inline-block;
2121
margin-bottom: 10px;
2222
}
2323

2424
div div li a {
25-
color: yellow;
25+
color: rebeccapurple;
2626
}
2727
</style>
2828
</head>

learn/tasks/cascade/cascade.html

+3-2
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
<link rel="stylesheet" href="../styles.css">
88

99

10+
1011
<style class="editable">
1112
#outer div ul .nav a {
1213
background-color: blue;
@@ -19,6 +20,7 @@
1920
color: yellow;
2021
}
2122
</style>
23+
2224
</head>
2325

2426
<body>
@@ -32,7 +34,6 @@
3234
</div>
3335
</div>
3436
</section>
35-
3637
<textarea class="playable playable-css" style="height: 250px;">
3738
#outer div ul .nav a {
3839
background-color: blue;
@@ -63,4 +64,4 @@
6364
</body>
6465
<script src="../playable.js"></script>
6566

66-
</html>
67+
</html>

learn/tasks/float/float1-download.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
width: 150px;
2424
height: 150px;
2525
border-radius: 5px;
26-
background-color: rgb(207,232,220);
26+
background-color: rebeccapurple;
27+
color: #fff;
2728
padding: 1em;
2829
}
2930

learn/tasks/float/float1.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
width: 150px;
1818
height: 150px;
1919
border-radius: 5px;
20-
background-color: rgb(207,232,220);
20+
background-color: rebeccapurple;
21+
color: #fff;
2122
padding: 1em;
2223
}
2324
</style>

learn/tasks/float/float2-download.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@
2323
width: 150px;
2424
height: 150px;
2525
border-radius: 5px;
26-
background-color: rgb(207,232,220);
26+
background-color: rebeccapurple;
27+
color: #fff;
2728
padding: 1em;
2829
}
2930
.float {

learn/tasks/float/float2.html

+2-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,8 @@
1717
width: 150px;
1818
height: 150px;
1919
border-radius: 5px;
20-
background-color: rgb(207,232,220);
20+
background-color: rebeccapurple;
21+
color: #fff;
2122
padding: 1em;
2223
}
2324
</style>

learn/tasks/float/float3-download.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@
3030
}
3131

3232
.box {
33-
background-color: rgb(79,185,227);
33+
background-color: rebeccapurple;
3434
padding: 10px;
3535
color: #fff;
3636
}

learn/tasks/float/float3.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
}
2626

2727
.box {
28-
background-color: rgb(79,185,227);
28+
background-color: rebeccapurple;
2929
padding: 10px;
3030
color: #fff;
3131
}

learn/tasks/rwd/marking.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,11 @@ There is no one right answer however the following code demontrates how simply t
1919
}
2020
2121
header li {
22-
margin: 0; / *remove the margin used in the mobile design */
22+
margin: 0; /* remove the margin used in the mobile design */
2323
}
2424
2525
header a {
26-
border: 0; /*remove the border used in the mobile design */
26+
border: 0; /* remove the border used in the mobile design */
2727
}
2828
2929
main {

learn/tasks/values/color-download.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<li class="hex">hex color</li>
4444
<li class="rgb">RGB color</li>
4545
<li class="hsl">HSL color</li>
46-
<li class="transparency">Alpha value .2</li>
46+
<li class="transparency">Alpha value 0.6</li>
4747
</ul>
4848

4949
</body>

learn/tasks/values/color.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@
4343
<li class="hex">hex color</li>
4444
<li class="rgb">RGB color</li>
4545
<li class="hsl">HSL color</li>
46-
<li class="transparency">Alpha value .2</li>
46+
<li class="transparency">Alpha value 0.6</li>
4747
</ul>
4848
</section>
4949

@@ -70,7 +70,7 @@
7070
<li class="hex">hex color</li>
7171
<li class="rgb">RGB color</li>
7272
<li class="hsl">HSL color</li>
73-
<li class="transparency">Alpha value .2</li>
73+
<li class="transparency">Alpha value 0.6</li>
7474
</ul>
7575
</textarea>
7676

0 commit comments

Comments
 (0)