Skip to content

Commit ac424a6

Browse files
making multiple classes exaple make more sense
1 parent fe941d7 commit ac424a6

File tree

1 file changed

+30
-24
lines changed

1 file changed

+30
-24
lines changed

learn/selectors/class-many.html

+30-24
Original file line numberDiff line numberDiff line change
@@ -13,54 +13,56 @@
1313

1414
<style class="editable">
1515
.notebox {
16-
border: 4px solid #666;
17-
padding: .5em;
16+
border: 4px solid #666;
17+
padding: .5em;
1818
}
1919

2020
.notebox.warning {
21-
border: 4px solid orange;
22-
font-weight: bold;
21+
border-color: orange;
22+
font-weight: bold;
2323
}
2424

2525
.notebox.danger {
26-
border: 4px solid red;
27-
font-weight: bold;
26+
border-color: red;
27+
font-weight: bold;
2828
}
29-
29+
3030
</style>
3131
</head>
3232

3333
<body>
3434
<section class="preview">
35-
<div class="notebox">
36-
This is an informational note.
37-
</div>
38-
39-
<div class="notebox warning">
40-
This note shows a warning.
41-
</div>
35+
<div class="notebox">
36+
This is an informational note.
37+
</div>
4238

43-
<div class="notebox danger">
44-
This note shows danger!
45-
</div>
39+
<div class="notebox warning">
40+
This note shows a warning.
41+
</div>
4642

43+
<div class="notebox danger">
44+
This note shows danger!
45+
</div>
4746

47+
<div class="danger">
48+
This won't get styled — it also needs to have the notebox class.
49+
</div>
4850
</section>
4951

5052
<textarea class="playable playable-css" style="height: 240px;">
5153
.notebox {
52-
border: 4px solid #666;
53-
padding: .5em;
54+
border: 4px solid #666;
55+
padding: .5em;
5456
}
5557

5658
.notebox.warning {
57-
border: 4px solid orange;
58-
font-weight: bold;
59+
border-color: orange;
60+
font-weight: bold;
5961
}
6062

6163
.notebox.danger {
62-
border: 4px solid red;
63-
font-weight: bold;
64+
border-color: red;
65+
font-weight: bold;
6466
}
6567
</textarea>
6668

@@ -76,6 +78,10 @@
7678
<div class="notebox danger">
7779
This note shows danger!
7880
</div>
81+
82+
<div class="danger">
83+
This won't get styled — it also needs to have the notebox class
84+
</div>
7985
</textarea>
8086

8187
<div class="playable-buttons">
@@ -84,4 +90,4 @@
8490
</body>
8591
<script src="../playable.js"></script>
8692

87-
</html>
93+
</html>

0 commit comments

Comments
 (0)