forge
Clone
https://git.tahinli.com/Tahinli/forge.git
0 watching0 forksRustAGPL-3.07.1 MiB490f099Tahinli7 hours ago322 commits
| 1 | // The page language. Everything lives in one left-aligned column that starts at the path bar's left |
| 2 | // edge, and what you read and what you act on sit together. No panes, cards or sidebars: topics are |
| 3 | // separated by a hairline, actions are text links under what they act on. Imported last. |
| 4 | // |
| 5 | // main[data-width] col 620px (settings, forms), read 900px (lists, threads), wide (code, CI) |
| 6 | // .tabs one row of text tabs |
| 7 | // .sec one topic: h2, .state, .hint, .acts |
| 8 | // .acts .act text-link actions; .act.danger, .act.quiet |
| 9 | // .reveal .opened an action that opens in place (views::parts) |
| 10 | // .line one list row: .name then .val right after it, never pushed to the far end |
| 11 | // .plain-search search as one underlined line |
| 12 | // .sub the second level: small text links |
| 13 | // .field label above, control, hint under |
| 14 | |
| 15 | :root { |
| 16 | --edge: 187px; |
| 17 | --col: 620px; |
| 18 | --read: 900px; |
| 19 | } |
| 20 | |
| 21 | @media (max-width: 899px) { |
| 22 | :root { |
| 23 | --edge: 16px; |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | // Shell |
| 28 | |
| 29 | .topbar { |
| 30 | gap: 0; |
| 31 | } |
| 32 | |
| 33 | // The logo and Explore. Both take the width of their own text, so neither runs under the other. |
| 34 | .top-start { |
| 35 | display: flex; |
| 36 | flex: none; |
| 37 | align-items: center; |
| 38 | gap: 4px; |
| 39 | } |
| 40 | |
| 41 | .top-explore { |
| 42 | display: inline-flex; |
| 43 | align-items: center; |
| 44 | flex: none; |
| 45 | gap: 6px; |
| 46 | padding: 6px 8px; |
| 47 | border-radius: var(--radius-sm); |
| 48 | color: var(--text-2); |
| 49 | font-size: 14px; |
| 50 | text-decoration: none; |
| 51 | |
| 52 | &:hover { |
| 53 | background: var(--surface-2); |
| 54 | color: var(--text); |
| 55 | text-decoration: none; |
| 56 | } |
| 57 | |
| 58 | .ico { |
| 59 | width: 16px; |
| 60 | height: 16px; |
| 61 | } |
| 62 | } |
| 63 | |
| 64 | @media (min-width: 900px) { |
| 65 | .topbar { |
| 66 | height: 52px; |
| 67 | padding: 0 24px; |
| 68 | border-bottom: 1px solid var(--border); |
| 69 | } |
| 70 | |
| 71 | // The logo and Explore hold the room up to the edge, so the path bar stands on it. |
| 72 | .top-start { |
| 73 | box-sizing: border-box; |
| 74 | width: calc(var(--edge) - 24px); |
| 75 | min-width: max-content; |
| 76 | padding-right: 6px; |
| 77 | } |
| 78 | |
| 79 | .pathbar, |
| 80 | .pathbar:has(.pathbar-edit) { |
| 81 | flex: 0 1 var(--col); |
| 82 | width: var(--col); |
| 83 | max-width: var(--col); |
| 84 | height: 34px; |
| 85 | box-sizing: border-box; |
| 86 | padding: 0 6px 0 12px; |
| 87 | border: 1px solid var(--border); |
| 88 | border-radius: var(--radius-sm); |
| 89 | } |
| 90 | |
| 91 | .pathbar-ico { |
| 92 | display: block; |
| 93 | width: 15px; |
| 94 | height: 15px; |
| 95 | margin-right: 8px; |
| 96 | color: var(--muted); |
| 97 | } |
| 98 | |
| 99 | .pathbar-segs { |
| 100 | font-family: var(--font); |
| 101 | font-size: 14px; |
| 102 | } |
| 103 | |
| 104 | .pathbar-edit { |
| 105 | justify-content: space-between; |
| 106 | } |
| 107 | |
| 108 | .live-strip { |
| 109 | margin-left: 16px; |
| 110 | } |
| 111 | |
| 112 | .shell-body > main { |
| 113 | box-sizing: border-box; |
| 114 | width: 100%; |
| 115 | padding: 24px 40px 72px var(--edge); |
| 116 | } |
| 117 | |
| 118 | main[data-width="col"] { |
| 119 | max-width: calc(var(--edge) + var(--col) + 40px); |
| 120 | } |
| 121 | |
| 122 | main[data-width="read"] { |
| 123 | max-width: calc(var(--edge) + var(--read) + 40px); |
| 124 | } |
| 125 | } |
| 126 | |
| 127 | @media (max-width: 899px) { |
| 128 | .top-explore { |
| 129 | padding: 6px; |
| 130 | |
| 131 | span { |
| 132 | display: none; |
| 133 | } |
| 134 | } |
| 135 | } |
| 136 | |
| 137 | // Tabs |
| 138 | |
| 139 | .tabs { |
| 140 | display: flex; |
| 141 | gap: 20px; |
| 142 | overflow-x: auto; |
| 143 | margin-bottom: 8px; |
| 144 | border-bottom: 1px solid var(--border); |
| 145 | scrollbar-width: none; |
| 146 | |
| 147 | > a { |
| 148 | flex: none; |
| 149 | padding: 8px 0; |
| 150 | color: var(--muted); |
| 151 | font-size: 14px; |
| 152 | text-decoration: none; |
| 153 | |
| 154 | &:hover { |
| 155 | color: var(--text); |
| 156 | text-decoration: none; |
| 157 | } |
| 158 | |
| 159 | &[aria-current="page"] { |
| 160 | color: var(--text); |
| 161 | box-shadow: inset 0 -2px 0 var(--accent); |
| 162 | } |
| 163 | } |
| 164 | } |
| 165 | |
| 166 | // A topic |
| 167 | |
| 168 | .sec { |
| 169 | display: flex; |
| 170 | flex-direction: column; |
| 171 | gap: 8px; |
| 172 | padding: 18px 0; |
| 173 | border-bottom: 1px solid var(--border); |
| 174 | |
| 175 | &:last-child { |
| 176 | border-bottom: 0; |
| 177 | } |
| 178 | |
| 179 | > h2 { |
| 180 | margin: 0; |
| 181 | font-family: var(--font); |
| 182 | font-size: 15px; |
| 183 | font-weight: 600; |
| 184 | letter-spacing: 0; |
| 185 | line-height: 1.3; |
| 186 | text-transform: none; |
| 187 | color: var(--text); |
| 188 | } |
| 189 | } |
| 190 | |
| 191 | .state { |
| 192 | margin: 0; |
| 193 | color: var(--text-2); |
| 194 | } |
| 195 | |
| 196 | .hint { |
| 197 | margin: 0; |
| 198 | color: var(--muted); |
| 199 | font-size: 13px; |
| 200 | line-height: 1.45; |
| 201 | } |
| 202 | |
| 203 | // Actions |
| 204 | |
| 205 | .acts { |
| 206 | display: flex; |
| 207 | flex-wrap: wrap; |
| 208 | align-items: center; |
| 209 | gap: 8px 16px; |
| 210 | } |
| 211 | |
| 212 | .sec > .acts { |
| 213 | margin-top: 4px; |
| 214 | } |
| 215 | |
| 216 | a.act, |
| 217 | button.act, |
| 218 | summary.act { |
| 219 | display: inline; |
| 220 | height: auto; |
| 221 | min-height: 0; |
| 222 | padding: 0; |
| 223 | border: 0; |
| 224 | border-radius: 0; |
| 225 | background: none; |
| 226 | box-shadow: none; |
| 227 | color: var(--accent-ink); |
| 228 | cursor: pointer; |
| 229 | font: inherit; |
| 230 | font-weight: 500; |
| 231 | text-decoration: none; |
| 232 | |
| 233 | &:hover { |
| 234 | border: 0; |
| 235 | background: none; |
| 236 | color: var(--accent-ink); |
| 237 | text-decoration: underline; |
| 238 | text-underline-offset: 3px; |
| 239 | } |
| 240 | |
| 241 | &.danger, |
| 242 | &.danger:hover { |
| 243 | color: var(--bad); |
| 244 | } |
| 245 | |
| 246 | &.quiet, |
| 247 | &.quiet:hover { |
| 248 | color: var(--text-2); |
| 249 | } |
| 250 | } |
| 251 | |
| 252 | summary.act { |
| 253 | list-style: none; |
| 254 | |
| 255 | &::-webkit-details-marker { |
| 256 | display: none; |
| 257 | } |
| 258 | } |
| 259 | |
| 260 | .act-form { |
| 261 | display: inline; |
| 262 | margin: 0; |
| 263 | } |
| 264 | |
| 265 | // An action that opens in place. Its panel takes a line of its own under the links beside it. |
| 266 | |
| 267 | .reveal { |
| 268 | display: contents; |
| 269 | } |
| 270 | |
| 271 | .reveal > summary.act { |
| 272 | order: 0; |
| 273 | } |
| 274 | |
| 275 | .opened { |
| 276 | display: flex; |
| 277 | flex: 0 0 100%; |
| 278 | flex-direction: column; |
| 279 | order: 1; |
| 280 | gap: 12px; |
| 281 | box-sizing: border-box; |
| 282 | width: 100%; |
| 283 | margin: 4px 0 6px; |
| 284 | padding: 2px 0 2px 12px; |
| 285 | border-left: 2px solid var(--accent); |
| 286 | } |
| 287 | |
| 288 | // List rows |
| 289 | |
| 290 | .line { |
| 291 | display: flex; |
| 292 | align-items: center; |
| 293 | gap: 12px; |
| 294 | min-height: 44px; |
| 295 | border-bottom: 1px solid var(--border); |
| 296 | color: inherit; |
| 297 | text-decoration: none; |
| 298 | |
| 299 | &:hover { |
| 300 | text-decoration: none; |
| 301 | } |
| 302 | |
| 303 | &:last-child { |
| 304 | border-bottom: 0; |
| 305 | } |
| 306 | |
| 307 | .name { |
| 308 | font-weight: 500; |
| 309 | } |
| 310 | |
| 311 | .val { |
| 312 | min-width: 0; |
| 313 | overflow: hidden; |
| 314 | color: var(--muted); |
| 315 | font-size: 13px; |
| 316 | text-overflow: ellipsis; |
| 317 | white-space: nowrap; |
| 318 | } |
| 319 | } |
| 320 | |
| 321 | a.line:hover .name { |
| 322 | color: var(--accent-ink); |
| 323 | } |
| 324 | |
| 325 | div.line { |
| 326 | min-height: 36px; |
| 327 | } |
| 328 | |
| 329 | // A row that opens in place: its details and its actions under it. |
| 330 | |
| 331 | .row-open { |
| 332 | > summary.line { |
| 333 | list-style: none; |
| 334 | cursor: pointer; |
| 335 | |
| 336 | &::-webkit-details-marker { |
| 337 | display: none; |
| 338 | } |
| 339 | |
| 340 | &:hover .name { |
| 341 | color: var(--accent-ink); |
| 342 | } |
| 343 | } |
| 344 | |
| 345 | &:last-child > summary.line { |
| 346 | border-bottom: 0; |
| 347 | } |
| 348 | |
| 349 | &[open] > summary.line { |
| 350 | border-bottom: 0; |
| 351 | } |
| 352 | |
| 353 | > .opened { |
| 354 | margin: 0 0 10px; |
| 355 | } |
| 356 | } |
| 357 | |
| 358 | // Search and the second level |
| 359 | |
| 360 | .plain-search { |
| 361 | display: flex; |
| 362 | align-items: center; |
| 363 | gap: 8px; |
| 364 | height: 36px; |
| 365 | margin: 12px 0 4px; |
| 366 | padding: 0 2px; |
| 367 | border-bottom: 1px solid var(--border-strong); |
| 368 | color: var(--muted); |
| 369 | |
| 370 | .ico { |
| 371 | width: 16px; |
| 372 | height: 16px; |
| 373 | } |
| 374 | |
| 375 | input { |
| 376 | flex: 1 1 auto; |
| 377 | min-width: 0; |
| 378 | height: 34px; |
| 379 | padding: 0; |
| 380 | border: 0; |
| 381 | border-radius: 0; |
| 382 | outline: 0; |
| 383 | background: none; |
| 384 | box-shadow: none; |
| 385 | color: var(--text); |
| 386 | font: inherit; |
| 387 | } |
| 388 | |
| 389 | &:focus-within { |
| 390 | border-bottom-color: var(--accent); |
| 391 | } |
| 392 | } |
| 393 | |
| 394 | .sub { |
| 395 | display: flex; |
| 396 | flex-wrap: wrap; |
| 397 | align-items: center; |
| 398 | gap: 8px 16px; |
| 399 | padding: 12px 0 2px; |
| 400 | color: var(--muted); |
| 401 | font-size: 13px; |
| 402 | |
| 403 | a { |
| 404 | color: var(--muted); |
| 405 | text-decoration: none; |
| 406 | |
| 407 | &:hover { |
| 408 | color: var(--text); |
| 409 | text-decoration: none; |
| 410 | } |
| 411 | |
| 412 | &[aria-current="page"] { |
| 413 | color: var(--text); |
| 414 | } |
| 415 | } |
| 416 | |
| 417 | a.act { |
| 418 | color: var(--accent-ink); |
| 419 | } |
| 420 | |
| 421 | + .line { |
| 422 | margin-top: 8px; |
| 423 | } |
| 424 | } |
| 425 | |
| 426 | // Forms: label above, control, hint under, one action under them |
| 427 | |
| 428 | .field { |
| 429 | display: flex; |
| 430 | flex-direction: column; |
| 431 | gap: 6px; |
| 432 | min-width: 0; |
| 433 | |
| 434 | > label { |
| 435 | margin: 0; |
| 436 | font-size: 14px; |
| 437 | font-weight: 500; |
| 438 | } |
| 439 | |
| 440 | input:not([type="checkbox"], [type="radio"], [type="color"], [type="file"]), |
| 441 | select, |
| 442 | textarea { |
| 443 | width: 100%; |
| 444 | max-width: none; |
| 445 | box-sizing: border-box; |
| 446 | } |
| 447 | } |
| 448 | |
| 449 | .fields { |
| 450 | display: flex; |
| 451 | flex-direction: column; |
| 452 | gap: 14px; |
| 453 | margin: 0; |
| 454 | |
| 455 | > button.primary, |
| 456 | > button[type="submit"] { |
| 457 | align-self: flex-start; |
| 458 | } |
| 459 | } |
| 460 | |
| 461 | .field-pair { |
| 462 | display: grid; |
| 463 | grid-template-columns: repeat(2, minmax(0, 1fr)); |
| 464 | gap: 16px; |
| 465 | } |
| 466 | |
| 467 | @media (max-width: 599px) { |
| 468 | .field-pair { |
| 469 | grid-template-columns: minmax(0, 1fr); |
| 470 | } |
| 471 | } |
| 472 | |
| 473 | // A switch sits right before its own label. |
| 474 | |
| 475 | .switch { |
| 476 | display: flex; |
| 477 | align-items: flex-start; |
| 478 | gap: 10px; |
| 479 | margin: 0; |
| 480 | font-weight: 400; |
| 481 | cursor: pointer; |
| 482 | |
| 483 | input[type="checkbox"] { |
| 484 | flex: none; |
| 485 | margin: 1px 0 0; |
| 486 | } |
| 487 | } |
| 488 | |
| 489 | // A detail page's own name |
| 490 | |
| 491 | .h1 { |
| 492 | margin: 0; |
| 493 | font-family: var(--display, var(--font)); |
| 494 | font-size: 24px; |
| 495 | font-weight: 700; |
| 496 | line-height: 1.2; |
| 497 | } |
| 498 | |
| 499 | .h1 + .hint { |
| 500 | margin-top: 6px; |
| 501 | margin-bottom: 10px; |
| 502 | } |
| 503 | |
| 504 | .back-act { |
| 505 | display: inline-block; |
| 506 | margin: 12px 0 10px; |
| 507 | } |
| 508 | |
| 509 | // A tick or a radio always sits right before its own text, wherever the label is. |
| 510 | main label:not(.colour-choice, .find-opt, .choice > label):has(> input[type="checkbox"]), |
| 511 | main label:not(.colour-choice, .find-opt, .choice > label):has(> input[type="radio"]) { |
| 512 | display: flex; |
| 513 | flex-direction: row; |
| 514 | align-items: flex-start; |
| 515 | gap: 10px; |
| 516 | font-weight: 400; |
| 517 | |
| 518 | > input { |
| 519 | flex: none; |
| 520 | width: auto; |
| 521 | margin: 1px 0 0; |
| 522 | } |
| 523 | } |
| 524 | |
| 525 | // A select in a row of small links is as wide as its text. |
| 526 | .sub select { |
| 527 | width: auto; |
| 528 | max-width: 100%; |
| 529 | height: 28px; |
| 530 | font-size: 13px; |
| 531 | } |
| 532 | |
| 533 | // Nothing here is a box: topics sit straight on the page. |
| 534 | main[data-width="read"] .explore, |
| 535 | main[data-width="read"] .heat, |
| 536 | main .lang-list, |
| 537 | main .snippet-files { |
| 538 | border: 0; |
| 539 | border-radius: 0; |
| 540 | background: none; |
| 541 | box-shadow: none; |
| 542 | padding-left: 0; |
| 543 | padding-right: 0; |
| 544 | } |
| 545 | |
| 546 | main .explore { |
| 547 | margin-top: 0; |
| 548 | } |
| 549 | |
| 550 | .pull-topics { |
| 551 | display: flex; |
| 552 | flex-direction: column; |
| 553 | } |
| 554 | |
| 555 | .profile-head .profile-avatar { |
| 556 | width: 64px !important; |
| 557 | height: 64px !important; |
| 558 | } |
| 559 | |
| 560 | .sub + .hint { |
| 561 | margin-top: 10px; |
| 562 | } |