Skip to content

Commit 016e37d

Browse files
committed
doc: adjust font
1 parent 669c5a5 commit 016e37d

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

docs/js/styles/theme.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,37 @@
3131

3232
/* Modern Developer Font Stack */
3333
--font-code: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
34+
/* 1. The Modern Developer System Stack
35+
This bypasses old default fonts and uses the highly-optimized UI font of whatever OS the user is on (San Francisco on Mac, Segoe UI on Windows, Roboto on Android) */
36+
--font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
37+
}
38+
39+
body {
40+
font-family: var(--font-main);
41+
font-size: 16px; /* Ensure a solid base size */
42+
line-height: 1.65; /* Gives the lines a bit more breathing room */
43+
44+
/* 2. Dark Mode Legibility Magic
45+
These three properties stop the text from looking thin/jagged on dark backgrounds */
46+
-webkit-font-smoothing: antialiased;
47+
-moz-osx-font-smoothing: grayscale;
48+
text-rendering: optimizeLegibility;
49+
50+
/* 3. A slightly crisper text color.
51+
Pure white (#FFF) is too harsh, but a bright slate grey pops beautifully */
52+
color: #e2e8f0;
53+
}
54+
55+
/* Ensure standard paragraphs use the spacing properly */
56+
p {
57+
margin-top: 0;
58+
margin-bottom: 1.25rem;
59+
}
60+
61+
/* Optional polish for your bold text to make it stand out better against the new crisp text */
62+
strong, b {
63+
font-weight: 600;
64+
color: #f8fafc; /* Slightly brighter than normal text */
3465
}
3566

3667
pre.highlightjs, .highlightjs code {

0 commit comments

Comments
 (0)