Skip to content

Commit 04ce49b

Browse files
committed
Fix width of articles in blog
1 parent 38d7569 commit 04ce49b

2 files changed

Lines changed: 44 additions & 22 deletions

File tree

package-lock.json

Lines changed: 0 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

static/styles.css

Lines changed: 44 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
max-width: var(--measure);
2828
padding: 0;
2929
}
30+
3031
html,
3132
body,
3233
header {
@@ -76,7 +77,7 @@ table {
7677
border-collapse: collapse;
7778
}
7879

79-
article > details {
80+
article>details {
8081
max-width: calc(100vw - 2 * var(--s0));
8182
}
8283

@@ -92,6 +93,7 @@ date {
9293
padding: var(--s-3);
9394
border-radius: var(--s-3);
9495
}
96+
9597
code[class*="language-"] {
9698
/* This is a little fix to prevent padding affecting Prism code blocks */
9799
padding: 0;
@@ -109,10 +111,12 @@ blockquote {
109111
flex-wrap: wrap;
110112
justify-content: flex-start;
111113
}
112-
.horizontal-spread > * {
114+
115+
.horizontal-spread>* {
113116
margin: 0 auto 0;
114117
}
115-
.horizontal-spread > * + * {
118+
119+
.horizontal-spread>*+* {
116120
margin-left: var(--s0);
117121
}
118122

@@ -124,11 +128,13 @@ blockquote {
124128
justify-content: center;
125129
max-width: min(95vw, calc(var(--measure) * 5));
126130
}
127-
.stack > * {
131+
132+
.stack>* {
128133
margin: 0 var(--s0) var(--s0);
129134
width: var(--measure);
130135
}
131-
.stack > * + * {
136+
137+
.stack>*+* {
132138
margin-left: var(--s-3);
133139
}
134140

@@ -145,32 +151,34 @@ td {
145151
padding: var(--s-1);
146152
}
147153

148-
article > pre {
154+
article>pre {
149155
width: 100%;
150156
overflow: scroll;
151157
}
152158

153-
p > img {
159+
p>img {
154160
max-width: 100%;
155161
}
156162

157-
article > a > img {
163+
article>a>img {
158164
width: 100%;
159165
height: auto;
160166
display: block;
161167
object-fit: cover;
162168
aspect-ratio: 16 / 9;
163169
}
164170

165-
body > article {
171+
body>article {
166172
width: clamp(0, var(--measure), 90vw);
173+
max-width: var(--measure);
167174
}
168175

169176
ul,
170177
ol {
171178
margin-left: var(--s0);
172179
}
173-
li + li {
180+
181+
li+li {
174182
margin-block-start: var(--s-3);
175183
}
176184

@@ -182,6 +190,7 @@ li + li {
182190
.wonky {
183191
transition: transform 0.5s;
184192
}
193+
185194
.wonky:hover {
186195
transform: rotate(5deg);
187196
}
@@ -196,7 +205,8 @@ li + li {
196205
text-decoration: unset;
197206
transition: opacity 0.2s;
198207
}
199-
*:hover > .hash-link {
208+
209+
*:hover>.hash-link {
200210
opacity: 1;
201211
}
202212

@@ -211,10 +221,12 @@ body {
211221
justify-content: flex-start;
212222
overflow-x: hidden;
213223
}
214-
body > * {
224+
225+
body>* {
215226
margin: 0 auto 0;
216227
}
217-
body > * + * {
228+
229+
body>*+* {
218230
margin-top: var(--s3);
219231
}
220232

@@ -223,9 +235,11 @@ article {
223235
position: relative;
224236
max-width: 100%;
225237
}
226-
article > * + * {
238+
239+
article>*+* {
227240
margin-block-start: var(--s1);
228241
}
242+
229243
article:after {
230244
background: var(--hard);
231245
bottom: 0;
@@ -238,13 +252,16 @@ article:after {
238252
a {
239253
font-weight: bold;
240254
}
255+
241256
a:hover {
242257
color: var(--hard);
243258
transform: scale(1.05);
244259
}
260+
245261
a.direct-link {
246262
color: var(--hard);
247263
}
264+
248265
a.direct-link:hover {
249266
color: var(--accent);
250267
transform: scale(1.05);
@@ -259,16 +276,20 @@ a.direct-link:hover {
259276
position: relative;
260277
max-width: var(--measure);
261278
}
262-
.banner > * {
279+
280+
.banner>* {
263281
display: flex;
264282
flex-direction: row;
265283
}
284+
266285
.banner h2 {
267286
writing-mode: vertical-rl;
268287
}
269-
.banner > address {
288+
289+
.banner>address {
270290
flex-wrap: wrap;
271291
}
292+
272293
.banner:before {
273294
background: var(--hard);
274295
content: "";
@@ -277,6 +298,7 @@ a.direct-link:hover {
277298
top: 0;
278299
width: 80%;
279300
}
301+
280302
.banner:after {
281303
background: var(--accent);
282304
bottom: calc(-1 * var(--s0));
@@ -287,7 +309,7 @@ a.direct-link:hover {
287309
width: min(70%, 200ch);
288310
}
289311

290-
address > a {
312+
address>a {
291313
margin-left: var(--s0);
292314
margin-top: var(--s0);
293315
border: var(--s-2) solid var(--accent);
@@ -299,16 +321,17 @@ address > a {
299321
text-align: center;
300322
flex-grow: 1;
301323
}
302-
address > a:focus,
303-
address > a:hover {
324+
325+
address>a:focus,
326+
address>a:hover {
304327
border-color: var(--hard);
305328
color: var(--hard);
306329
}
307330

308331
/* Exception */
309-
.stack > h2 {
332+
.stack>h2 {
310333
margin-bottom: var(--s0);
311334
max-width: 100vw;
312335
text-align: center;
313336
width: 100vw;
314-
}
337+
}

0 commit comments

Comments
 (0)