diff options
Diffstat (limited to 'responsive/cgit.css')
| -rw-r--r-- | responsive/cgit.css | 582 |
1 files changed, 582 insertions, 0 deletions
diff --git a/responsive/cgit.css b/responsive/cgit.css new file mode 100644 index 0000000..f9e1b76 --- /dev/null +++ b/responsive/cgit.css | |||
| @@ -0,0 +1,582 @@ | |||
| 1 | /* 1. Color scheme */ | ||
| 2 | |||
| 3 | @media (prefers-color-scheme: dark) { | ||
| 4 | :root { | ||
| 5 | --color-primary: rgb(255 181 160); | ||
| 6 | --color-surface-tint: rgb(255 181 160); | ||
| 7 | --color-on-primary: rgb(86 31 15); | ||
| 8 | --color-primary-container: rgb(114 53 35); | ||
| 9 | --color-on-primary-container: rgb(255 219 209); | ||
| 10 | --color-secondary: rgb(231 189 178); | ||
| 11 | --color-on-secondary: rgb(68 42 34); | ||
| 12 | --color-secondary-container: rgb(93 64 55); | ||
| 13 | --color-on-secondary-container: rgb(255 219 209); | ||
| 14 | --color-tertiary: rgb(216 197 141); | ||
| 15 | --color-on-tertiary: rgb(59 47 5); | ||
| 16 | --color-tertiary-container: rgb(83 70 25); | ||
| 17 | --color-on-tertiary-container: rgb(245 225 167); | ||
| 18 | --color-error: rgb(255 180 171); | ||
| 19 | --color-on-error: rgb(105 0 5); | ||
| 20 | --color-error-container: rgb(147 0 10); | ||
| 21 | --color-on-error-container: rgb(255 218 214); | ||
| 22 | --color-background: rgb(26 17 15); | ||
| 23 | --color-on-background: rgb(241 223 218); | ||
| 24 | --color-surface: rgb(26 17 15); | ||
| 25 | --color-on-surface: rgb(241 223 218); | ||
| 26 | --color-surface-variant: rgb(83 67 63); | ||
| 27 | --color-on-surface-variant: rgb(216 194 188); | ||
| 28 | --color-outline: rgb(160 140 135); | ||
| 29 | --color-outline-variant: rgb(83 67 63); | ||
| 30 | --color-shadow: rgb(0 0 0); | ||
| 31 | --color-scrim: rgb(0 0 0); | ||
| 32 | --color-inverse-surface: rgb(241 223 218); | ||
| 33 | --color-inverse-on-surface: rgb(57 46 43); | ||
| 34 | --color-inverse-primary: rgb(143 76 56); | ||
| 35 | --color-primary-fixed: rgb(255 219 209); | ||
| 36 | --color-on-primary-fixed: rgb(58 11 1); | ||
| 37 | --color-primary-fixed-dim: rgb(255 181 160); | ||
| 38 | --color-on-primary-fixed-variant: rgb(114 53 35); | ||
| 39 | --color-secondary-fixed: rgb(255 219 209); | ||
| 40 | --color-on-secondary-fixed: rgb(44 21 15); | ||
| 41 | --color-secondary-fixed-dim: rgb(231 189 178); | ||
| 42 | --color-on-secondary-fixed-variant: rgb(93 64 55); | ||
| 43 | --color-tertiary-fixed: rgb(245 225 167); | ||
| 44 | --color-on-tertiary-fixed: rgb(35 27 0); | ||
| 45 | --color-tertiary-fixed-dim: rgb(216 197 141); | ||
| 46 | --color-on-tertiary-fixed-variant: rgb(83 70 25); | ||
| 47 | --color-surface-dim: rgb(26 17 15); | ||
| 48 | --color-surface-bright: rgb(66 55 52); | ||
| 49 | --color-surface-container-lowest: rgb(20 12 10); | ||
| 50 | --color-surface-container-low: rgb(35 25 23); | ||
| 51 | --color-surface-container: rgb(39 29 27); | ||
| 52 | --color-surface-container-high: rgb(50 40 37); | ||
| 53 | --color-surface-container-highest: rgb(61 50 47); | ||
| 54 | |||
| 55 | color-scheme: dark; | ||
| 56 | } | ||
| 57 | } | ||
| 58 | |||
| 59 | @media (prefers-color-scheme: light) { | ||
| 60 | :root { | ||
| 61 | --color-primary: rgb(143 76 56); | ||
| 62 | --color-surface-tint: rgb(143 76 56); | ||
| 63 | --color-on-primary: rgb(255 255 255); | ||
| 64 | --color-primary-container: rgb(255 219 209); | ||
| 65 | --color-on-primary-container: rgb(114 53 35); | ||
| 66 | --color-secondary: rgb(119 87 78); | ||
| 67 | --color-on-secondary: rgb(255 255 255); | ||
| 68 | --color-secondary-container: rgb(255 219 209); | ||
| 69 | --color-on-secondary-container: rgb(93 64 55); | ||
| 70 | --color-tertiary: rgb(108 93 47); | ||
| 71 | --color-on-tertiary: rgb(255 255 255); | ||
| 72 | --color-tertiary-container: rgb(245 225 167); | ||
| 73 | --color-on-tertiary-container: rgb(83 70 25); | ||
| 74 | --color-error: rgb(186 26 26); | ||
| 75 | --color-on-error: rgb(255 255 255); | ||
| 76 | --color-error-container: rgb(255 218 214); | ||
| 77 | --color-on-error-container: rgb(147 0 10); | ||
| 78 | --color-background: rgb(255 248 246); | ||
| 79 | --color-on-background: rgb(35 25 23); | ||
| 80 | --color-surface: rgb(255 248 246); | ||
| 81 | --color-on-surface: rgb(35 25 23); | ||
| 82 | --color-surface-variant: rgb(245 222 216); | ||
| 83 | --color-on-surface-variant: rgb(83 67 63); | ||
| 84 | --color-outline: rgb(133 115 110); | ||
| 85 | --color-outline-variant: rgb(216 194 188); | ||
| 86 | --color-shadow: rgb(0 0 0); | ||
| 87 | --color-scrim: rgb(0 0 0); | ||
| 88 | --color-inverse-surface: rgb(57 46 43); | ||
| 89 | --color-inverse-on-surface: rgb(255 237 232); | ||
| 90 | --color-inverse-primary: rgb(255 181 160); | ||
| 91 | --color-primary-fixed: rgb(255 219 209); | ||
| 92 | --color-on-primary-fixed: rgb(58 11 1); | ||
| 93 | --color-primary-fixed-dim: rgb(255 181 160); | ||
| 94 | --color-on-primary-fixed-variant: rgb(114 53 35); | ||
| 95 | --color-secondary-fixed: rgb(255 219 209); | ||
| 96 | --color-on-secondary-fixed: rgb(44 21 15); | ||
| 97 | --color-secondary-fixed-dim: rgb(231 189 178); | ||
| 98 | --color-on-secondary-fixed-variant: rgb(93 64 55); | ||
| 99 | --color-tertiary-fixed: rgb(245 225 167); | ||
| 100 | --color-on-tertiary-fixed: rgb(35 27 0); | ||
| 101 | --color-tertiary-fixed-dim: rgb(216 197 141); | ||
| 102 | --color-on-tertiary-fixed-variant: rgb(83 70 25); | ||
| 103 | --color-surface-dim: rgb(232 214 210); | ||
| 104 | --color-surface-bright: rgb(255 248 246); | ||
| 105 | --color-surface-container-lowest: rgb(255 255 255); | ||
| 106 | --color-surface-container-low: rgb(255 241 237); | ||
| 107 | --color-surface-container: rgb(252 234 229); | ||
| 108 | --color-surface-container-high: rgb(247 228 224); | ||
| 109 | --color-surface-container-highest: rgb(241 223 218); | ||
| 110 | |||
| 111 | color-scheme: light; | ||
| 112 | } | ||
| 113 | } | ||
| 114 | |||
| 115 | :root { | ||
| 116 | /* Custom logic for diffs */ | ||
| 117 | --diff-add-bg: var(--color-tertiary-container); | ||
| 118 | --diff-add-fg: var(--color-on-tertiary-container); | ||
| 119 | --diff-del-bg: var(--color-error-container); | ||
| 120 | --diff-del-fg: var(--color-on-error-container); | ||
| 121 | } | ||
| 122 | |||
| 123 | /* 2. Global Reset & Body */ | ||
| 124 | * { | ||
| 125 | box-sizing: border-box; | ||
| 126 | } | ||
| 127 | |||
| 128 | body { | ||
| 129 | font-family: sans-serif; | ||
| 130 | font-size: 14px; | ||
| 131 | line-height: 1.5; | ||
| 132 | color: var(--color-on-background); | ||
| 133 | background: var(--color-background); | ||
| 134 | margin: 0; | ||
| 135 | padding: 0; | ||
| 136 | } | ||
| 137 | |||
| 138 | div#cgit { | ||
| 139 | padding: 0; | ||
| 140 | margin: 0 auto; | ||
| 141 | max-width: 1200px; | ||
| 142 | background: var(--color-background); | ||
| 143 | min-height: 100vh; | ||
| 144 | display: flex; | ||
| 145 | flex-direction: column; | ||
| 146 | } | ||
| 147 | |||
| 148 | a { | ||
| 149 | color: var(--color-primary); | ||
| 150 | text-decoration: none; | ||
| 151 | transition: opacity 0.2s; | ||
| 152 | } | ||
| 153 | |||
| 154 | a:hover { | ||
| 155 | text-decoration: underline; | ||
| 156 | opacity: 0.8; | ||
| 157 | } | ||
| 158 | |||
| 159 | /* 3. Header Area */ | ||
| 160 | div#cgit table#header { | ||
| 161 | width: 100%; | ||
| 162 | margin-bottom: 0; | ||
| 163 | background-color: var(--color-surface-container); | ||
| 164 | color: var(--color-on-surface); | ||
| 165 | padding: 1rem; | ||
| 166 | /* Transform table to flex for responsiveness */ | ||
| 167 | display: flex; | ||
| 168 | flex-wrap: wrap; | ||
| 169 | align-items: center; | ||
| 170 | border-bottom: 1px solid var(--color-outline-variant); | ||
| 171 | } | ||
| 172 | |||
| 173 | /* Fix for table structure within header */ | ||
| 174 | div#cgit table#header tbody, | ||
| 175 | div#cgit table#header tr { | ||
| 176 | display: contents; | ||
| 177 | } | ||
| 178 | |||
| 179 | div#cgit table#header td.logo { | ||
| 180 | display: block; | ||
| 181 | padding-right: 1rem; | ||
| 182 | } | ||
| 183 | |||
| 184 | div#cgit table#header td.main { | ||
| 185 | font-size: 1.5rem; | ||
| 186 | font-weight: bold; | ||
| 187 | color: var(--color-on-surface); | ||
| 188 | display: block; | ||
| 189 | flex-grow: 1; | ||
| 190 | } | ||
| 191 | |||
| 192 | div#cgit table#header td.main a { | ||
| 193 | color: var(--color-on-surface); | ||
| 194 | } | ||
| 195 | |||
| 196 | div#cgit table#header td.form { | ||
| 197 | display: block; | ||
| 198 | text-align: right; | ||
| 199 | margin-top: 0.5rem; | ||
| 200 | } | ||
| 201 | |||
| 202 | div#cgit table#header td.sub { | ||
| 203 | display: block; | ||
| 204 | width: 100%; | ||
| 205 | padding-top: 0.25rem; | ||
| 206 | color: var(--color-outline); | ||
| 207 | font-size: 0.9rem; | ||
| 208 | border-top: none; /* Removing legacy border */ | ||
| 209 | } | ||
| 210 | |||
| 211 | /* Input Elements */ | ||
| 212 | select, | ||
| 213 | input, | ||
| 214 | textarea { | ||
| 215 | background-color: var(--color-surface-container-high); | ||
| 216 | color: var(--color-on-surface); | ||
| 217 | border: 1px solid var(--color-outline); | ||
| 218 | border-radius: 4px; | ||
| 219 | padding: 4px 8px; | ||
| 220 | font-family: inherit; | ||
| 221 | } | ||
| 222 | |||
| 223 | input[type="submit"] { | ||
| 224 | background-color: var(--color-primary); | ||
| 225 | color: var(--color-on-primary); | ||
| 226 | border: none; | ||
| 227 | cursor: pointer; | ||
| 228 | font-weight: 500; | ||
| 229 | padding: 5px 12px; | ||
| 230 | } | ||
| 231 | |||
| 232 | input[type="submit"]:hover { | ||
| 233 | background-color: var(--color-primary-fixed-dim); | ||
| 234 | } | ||
| 235 | |||
| 236 | /* 4. Tabs Navigation */ | ||
| 237 | div#cgit table.tabs { | ||
| 238 | border-bottom: 1px solid var(--color-outline-variant); | ||
| 239 | border-collapse: collapse; | ||
| 240 | margin: 0; | ||
| 241 | width: 100%; | ||
| 242 | background-color: var(--color-surface); | ||
| 243 | display: flex; /* Modern layout */ | ||
| 244 | flex-wrap: wrap; | ||
| 245 | padding: 0 1rem; | ||
| 246 | } | ||
| 247 | |||
| 248 | div#cgit table.tabs tbody, | ||
| 249 | div#cgit table.tabs tr { | ||
| 250 | display: contents; | ||
| 251 | } | ||
| 252 | |||
| 253 | div#cgit table.tabs td { | ||
| 254 | display: block; | ||
| 255 | padding: 0; | ||
| 256 | } | ||
| 257 | |||
| 258 | div#cgit table.tabs td a { | ||
| 259 | display: inline-block; | ||
| 260 | padding: 0.75rem 1rem; | ||
| 261 | color: var(--color-on-surface-variant); | ||
| 262 | font-weight: 500; | ||
| 263 | border-bottom: 2px solid transparent; | ||
| 264 | } | ||
| 265 | |||
| 266 | div#cgit table.tabs td a.active { | ||
| 267 | color: var(--color-primary); | ||
| 268 | border-bottom: 2px solid var(--color-primary); | ||
| 269 | background-color: var(--color-surface-container-low); | ||
| 270 | } | ||
| 271 | |||
| 272 | div#cgit table.tabs td a:hover { | ||
| 273 | background-color: var(--color-surface-container-high); | ||
| 274 | text-decoration: none; | ||
| 275 | } | ||
| 276 | |||
| 277 | div#cgit table.tabs td.form { | ||
| 278 | flex-grow: 1; | ||
| 279 | text-align: right; | ||
| 280 | padding: 0.5rem 0; | ||
| 281 | display: flex; | ||
| 282 | justify-content: flex-end; | ||
| 283 | align-items: center; | ||
| 284 | } | ||
| 285 | |||
| 286 | div#cgit a.button { | ||
| 287 | display: inline-block; | ||
| 288 | padding: 3px 6px; | ||
| 289 | margin: 0 4px; | ||
| 290 | background-color: var(--color-secondary-container); | ||
| 291 | color: var(--color-on-secondary-container); | ||
| 292 | border-radius: 5px; | ||
| 293 | font-size: 0.85rem; | ||
| 294 | font-weight: 500; | ||
| 295 | text-decoration: none; | ||
| 296 | transition: | ||
| 297 | background-color 0.2s, | ||
| 298 | color 0.2s, | ||
| 299 | box-shadow 0.2s; | ||
| 300 | } | ||
| 301 | |||
| 302 | div#cgit a.button:hover { | ||
| 303 | background-color: var(--color-primary); | ||
| 304 | color: var(--color-on-primary); | ||
| 305 | text-decoration: none; | ||
| 306 | opacity: 1; | ||
| 307 | box-shadow: 0 2px 4px var(--color-shadow); | ||
| 308 | } | ||
| 309 | |||
| 310 | /* 5. Content Area */ | ||
| 311 | div#cgit div.content { | ||
| 312 | padding: 1.5rem; | ||
| 313 | flex-grow: 1; | ||
| 314 | } | ||
| 315 | |||
| 316 | div#cgit div.path { | ||
| 317 | margin: 0; | ||
| 318 | padding: 0.5rem 1.5rem; | ||
| 319 | background-color: var(--color-surface-container-low); | ||
| 320 | color: var(--color-on-surface); | ||
| 321 | border-bottom: 1px solid var(--color-outline-variant); | ||
| 322 | font-family: monospace; | ||
| 323 | } | ||
| 324 | |||
| 325 | /* 6. Lists and Tables */ | ||
| 326 | div#cgit table.list { | ||
| 327 | width: 100%; | ||
| 328 | border: none; | ||
| 329 | border-collapse: collapse; | ||
| 330 | margin-bottom: 1rem; | ||
| 331 | font-size: 0.95rem; | ||
| 332 | } | ||
| 333 | |||
| 334 | div#cgit table.list tr { | ||
| 335 | background: var(--color-surface); | ||
| 336 | border-bottom: 1px solid var(--color-surface-container-high); | ||
| 337 | } | ||
| 338 | |||
| 339 | div#cgit table.list tr:nth-child(even) { | ||
| 340 | background: var(--color-surface-container-lowest); | ||
| 341 | } | ||
| 342 | |||
| 343 | div#cgit table.list tr:hover { | ||
| 344 | background: var(--color-surface-container-high); | ||
| 345 | } | ||
| 346 | |||
| 347 | div#cgit table.list th { | ||
| 348 | text-align: left; | ||
| 349 | font-weight: 600; | ||
| 350 | color: var(--color-primary); | ||
| 351 | padding: 0.75rem 0.5rem; | ||
| 352 | border-bottom: 2px solid var(--color-outline-variant); | ||
| 353 | } | ||
| 354 | |||
| 355 | div#cgit table.list td { | ||
| 356 | padding: 0.75rem 0.5rem; | ||
| 357 | vertical-align: middle; | ||
| 358 | } | ||
| 359 | |||
| 360 | /* Commit Graph columns */ | ||
| 361 | div#cgit table.list td.commitgraph { | ||
| 362 | font-family: monospace; | ||
| 363 | white-space: pre; | ||
| 364 | color: var(--color-on-surface); | ||
| 365 | } | ||
| 366 | |||
| 367 | /* 7. Diffs and Code */ | ||
| 368 | div#cgit table.blob, | ||
| 369 | div#cgit table.diff, | ||
| 370 | div#cgit table.ssdiff { | ||
| 371 | width: 100%; | ||
| 372 | border: 1px solid var(--color-outline-variant); | ||
| 373 | border-radius: 4px; | ||
| 374 | overflow: hidden; | ||
| 375 | margin-top: 1rem; | ||
| 376 | background: var(--color-surface-container-lowest); | ||
| 377 | } | ||
| 378 | |||
| 379 | div#cgit table.blob td.linenumbers, | ||
| 380 | div#cgit table.ssdiff td.lineno { | ||
| 381 | border-right: 1px solid var(--color-outline-variant); | ||
| 382 | background: var(--color-surface-container-high); | ||
| 383 | text-align: right; | ||
| 384 | padding: 0 0.5em; | ||
| 385 | } | ||
| 386 | |||
| 387 | div#cgit table.blob td.linenumbers a, | ||
| 388 | div#cgit table.ssdiff td.lineno a { | ||
| 389 | display: inline-block; | ||
| 390 | width: 100%; | ||
| 391 | text-decoration: none; | ||
| 392 | color: var(--color-outline); | ||
| 393 | padding: 0; | ||
| 394 | } | ||
| 395 | |||
| 396 | div#cgit table.blob pre, | ||
| 397 | div#cgit table.diff td, | ||
| 398 | div#cgit table.ssdiff td { | ||
| 399 | font-family: monospace; | ||
| 400 | font-size: 0.9em; | ||
| 401 | padding: 0 0.5em; | ||
| 402 | color: var(--color-on-surface); | ||
| 403 | } | ||
| 404 | |||
| 405 | /* Diff coloring */ | ||
| 406 | div#cgit table.diff td div.add, | ||
| 407 | div#cgit table.ssdiff td.add { | ||
| 408 | background-color: var(--diff-add-bg); | ||
| 409 | color: var(--diff-add-fg); | ||
| 410 | } | ||
| 411 | |||
| 412 | div#cgit table.diff td div.del, | ||
| 413 | div#cgit table.ssdiff td.del { | ||
| 414 | background-color: var(--diff-del-bg); | ||
| 415 | color: var(--diff-del-fg); | ||
| 416 | } | ||
| 417 | |||
| 418 | div#cgit table.diff td div.hunk, | ||
| 419 | div#cgit table.ssdiff td.hunk { | ||
| 420 | background-color: var(--color-surface-variant); | ||
| 421 | color: var(--color-on-surface-variant); | ||
| 422 | padding: 0.25em 0.5em; | ||
| 423 | } | ||
| 424 | |||
| 425 | /* 8. Decorations (Tags, Branches) */ | ||
| 426 | div#cgit a.branch-deco, | ||
| 427 | div#cgit a.tag-deco, | ||
| 428 | div#cgit a.remote-deco, | ||
| 429 | div#cgit a.deco { | ||
| 430 | display: inline-block; | ||
| 431 | padding: 2px 6px; | ||
| 432 | border-radius: 4px; | ||
| 433 | font-size: 0.8em; | ||
| 434 | margin-left: 0.5em; | ||
| 435 | border: none; | ||
| 436 | } | ||
| 437 | |||
| 438 | div#cgit a.branch-deco { | ||
| 439 | background-color: var(--color-primary-container); | ||
| 440 | color: var(--color-on-primary-container); | ||
| 441 | } | ||
| 442 | |||
| 443 | div#cgit a.tag-deco { | ||
| 444 | background-color: var(--color-tertiary-container); | ||
| 445 | color: var(--color-on-tertiary-container); | ||
| 446 | } | ||
| 447 | |||
| 448 | div#cgit a.remote-deco { | ||
| 449 | background-color: var(--color-secondary-container); | ||
| 450 | color: var(--color-on-secondary-container); | ||
| 451 | } | ||
| 452 | |||
| 453 | /* 9. Commit Info Table */ | ||
| 454 | div#cgit table.commit-info { | ||
| 455 | background-color: var(--color-surface-container); | ||
| 456 | border: 1px solid var(--color-outline-variant); | ||
| 457 | border-radius: 8px; | ||
| 458 | padding: 1rem; | ||
| 459 | width: 100%; | ||
| 460 | margin-top: 1rem; | ||
| 461 | border-collapse: separate; | ||
| 462 | border-spacing: 0 0.5rem; | ||
| 463 | } | ||
| 464 | |||
| 465 | div#cgit table.commit-info th { | ||
| 466 | text-align: left; | ||
| 467 | padding: 0 1rem; | ||
| 468 | color: var(--color-secondary); | ||
| 469 | } | ||
| 470 | |||
| 471 | div#cgit table.commit-info td { | ||
| 472 | padding: 0 1rem; | ||
| 473 | } | ||
| 474 | |||
| 475 | div#cgit div.commit-subject { | ||
| 476 | font-size: 1.2rem; | ||
| 477 | font-weight: bold; | ||
| 478 | color: var(--color-primary); | ||
| 479 | margin: 1.5rem 0 0.5rem 0; | ||
| 480 | } | ||
| 481 | |||
| 482 | div#cgit div.commit-msg { | ||
| 483 | white-space: pre-wrap; | ||
| 484 | font-family: monospace; | ||
| 485 | padding: 1rem; | ||
| 486 | background: var(--color-surface-container-low); | ||
| 487 | border-radius: 4px; | ||
| 488 | color: var(--color-on-surface); | ||
| 489 | } | ||
| 490 | |||
| 491 | /* 10. Footer */ | ||
| 492 | div#cgit div.footer { | ||
| 493 | margin-top: auto; | ||
| 494 | padding: 2rem 1rem; | ||
| 495 | text-align: center; | ||
| 496 | font-size: 0.85rem; | ||
| 497 | color: var(--color-outline); | ||
| 498 | border-top: 1px solid var(--color-outline-variant); | ||
| 499 | } | ||
| 500 | |||
| 501 | div#cgit div.error { | ||
| 502 | color: var(--color-error); | ||
| 503 | background: var(--color-error-container); | ||
| 504 | padding: 1rem; | ||
| 505 | border-radius: 4px; | ||
| 506 | margin: 1rem 0; | ||
| 507 | } | ||
| 508 | |||
| 509 | /* 11. Responsive Adjustments */ | ||
| 510 | @media only screen and (max-width: 768px) { | ||
| 511 | div#cgit table#header { | ||
| 512 | flex-direction: column; | ||
| 513 | align-items: flex-start; | ||
| 514 | } | ||
| 515 | |||
| 516 | div#cgit table#header td.logo, | ||
| 517 | div#cgit table#header td.main, | ||
| 518 | div#cgit table#header td.form { | ||
| 519 | width: 100%; | ||
| 520 | text-align: left; | ||
| 521 | margin-bottom: 0.5rem; | ||
| 522 | } | ||
| 523 | |||
| 524 | div#cgit table.tabs { | ||
| 525 | flex-direction: column; | ||
| 526 | padding: 0; | ||
| 527 | } | ||
| 528 | |||
| 529 | div#cgit table.tabs td a { | ||
| 530 | width: 100%; | ||
| 531 | border-bottom: 1px solid var(--color-outline-variant); | ||
| 532 | } | ||
| 533 | |||
| 534 | div#cgit table.tabs td.form { | ||
| 535 | width: 100%; | ||
| 536 | justify-content: flex-start; | ||
| 537 | padding: 1rem; | ||
| 538 | } | ||
| 539 | |||
| 540 | div#cgit div.content { | ||
| 541 | padding: 1rem 0.5rem; | ||
| 542 | overflow-x: auto; /* Enable horizontal scroll for content */ | ||
| 543 | } | ||
| 544 | |||
| 545 | /* Force tables to scroll on small screens */ | ||
| 546 | div#cgit table.list, | ||
| 547 | div#cgit table.blob, | ||
| 548 | div#cgit table.diff { | ||
| 549 | white-space: nowrap; | ||
| 550 | } | ||
| 551 | |||
| 552 | /* Allow wrapping in logs on mobile to prevent extreme width */ | ||
| 553 | div#cgit table.list td.logmsg { | ||
| 554 | white-space: normal; | ||
| 555 | min-width: 200px; | ||
| 556 | } | ||
| 557 | } | ||
| 558 | |||
| 559 | /* --- Fix Syntax Highlighting Alignment --- */ | ||
| 560 | |||
| 561 | /* 1. Reset margins and padding added by syntax highlighting */ | ||
| 562 | div#cgit table.blob td.lines div.highlight { | ||
| 563 | margin: 0; | ||
| 564 | padding: 0; | ||
| 565 | border: none; | ||
| 566 | } | ||
| 567 | |||
| 568 | /* 2. Force alignment of line height and fonts */ | ||
| 569 | div#cgit table.blob td.linenumbers pre, | ||
| 570 | div#cgit table.blob td.lines pre { | ||
| 571 | font-family: monospace; | ||
| 572 | font-size: 14px; | ||
| 573 | line-height: 1.5 !important; | ||
| 574 | margin-top: 0; | ||
| 575 | } | ||
| 576 | |||
| 577 | /* 3. Remove impact of first <pre> */ | ||
| 578 | div#cgit table.blob td.lines > pre { | ||
| 579 | white-space: normal; | ||
| 580 | margin: 0; | ||
| 581 | padding: 0; | ||
| 582 | } | ||
