main.css (3911B)
1 /* Wide screens */ 2 @media screen and (min-width: 40rem) { html { font-size: 1.1rem; } } 3 4 /* Narrow screens */ 5 @media screen and (max-width: 40rem) { html { font-size: 1.rem; } } 6 7 @media (prefers-color-scheme: dark) { 8 :root { 9 --primary-fg-color: #fcfcfa; 10 --primary-bg-color: #121212; 11 --secondary-fg-color: #bcbcba; 12 --secondary-bg-color: #232323; 13 --ui-element-color: #343434; 14 } 15 } 16 17 @media (prefers-color-scheme: light) { 18 :root { 19 --primary-fg-color: #121212; 20 --primary-bg-color: #fcfcfa; 21 --secondary-fg-color: #565654; 22 --secondary-bg-color: #efefed; 23 --ui-element-color: #dededc; 24 } 25 } 26 27 :root { --line-height: 1.4; } 28 29 html { 30 font-family: 'Linux Libertine', serif; 31 line-height: var(--line-height); 32 color: var(--primary-fg-color); 33 background-color: var(--primary-bg-color); 34 height: 100%; 35 -webkit-text-size-adjust: 100%; 36 -webkit-tap-highlight-color: transparent; 37 scrollbar-color: var(--ui-element-color) transparent; 38 } 39 40 body { 41 display: flex; 42 flex-direction: column; 43 min-height: 100dvh; 44 height: 100%; 45 margin: 0 auto; 46 width: 100%; 47 } 48 49 header { 50 font: small/var(--line-height) 'Linux Biolinum', sans-serif; 51 color: var(--secondary-fg-color); 52 background-color: var(--primary-bg-color); 53 display: flex; 54 max-width: 40rem; 55 width: 100%; 56 margin: 0 auto; 57 padding: 0.25rem 1rem; 58 box-sizing: border-box; 59 top: 0; 60 left: 0; 61 right: 0; 62 z-index: 10; 63 position: fixed; 64 } 65 66 header > nav { 67 display: flex; 68 width: 100%; 69 gap: 2ch; 70 justify-content: space-between; 71 align-items: baseline; 72 } 73 74 footer { 75 font-size: small; 76 font-family: 'Linux Biolinum', sans-serif; 77 color: var(--secondary-fg-color); 78 background: var(--ui-element-color); 79 background: linear-gradient(0deg, var(--ui-element-color) 0%, var(--primary-bg-color) 100%); 80 display: flex; 81 flex-direction: column; 82 margin-top: 2rem; 83 } 84 85 footer > div { 86 max-width: 40rem; 87 width: 100%; 88 margin: 0 auto; 89 } 90 91 footer > div > * { padding: 0 1rem; } 92 93 main { 94 flex: 1 0 auto; 95 box-sizing: border-box; 96 margin: 2rem auto; 97 max-width: 40rem; 98 width: 100%; 99 } 100 101 article { margin: 2rem auto; } 102 103 article > * { padding: 0 1rem; } 104 105 article > ul, 106 article > ol { padding-left: 3rem; } 107 108 h1, 109 h2, 110 h3, 111 h4, 112 h5, 113 h6 { font-family: 'Linux Libertine Display', sans-serif; } 114 115 figure { 116 margin-left: 0; 117 margin-right: 0; 118 padding-left: 0; 119 padding-right: 0; 120 } 121 122 figcaption { 123 font-size: small; 124 color: var(--secondary-fg-color); 125 padding-left: 1rem; 126 padding-right: 1rem; 127 } 128 129 figcaption > p:first-of-type { margin-top: 0.5em; } 130 131 video, 132 img { 133 display: block; 134 max-width: 100%; 135 } 136 137 p sup, 138 p sub { line-height: 0; } 139 140 blockquote { 141 color: var(--secondary-fg-color); 142 border-left: 3px solid var(--ui-element-color); 143 margin: 1rem 0; 144 padding: 0 1rem; 145 } 146 147 a { overflow-wrap: break-word; } 148 149 a:hover { text-decoration: none; } 150 151 pre, 152 code { 153 font: small/var(--line-height) 'Linux Libertine Mono', monospace; 154 -webkit-text-size-adjust: 100%; 155 } 156 157 code { overflow-wrap: break-word; } 158 159 pre { 160 background-color: var(--secondary-bg-color); 161 padding: 1rem; 162 scrollbar-color: var(--ui-element-color) transparent; 163 } 164 165 article > pre { 166 display: block; 167 white-space: pre-wrap; 168 overflow-wrap: anywhere; 169 } 170 171 del { color: var(--secondary-fg-color); } 172 173 table { 174 border-collapse: collapse; 175 display: block; 176 width: fit-content; 177 max-width: 100%; 178 margin: 1rem auto; 179 } 180 181 thead { 182 border-top: 1px solid var(--ui-element-color); 183 border-bottom: 1px solid var(--ui-element-color); 184 } 185 186 tr { border-bottom: 1px solid var(--ui-element-color); } 187 188 th, 189 td { padding: 0.25rem; } 190 191 hr { 192 border: none; 193 border-top: 1px solid var(--ui-element-color); 194 width: 60%; 195 margin: 2rem auto; 196 } 197 198 ul li { list-style-type: disc; } 199 200 .footnotes { 201 font: small/var(--line-height) 'Linux Biolinum', sans-serif; 202 margin: 2rem 0; 203 } 204 205 .footnotes ol { padding-left: 2rem; } 206 207 .math-block { 208 width: 100%; 209 overflow-x: auto; 210 }