|
22 | 22 | margin-trim: block; |
23 | 23 |
|
24 | 24 | &:not(:where(.nq-prose-compact, [nq-prose-compact])) { |
25 | | - > *:not(:where(.nq-raw, .nq-raw *, .nq-not-prose, .nq-not-prose *)) { |
| 25 | + >*:not(:where(.nq-raw, .nq-raw *, .nq-not-prose, .nq-not-prose *)) { |
26 | 26 | padding-right: 2rem; |
27 | 27 | padding-left: 2rem; |
28 | 28 |
|
|
52 | 52 | --font-size: clamp(calc(1px * var(--font-size-min)), var(--font-size-fluid), calc(var(--font-size-max) * 1px)); |
53 | 53 | } |
54 | 54 |
|
55 | | - > *:first-child { |
| 55 | + >*:first-child { |
56 | 56 | margin-top: 0; |
57 | 57 | /* TODO Remove margin-top and margin-bottom on last element when margin-trim is widely supported */ |
58 | 58 | } |
59 | 59 |
|
60 | | - > *:last-child { |
| 60 | + >*:last-child { |
61 | 61 | margin-bottom: 0; |
62 | 62 | } |
63 | 63 |
|
|
171 | 171 | outline-offset: 0.125rem; |
172 | 172 | } |
173 | 173 |
|
174 | | - > a { |
| 174 | + >a { |
175 | 175 | position: absolute; |
176 | 176 | inset: 0; |
177 | 177 | padding-left: 20px; |
|
192 | 192 | margin-bottom: 0; |
193 | 193 | line-height: 1.5; |
194 | 194 |
|
195 | | - & + p { |
| 195 | + &+p { |
196 | 196 | margin-top: 16px; |
197 | 197 | } |
198 | 198 | } |
199 | 199 |
|
200 | | - &:where(:not(blockquote p)) { |
201 | | - --font-size-min: 14; |
202 | | - --font-size-max: 16; |
203 | | - font-size: var(--font-size); |
204 | | - } |
205 | | - |
206 | 200 | &:where(figure) { |
207 | 201 | figcaption { |
208 | 202 | color: rgb(var(--nq-neutral-700)); |
|
282 | 276 | margin-left: 40px; |
283 | 277 | } |
284 | 278 |
|
285 | | - > ol li { |
| 279 | + >ol li { |
286 | 280 | margin-left: 0; |
287 | 281 | } |
288 | 282 |
|
|
333 | 327 | top: 2px; |
334 | 328 | } |
335 | 329 |
|
336 | | - > ol { |
| 330 | + >ol { |
337 | 331 | counter-reset: subitem; |
338 | 332 |
|
339 | 333 | li { |
|
415 | 409 | text-decoration: none; |
416 | 410 | color: rgb(var(--nq-blue) / 1); |
417 | 411 | } |
418 | | - } |
419 | | - |
420 | | - table { |
421 | | - --nq-m-min: 24; |
422 | | - --nq-m-max: 32; |
423 | | - margin-bottom: var(--nq-m-size); |
424 | | - margin-top: var(--nq-m-size); |
425 | | - display: block; |
426 | | - overflow-x: auto; |
427 | | - border-spacing: 0; |
428 | | - border-collapse: separate; |
429 | | - border-radius: 6px; |
430 | | - border: 1px solid rgb(var(--nq-neutral-300)); |
431 | | - max-height: 90dvh; |
432 | | - max-width: max-content; |
433 | | - scroll-behavior: smooth; |
434 | | - |
435 | | - code, |
436 | | - pre { |
437 | | - --line-height: 1.3; |
438 | | - padding: 4px 0.25rem; |
439 | | - position: relative; |
440 | | - } |
441 | 412 |
|
442 | | - th, |
443 | | - td { |
444 | | - padding: 12px 0.75rem; |
445 | | - } |
446 | | - |
447 | | - thead th { |
448 | | - z-index: 1; |
449 | | - position: sticky; |
450 | | - top: -1px; |
451 | | - text-wrap: balance; |
452 | | - white-space: nowrap; |
453 | | - font-weight: 400; |
454 | | - color: rgb(var(--nq-neutral-800)); |
455 | | - background-color: rgb(var(--nq-neutral-100)); |
456 | | - } |
| 413 | + table { |
| 414 | + --nq-m-min: 24; |
| 415 | + --nq-m-max: 32; |
| 416 | + margin-bottom: var(--nq-m-size); |
| 417 | + margin-top: var(--nq-m-size); |
| 418 | + display: block; |
| 419 | + overflow-x: auto; |
| 420 | + border-spacing: 0; |
| 421 | + border-collapse: separate; |
| 422 | + border-radius: 6px; |
| 423 | + border: 1px solid rgb(var(--nq-neutral-300)); |
| 424 | + max-height: 90dvh; |
| 425 | + max-width: max-content; |
| 426 | + scroll-behavior: smooth; |
| 427 | + |
| 428 | + code, |
| 429 | + pre { |
| 430 | + --line-height: 1.3; |
| 431 | + padding: 4px 0.25rem; |
| 432 | + position: relative; |
| 433 | + } |
457 | 434 |
|
458 | | - tbody { |
| 435 | + th, |
459 | 436 | td { |
460 | | - vertical-align: initial; |
| 437 | + padding: 12px 0.75rem; |
| 438 | + } |
| 439 | + |
| 440 | + thead th { |
| 441 | + z-index: 1; |
| 442 | + position: sticky; |
| 443 | + top: -1px; |
461 | 444 | text-wrap: balance; |
| 445 | + white-space: nowrap; |
| 446 | + font-weight: 400; |
| 447 | + color: rgb(var(--nq-neutral-800)); |
| 448 | + background-color: rgb(var(--nq-neutral-100)); |
462 | 449 | } |
463 | 450 |
|
464 | | - > tr:not(:last-child) td { |
465 | | - border-bottom: 1px solid rgb(var(--nq-neutral-300)); |
| 451 | + tbody { |
| 452 | + td { |
| 453 | + vertical-align: initial; |
| 454 | + text-wrap: balance; |
| 455 | + } |
| 456 | + |
| 457 | + >tr:not(:last-child) td { |
| 458 | + border-bottom: 1px solid rgb(var(--nq-neutral-300)); |
| 459 | + } |
| 460 | + } |
| 461 | + |
| 462 | + /* Apply a border to the right of all but the last column */ |
| 463 | + th:not(:last-child), |
| 464 | + td:not(:last-child) { |
| 465 | + border-right: 1px solid rgb(var(--nq-neutral-300)); |
466 | 466 | } |
467 | 467 | } |
468 | 468 |
|
469 | | - /* Apply a border to the right of all but the last column */ |
470 | | - th:not(:last-child), |
471 | | - td:not(:last-child) { |
472 | | - border-right: 1px solid rgb(var(--nq-neutral-300)); |
| 469 | + hr { |
| 470 | + --nq-m-min: 20; |
| 471 | + --nq-m-max: 24; |
| 472 | + margin: var(--nq-m-size) auto; |
| 473 | + width: 128px; |
| 474 | + border-color: rgb(var(--nq-neutral-500)); |
473 | 475 | } |
474 | | - } |
475 | 476 |
|
476 | | - hr { |
477 | | - --nq-m-min: 20; |
478 | | - --nq-m-max: 24; |
479 | | - margin: var(--nq-m-size) auto; |
480 | | - width: 128px; |
481 | | - border-color: rgb(var(--nq-neutral-500)); |
482 | | - } |
| 477 | + details { |
| 478 | + /* TODO Animate open/closing https://developer.chrome.com/docs/css-ui/animate-to-height-auto#animate_the_details_element */ |
| 479 | + border-radius: 6px; |
| 480 | + background-color: rgb(var(--nq-neutral-200)); |
| 481 | + --nq-m-min: 18; |
| 482 | + --nq-m-max: 22; |
| 483 | + margin-top: var(--nq-m-size); |
| 484 | + margin-bottom: var(--nq-m-size); |
| 485 | + color: rgb(var(--nq-neutral-900)); |
| 486 | + box-shadow: 0 0 0 1.5px rgb(var(--nq-neutral) / 0.1); |
483 | 487 |
|
484 | | - details { |
485 | | - /* TODO Animate open/closing https://developer.chrome.com/docs/css-ui/animate-to-height-auto#animate_the_details_element */ |
486 | | - border-radius: 6px; |
487 | | - background-color: rgb(var(--nq-neutral-200)); |
488 | | - --nq-m-min: 18; |
489 | | - --nq-m-max: 22; |
490 | | - margin-top: var(--nq-m-size); |
491 | | - margin-bottom: var(--nq-m-size); |
492 | | - color: rgb(var(--nq-neutral-900)); |
493 | | - box-shadow: 0 0 0 1.5px rgb(var(--nq-neutral) / 0.1); |
494 | | - |
495 | | - ::marker { |
496 | | - color: transparent; |
497 | | - } |
| 488 | + ::marker { |
| 489 | + color: transparent; |
| 490 | + } |
498 | 491 |
|
499 | | - summary { |
500 | | - padding: 14px 2rem 14px calc(0.7rem + 2.3em); |
501 | | - font-size: 1em; |
502 | | - position: relative; |
503 | | - display: flex; |
504 | | - align-items: center; |
505 | | - cursor: pointer; |
506 | | - |
507 | | - &::before { |
508 | | - content: ''; |
509 | | - --icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMTIgMTIiPjxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTIgMS40MTNBLjguOCAwIDAxMy4yMTIuNzI3bDcuNjQ1IDQuNTg3YS44LjggMCAwMTAgMS4zNzJsLTcuNjQ1IDQuNTg3QS44LjggMCAwMTIgMTAuNTg3eiIvPjwvc3ZnPg==); |
510 | | - -webkit-mask: var(--icon) no-repeat; |
511 | | - mask: var(--icon) no-repeat; |
512 | | - -webkit-mask-size: 100% 100%; |
513 | | - mask-size: 100% 100%; |
514 | | - background-color: currentColor; |
515 | | - color: inherit; |
516 | | - width: 0.622em; |
517 | | - height: 0.622em; |
518 | | - transition: transform 100ms ease-out; |
519 | | - display: inline-block; |
520 | | - position: absolute; |
521 | | - left: 0; |
522 | | - padding-left: 4rem; |
| 492 | + summary { |
| 493 | + padding: 14px 2rem 14px calc(0.7rem + 2.3em); |
| 494 | + font-size: 1em; |
| 495 | + position: relative; |
| 496 | + display: flex; |
| 497 | + align-items: center; |
| 498 | + cursor: pointer; |
| 499 | + |
| 500 | + &::before { |
| 501 | + content: ''; |
| 502 | + --icon: url(data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIxZW0iIGhlaWdodD0iMWVtIiB2aWV3Qm94PSIwIDAgMTIgMTIiPjxwYXRoIGZpbGw9ImN1cnJlbnRDb2xvciIgZD0iTTIgMS40MTNBLjguOCAwIDAxMy4yMTIuNzI3bDcuNjQ1IDQuNTg3YS44LjggMCAwMTAgMS4zNzJsLTcuNjQ1IDQuNTg3QS44LjggMCAwMTIgMTAuNTg3eiIvPjwvc3ZnPg==); |
| 503 | + -webkit-mask: var(--icon) no-repeat; |
| 504 | + mask: var(--icon) no-repeat; |
| 505 | + -webkit-mask-size: 100% 100%; |
| 506 | + mask-size: 100% 100%; |
| 507 | + background-color: currentColor; |
| 508 | + color: inherit; |
| 509 | + width: 0.622em; |
| 510 | + height: 0.622em; |
| 511 | + transition: transform 100ms ease-out; |
| 512 | + display: inline-block; |
| 513 | + position: absolute; |
| 514 | + left: 0; |
| 515 | + padding-left: 4rem; |
| 516 | + } |
523 | 517 | } |
524 | | - } |
525 | 518 |
|
526 | | - &[open] summary { |
527 | | - &::before { |
528 | | - transform: rotate(90deg); |
| 519 | + &[open] summary { |
| 520 | + &::before { |
| 521 | + transform: rotate(90deg); |
| 522 | + } |
529 | 523 | } |
530 | | - } |
531 | 524 |
|
532 | | - > *:not(summary) { |
533 | | - padding: 0 1rem 14px 1rem; |
| 525 | + >*:not(summary) { |
| 526 | + padding: 0 1rem 14px 1rem; |
| 527 | + } |
534 | 528 | } |
535 | 529 | } |
536 | 530 | } |
0 commit comments