Skip to content

Commit 37ccce7

Browse files
committed
Syntax highlighting
1 parent faa4663 commit 37ccce7

File tree

5 files changed

+1106
-19
lines changed

5 files changed

+1106
-19
lines changed

content/main.css

+17-11
Original file line numberDiff line numberDiff line change
@@ -228,11 +228,23 @@ li > .katex {
228228
/* #region: others */
229229
pre {
230230
line-height: var(--rhythm);
231+
font-size: 0.75rem;
232+
padding: calc(var(--rhythm) * 0.5rem);
233+
border-radius: calc(var(--rhythm) * 0.25rem);
234+
-webkit-font-smoothing: auto;
235+
overflow: auto;
231236
}
232237

233238
.post-body ol,
234239
.post-body ul {
235-
margin-left: 3.2rem;
240+
margin-left: calc(var(--rhythm) * 1rem);
241+
}
242+
243+
@media (min-width: 550px) {
244+
.post-body ol,
245+
.post-body ul {
246+
margin-left: calc(var(--rhythm) * 2rem);
247+
}
236248
}
237249

238250
.post-body ol {
@@ -247,14 +259,6 @@ pre {
247259
margin-bottom: calc(var(--rhythm) * 0.5rem);
248260
}
249261

250-
@media (min-width: var(--width-big-enough)) {
251-
.post-body ol,
252-
.post-body ul {
253-
min-width: 50rem;
254-
margin-left: 2rem;
255-
}
256-
}
257-
258262
figure img {
259263
margin-bottom: 0;
260264
}
@@ -276,13 +280,15 @@ figcaption {
276280
/* #endregion */
277281

278282
/* #region: inlines */
279-
:not(pre) > code {
283+
code {
280284
font-family: var(--font-mono);
281285
font-variant-ligatures: "none";
282286
font-feature-settings: "normal";
287+
}
288+
289+
:not(pre) > code {
283290
font-size: 0.8rem;
284291
color: var(--color-text-inline-code);
285-
border-radius: 3px;
286292
}
287293

288294
a {

0 commit comments

Comments
 (0)