|
12 | 12 | --border-color: #e0e0e0; |
13 | 13 | --link-color: #0066cc; |
14 | 14 | --code-bg: #f5f5f5; |
| 15 | + --code-text: #1a1a1a; |
| 16 | + --code-keyword: #0000ff; |
| 17 | + --code-string: #008000; |
| 18 | + --code-comment: #808080; |
15 | 19 | --header-bg: #1a1a1a; |
16 | 20 | --nav-bg: #663399; |
17 | 21 | --feature-bg: #fff; |
18 | 22 | --hero-gradient-1: #663399; |
19 | 23 | --hero-gradient-2: #1a1a1a; |
| 24 | + --table-header-bg: #f5f5f5; |
| 25 | + --table-row-even-bg: #fafafa; |
| 26 | + --table-row-odd-bg: #fff; |
20 | 27 | } |
21 | 28 |
|
22 | 29 | [data-theme="dark"] { |
|
26 | 33 | --bg-color: #1a1a1a; |
27 | 34 | --border-color: #444; |
28 | 35 | --link-color: #66b3ff; |
29 | | - --code-bg: #2d2d2d; |
| 36 | + --code-bg: #1e1e1e; |
| 37 | + --code-text: #d4d4d4; |
| 38 | + --code-keyword: #569cd6; |
| 39 | + --code-string: #ce9178; |
| 40 | + --code-comment: #6a9955; |
30 | 41 | --header-bg: #0a0a0a; |
31 | 42 | --nav-bg: #7744bb; |
32 | 43 | --feature-bg: #2d2d2d; |
33 | 44 | --hero-gradient-1: #7744bb; |
34 | 45 | --hero-gradient-2: #2d2d2d; |
| 46 | + --table-header-bg: #2d2d2d; |
| 47 | + --table-row-even-bg: #252525; |
| 48 | + --table-row-odd-bg: #1e1e1e; |
35 | 49 | } |
36 | 50 |
|
37 | 51 | body { |
@@ -197,41 +211,63 @@ main { |
197 | 211 |
|
198 | 212 | .doc-content code { |
199 | 213 | background-color: var(--code-bg); |
| 214 | + color: var(--code-text); |
200 | 215 | padding: 0.2rem 0.4rem; |
201 | 216 | border-radius: 3px; |
202 | | - font-family: "Monaco", "Courier New", monospace; |
| 217 | + font-family: "Monaco", "Consolas", "Courier New", monospace; |
203 | 218 | font-size: 0.9em; |
| 219 | + font-weight: 500; |
204 | 220 | } |
205 | 221 |
|
206 | 222 | .doc-content pre { |
207 | 223 | background-color: var(--code-bg); |
| 224 | + color: var(--code-text); |
208 | 225 | padding: 1rem; |
209 | 226 | border-radius: 4px; |
210 | 227 | overflow-x: auto; |
211 | 228 | margin: 1rem 0; |
| 229 | + border: 1px solid var(--border-color); |
| 230 | + line-height: 1.5; |
212 | 231 | } |
213 | 232 |
|
214 | 233 | .doc-content pre code { |
215 | 234 | background-color: transparent; |
216 | 235 | padding: 0; |
| 236 | + color: inherit; |
| 237 | + font-weight: 400; |
217 | 238 | } |
218 | 239 |
|
219 | 240 | .doc-content table { |
220 | 241 | width: 100%; |
221 | 242 | border-collapse: collapse; |
222 | 243 | margin: 1rem 0; |
| 244 | + border: 1px solid var(--border-color); |
223 | 245 | } |
224 | 246 |
|
225 | 247 | .doc-content th, |
226 | 248 | .doc-content td { |
227 | 249 | border: 1px solid var(--border-color); |
228 | | - padding: 0.5rem; |
| 250 | + padding: 0.75rem; |
229 | 251 | text-align: left; |
230 | 252 | } |
231 | 253 |
|
232 | 254 | .doc-content th { |
233 | | - background-color: var(--code-bg); |
| 255 | + background-color: var(--table-header-bg); |
234 | 256 | font-weight: 600; |
| 257 | + color: var(--text-color); |
| 258 | +} |
| 259 | + |
| 260 | +.doc-content tbody tr:nth-child(even) { |
| 261 | + background-color: var(--table-row-even-bg); |
| 262 | +} |
| 263 | + |
| 264 | +.doc-content tbody tr:nth-child(odd) { |
| 265 | + background-color: var(--table-row-odd-bg); |
| 266 | +} |
| 267 | + |
| 268 | +.doc-content tbody tr:hover { |
| 269 | + background-color: var(--code-bg); |
| 270 | + transition: background-color 0.2s ease; |
235 | 271 | } |
236 | 272 |
|
237 | 273 | footer { |
|
0 commit comments