-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstyle.css
More file actions
67 lines (67 loc) · 1.59 KB
/
style.css
File metadata and controls
67 lines (67 loc) · 1.59 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@media (prefers-color-scheme: dark){
body {color:white;background:black;}
}
body {
font: 1.2em/1.62 sans-serif; /* use system-default sans-serif font, the value after the / is the line-height */
margin: 0 auto; /* centers the content */
max-width: 60em;
padding: 0 0.62em;
}
nav {
background-color: indianred; /* picked on accident, but looks nice */
}
nav h1 {
margin: 0;
display: inline-block;
}
a {
color: indianred; /* also works well against a dark background */
}
nav a {
padding: 0 0.5em;
color: white;
display: inline-block;
}
figcaption {
text-align: center;
}
code { /* inline code */
font: 1.2em monospace;
background: rgba(205, 92, 92, 0.1); /* indianred at 10% opacity. Unfortunately CSS doesn't let you mix names and transparency. */
padding: 0.1em 0.2em;
border-radius: 0.3em;
}
code:has(pre) { /* code block */
font: 1em/1.2 monospace;
background: indianred;
color: white;
display: table;
margin: 1em auto;
padding: 0 1em;
border-radius: 0.5em;
overflow: auto;
}
code:has(span) { /* code block with line numbers */
counter-reset: item;
padding-left: 2.5em;
}
code span {
border-left: 1px solid rgba(255, 255, 255, 0.75);
padding-left: 0.5em;
display: inline-block;
line-height: 1.2;
}
code span:before { /* line-number hack, because the ol has periods after the numbers and doesn't work well in reader mode. */
content: counter(item);
counter-increment: item;
width: 2em;
margin-left: -3em;
margin-right: 1em;
text-align: right;
display: inline-block;
opacity: 0.75;
}
footer {
border-top: 1px solid indianred;
text-align: center;
}