|
| 1 | +/* |
| 2 | + * Pagination component |
| 3 | + * Token hierarchy: semantics.css → themes.css (dark overrides) |
| 4 | + * Usage: _pagination.html |
| 5 | + * |
| 6 | + * Two navs are rendered: --wide (±2 window) and --narrow (±1 window). |
| 7 | + * CSS toggles which one is visible based on viewport width. |
| 8 | + * display:none removes both from the visual layer and the a11y tree. |
| 9 | + */ |
| 10 | + |
| 11 | +.pagination { |
| 12 | + display: flex; |
| 13 | + flex-direction: row; |
| 14 | + justify-content: center; |
| 15 | + align-items: center; |
| 16 | + gap: var(--space-default); |
| 17 | + padding: var(--space-large) 0; |
| 18 | + list-style: none; |
| 19 | + margin: 0; |
| 20 | +} |
| 21 | + |
| 22 | +/* ── Shared button styles ── */ |
| 23 | + |
| 24 | +.pagination__item { |
| 25 | + display: flex; |
| 26 | +} |
| 27 | + |
| 28 | +.pagination__link, |
| 29 | +.pagination__chevron { |
| 30 | + display: flex; |
| 31 | + align-items: center; |
| 32 | + justify-content: center; |
| 33 | + height: 40px; |
| 34 | + padding: 0 var(--space-large); |
| 35 | + border: 1px solid transparent; |
| 36 | + border-radius: var(--border-radius-xl); |
| 37 | + font-family: var(--font-sans); |
| 38 | + font-size: var(--font-size-small); |
| 39 | + font-weight: var(--font-weight-regular); |
| 40 | + line-height: var(--line-height-default); |
| 41 | + color: var(--color-text-secondary); |
| 42 | + text-decoration: none; |
| 43 | + transition: background-color 0.15s ease; |
| 44 | +} |
| 45 | + |
| 46 | +/* ── Page number links ── */ |
| 47 | + |
| 48 | +.pagination__link:hover { |
| 49 | + background-color: var(--color-surface-mid); |
| 50 | + border-color: var(--color-stroke-weak); |
| 51 | + color: var(--color-text-primary); |
| 52 | +} |
| 53 | + |
| 54 | +.pagination__link--active { |
| 55 | + background-color: var(--color-surface-weak); |
| 56 | + border-color: var(--color-stroke-weak); |
| 57 | + color: var(--color-text-primary); |
| 58 | + pointer-events: none; |
| 59 | +} |
| 60 | + |
| 61 | +/* ── Ellipsis ── */ |
| 62 | + |
| 63 | +.pagination__ellipsis { |
| 64 | + display: flex; |
| 65 | + align-items: center; |
| 66 | + justify-content: center; |
| 67 | + height: 40px; |
| 68 | + padding: 0 var(--space-default); |
| 69 | + font-family: var(--font-sans); |
| 70 | + font-size: var(--font-size-small); |
| 71 | + font-weight: var(--font-weight-regular); |
| 72 | + color: var(--color-text-tertiary); |
| 73 | + user-select: none; |
| 74 | +} |
| 75 | + |
| 76 | +/* ── Chevron navigation ── */ |
| 77 | + |
| 78 | +.pagination__chevron { |
| 79 | + width: 20px; |
| 80 | + height: 20px; |
| 81 | + padding: 0; |
| 82 | + border: none; |
| 83 | + color: var(--color-icon-primary); |
| 84 | +} |
| 85 | + |
| 86 | +.pagination__chevron--disabled { |
| 87 | + color: var(--color-text-tertiary); |
| 88 | + pointer-events: none; |
| 89 | + cursor: default; |
| 90 | +} |
| 91 | + |
| 92 | +/* ── Responsive visibility ── */ |
| 93 | + |
| 94 | +.pagination-nav--narrow { |
| 95 | + display: none; |
| 96 | +} |
| 97 | + |
| 98 | +@media (max-width: 767px) { |
| 99 | + .pagination-nav--wide { |
| 100 | + display: none; |
| 101 | + } |
| 102 | + |
| 103 | + .pagination-nav--narrow { |
| 104 | + display: block; |
| 105 | + } |
| 106 | +} |
0 commit comments