Skip to content

Commit b5c133b

Browse files
author
James Brundage
committed
docs: Additional CSS help ( re #100 )
1 parent 159ce64 commit b5c133b

File tree

1 file changed

+22
-5
lines changed

1 file changed

+22
-5
lines changed

docs/About/Using-4bitCSS-In-CSS.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,20 +4,37 @@ layout: none
44

55
<h3 style='text-align:center'>CSS</h3>
66

7+
At the heart of any of the palettes are CSS variable definitions that mimic a console color palette.
8+
9+
You can use these CSS variables wherever you'd like.
10+
711
~~~css
812
.MyCustomClass {
9-
color: var(--cyan);
10-
border-color: var(--blue)
13+
color: var(--red);
14+
border: 1px solid var(--green);
1115
}
1216
~~~
1317

1418
<div style='text-align:center'>
1519
<style>
1620
.MyCustomClass {
17-
color: var(--cyan);
18-
border: 1px solid var(--blue);
21+
color: var(--red);
22+
border: 1px solid var(--green);
1923
}
2024
</style>
21-
<div class='MyCustomClass'>cyan with blue border</div>
25+
<div class='MyCustomClass'>red text, green border</div>
26+
27+
You can also refer to colors using a CSS class by name, for example:
28+
29+
<div style='display:grid'>
30+
<div class='Red'>
31+
Red
32+
</div>
33+
<div class='Green'>
34+
Green
35+
</div>
36+
<div class='Blue'>
37+
Blue
38+
</div>
2239
</div>
2340
<script>hljs.highlightAll();</script>

0 commit comments

Comments
 (0)