]> git.bts.cx Git - cx.git/blob - public/design/css/style.css
style update
[cx.git] / public / design / css / style.css
1 /* Very Smol Reset */
2 * {
3 box-sizing: border-box;
4 margin: 0;
5 }
6
7 @font-face {
8 font-family: "League Spartan";
9 src: url(/design/fonts/raleway/LeagueSpartan-VF.woff);
10 }
11
12 /* Layout */
13
14 body {
15 display: flex;
16 flex-direction: column;
17 min-height: 100vh;
18 padding: 5vh clamp(1rem, 5vw, 3rem) 1rem;
19 font-family: "League Spartan", sans-serif;
20 font-size: 1.4em;
21 line-height: 1.2em;
22 color: #222;
23 }
24
25 body > * {
26 --layout-spacing: 4em;
27 --max-width: 50ch;
28 width: min(100%, var(--max-width));
29 margin-left: auto;
30 margin-right: auto;
31 }
32
33 header {
34 margin-bottom: 8vh;
35 }
36
37 header h1 {
38 font-size: 2em;
39 }
40
41 header h1 a {
42 color: #000;
43 text-decoration: none;
44 }
45
46 nav ul {
47 list-style: none;
48 display: flex;
49 flex-wrap: wrap;
50 padding: 0;
51 margin-left: -1rem;
52 margin-right: -1rem;
53 vertical-align: bottom;
54 }
55
56 nav ul li {
57 padding: 0.5rem 1rem;
58 }
59
60 nav [aria-current="page"] {
61 font-weight: bold;
62 }
63
64 main > * + * {
65 margin-top: var(--layout-spacing);
66 }
67
68 body > footer {
69 margin-top: auto;
70 padding-top: var(--layout-spacing);
71 }
72
73 body > footer div {
74 border-top: 1px solid #ccc;
75 padding-top: 0.5em;
76 font-size: 0.9rem;
77 color: #767676;
78 }
79
80 article {
81 font-weight: lighter;
82 }
83
84 article * + * {
85 margin-top: 1em;
86 }
87
88 article > h1 {
89 margin-top: 0;
90 }
91
92 article > h1 a {
93 text-decoration: none;
94 color: #000;
95 }
96
97 article > h1 + .updated {
98 margin-top: 0;
99 }
100
101 hr {
102 margin: 4em auto;
103 border: 0;
104 height: 1px;
105 background: #ccc;
106 }
107
108 /* Typography */
109 :is(h1, h2, h3) {
110 line-height: 1.2;
111 }
112
113 :is(h1, h2) {
114 max-width: 40ch;
115 }
116
117
118
119 .updated {
120 font-size: 0.8em;
121 color: #aaa;
122 margin: 0 !important;
123 }
124
125 :is(h2, h3):not(:first-child) {
126 margin-top: 2em;
127 }
128
129 a {
130 color: navy;
131 text-underline-offset: 0.08em;
132 }
133
134 a:focus {
135 outline: 1px solid currentColor;
136 outline-offset: 0.2em;
137 }
138
139 /* Media */
140 article + article {
141 border-top: 1px solid #ccc;
142 padding-top: var(--layout-spacing);
143 }
144
145 article img {
146 display: block;
147 width: 100%;
148 min-height: 20rem;
149 max-height: 40vh;
150 object-fit: cover;
151 margin: 0 auto 1rem !important;
152 }
153
154 /*@supports (aspect-ratio: 1) {
155 article img {
156 max-height: unset;
157 aspect-ratio: 3/2;
158 }
159 }*/
160
161 /* Supporting Content */
162
163 code:not([class*="language"]) {
164 font-family: Consolas, Monaco, Andale Mono, Ubuntu Mono, monospace;
165 font-size: 1.75ex;
166 color: #444;
167 background-color: rgba(0, 0, 0, 0.1);
168 padding-right: 0.15em;
169 padding-left: 0.15em;
170 }
171
172 pre code {
173 margin: 2rem 0;
174 padding: 0.5em 1rem;
175 display: block;
176 border-left: 3px solid rgba(0, 0, 0, 0.35);
177 background-color: rgba(0, 0, 0, 0.05);
178 border-radius: 0 0.25rem 0.25rem 0;
179 overflow-x: auto;
180 font-size: 0.8em !important;
181 }
182
183 blockquote {
184 margin: 2rem 0;
185 padding: 0.5em 1rem;
186 border-left: 3px solid rgba(0, 0, 0, 0.35);
187 background-color: rgba(0, 0, 0, 0.05);
188 border-radius: 0 0.25rem 0.25rem 0;
189 }