]> git.r.bdr.sh - rbdr/r.bdr.sh/blame - css/style.css
Add styling only to the main page
[rbdr/r.bdr.sh] / css / style.css
CommitLineData
20d294a5
RBR
1* {
2 padding: 0;
3 margin: 0
4}
54345095 5html { scroll-behavior: smooth }
554c7e00 6body {
c21740be 7 font-size: 1em;
20d294a5 8 font: max(1em, -apple-system-body);
cb935595 9 font-family: "Hoefler Text", "Times New Roman", serif;
1203ab0c 10 font-feature-settings: "liga" 1, "dlig" 1, "pnum" 1;
ea3c62fe
RBR
11 line-height: 1.6;
12 letter-spacing: 0.02em;
20d294a5 13 padding: 2em;
554c7e00 14}
b28d5c2c
RBR
15aside {
16 clear: both;
20d294a5 17 padding: 2em 0;
b28d5c2c 18}
7629ba8e 19::selection {
7629ba8e 20 background-color: #e8e8e8;
69c55f3c 21 color: #00f;
7629ba8e 22}
f752d89a 23@media only screen and (min-width: 500px) {
54345095 24 body { overflow-x: auto }
69c55f3c
RBR
25 .columned {
26 width: max-content;
27
28 .h2:not(:only-child) {
29 float: left;
30 margin: 0 60px 0 0;
31
32 h2 { max-width: 14.6em }
33 .h3,
34 li,
35 p { max-width: 24em }
36 pre { max-width: 25em }
37 }
38
39 .h2:first-of-type {
40 columns: 3;
41 width: 24em;
42
69c55f3c
RBR
43 h2:empty {display: none}
44 h2,
45 pre,
46 ul,
47 p:not(.a) { column-span: all }
48 p { break-after: column }
49 p.a { break-after: avoid }
50 }
51 }
f752d89a
RBR
52}
53
0d649c62 54.a { margin: 0 0.3em }
69c55f3c
RBR
55pre {
56 background-color: #eee;
57 font-family: courier, monospace;
58 font-size: 0.875em;
1949f067 59 max-width: 55em;
69c55f3c
RBR
60 overflow-x: auto;
61 padding: 1em;
62}
20d294a5 63pre[role="img"] { display: none }
c1bc1a5c 64blockquote, p, article > div {
c1bc1a5c
RBR
65 max-width: 45em
66}
f752d89a
RBR
67blockquote {
68 border-left: 4px solid #ccc;
69 padding-left: 10px;
70}
f752d89a 71br { display: none }
20d294a5
RBR
72h1, h2, h3 {
73 font-family: "Avenir Next";
74 font-weight: 900
75}
11f7c101 76h1 { font-size: 2em }
20d294a5
RBR
77h3 {
78 font-weight: 600;
79 margin-top: 1em
80}
81
020036ca
RBR
82h2, h3, a { color: #00f }
83[data-title="/index.html"] {
84 .h2:nth-of-type(n+2):nth-of-type(-n+4) {
85 h2, h3, a { color: #EE0700 }
86 }
20d294a5 87
020036ca
RBR
88 .h2:nth-of-type(n+5):nth-of-type(-n+6) {
89 h2, h3, a { color: #398557 }
90 }
20d294a5 91
020036ca
RBR
92 .h2:nth-of-type(n+7):nth-of-type(-n+9) {
93 h2, h3, a { color: #6A5ACD }
94 }
20d294a5 95
020036ca
RBR
96 .h2:nth-of-type(10) {
97 h2, h3, a { color: #A76905 }
98 }
20d294a5 99
020036ca
RBR
100 .h2:nth-of-type(11) {
101 h2, h3, a { color: #1D76DB }
102 }
20d294a5 103
020036ca
RBR
104 .h2:nth-of-type(n+12):nth-of-type(-n+16) {
105 h2, h3, a { color: #D505C6 }
106 }
20d294a5 107
020036ca
RBR
108 .h2:nth-of-type(17) {
109 h2, h3, a { color: #6A788A }
110 }
20d294a5
RBR
111}
112
113.h2 a {
114 display: inline-block;
115 padding: 0.25em 0;
116 margin: 0.25em 0;
117}
118
119header h1 {
120 font-size: min(7.5rem, 17vw);
121 font-weight: 900;
122 letter-spacing: -0.2em;
123 line-height: 1em;
124}
125header h1 a {
126 background: repeating-linear-gradient(
127 0deg,
128 black,
129 black 1px,
130 white 1px,
131 white 2px
132 );
133 background-clip: text;
134 color: transparent;
135 display: inline-block;
136 padding-right: 0.2em;
137 text-decoration: none;
138 -webkit-text-stroke: 1px #000;
139}
554c7e00 140
3b6787e4 141canvas {
36626ad1 142 background-color: #000;
ad06827e 143 border: 1px solid #000;
20d294a5 144 display: inline-block;
69c55f3c
RBR
145 height: 64px;
146 width: 64px;
967d51a0
BB
147}
148
21b1c71d 149@media (prefers-color-scheme: dark) {
b44cad65 150 body {
554c7e00 151 background: #000;
69c55f3c 152 color: #fff;
b44cad65 153 }
36626ad1
RBR
154 canvas {
155 background-color: #fff;
ad06827e 156 border: 1px solid #fff;
36626ad1 157 }
020036ca
RBR
158 h2, h3, a { color: #5dc1fd }
159 [data-title="/index.html"] .h2:nth-of-type(n+7):nth-of-type(-n+9) {
20d294a5
RBR
160 h2, h3, a { color: #675CFB }
161 }
54345095 162 pre { background-color: #222 }
20d294a5
RBR
163 header h1 a {
164 -webkit-text-stroke: 1px #fff;
165 }
bb31ec9c 166}