|
| 1 | +.Page { |
| 2 | + display: inline-block; |
| 3 | + min-width: 32px; /* primer.control.medium.size */ |
| 4 | + height: 32px; /* primer.control.medium.size */ |
| 5 | + padding: var(--base-size-8) calc((var(--base-size-32) - var(--base-size-20)) / 2); /* primer.control.medium.paddingInline.condensed primer.control.medium.paddingBlock */ |
| 6 | + margin-right: var(--base-size-4); |
| 7 | + font-style: normal; |
| 8 | + /* stylelint-disable-next-line primer/typography */ |
| 9 | + line-height: 1; |
| 10 | + color: var(----fgColor-default); |
| 11 | + text-align: center; |
| 12 | + text-decoration: none; |
| 13 | + white-space: nowrap; |
| 14 | + vertical-align: middle; |
| 15 | + cursor: pointer; |
| 16 | + user-select: none; |
| 17 | + background-color: transparent; |
| 18 | + border-radius: var(--borderRadius-medium); |
| 19 | + transition: background-color 0.2s cubic-bezier(0.3, 0, 0.5, 1); |
| 20 | +} |
| 21 | + |
| 22 | +@supports (clip-path: polygon(50% 0, 100% 50%, 50% 100%)) { |
| 23 | + .Page[rel='prev']::before, |
| 24 | + .Page[rel='next']::after { |
| 25 | + display: inline-block; |
| 26 | + width: 16px; |
| 27 | + height: 16px; |
| 28 | + vertical-align: text-bottom; |
| 29 | + content: ''; |
| 30 | + background-color: currentColor; |
| 31 | + } |
| 32 | + |
| 33 | + /* chevron-left */ |
| 34 | + .Page[rel='prev']::before { |
| 35 | + margin-right: var(--base-size-4); |
| 36 | + clip-path: polygon( |
| 37 | + 9.8px 12.8px, |
| 38 | + 8.7px 12.8px, |
| 39 | + 4.5px 8.5px, |
| 40 | + 4.5px 7.5px, |
| 41 | + 8.7px 3.2px, |
| 42 | + 9.8px 4.3px, |
| 43 | + 6.1px 8px, |
| 44 | + 9.8px 11.7px, |
| 45 | + 9.8px 12.8px |
| 46 | + ); |
| 47 | + } |
| 48 | + |
| 49 | + /* chevron-right */ |
| 50 | + .Page[rel='next']::after { |
| 51 | + margin-left: var(--base-size-4); |
| 52 | + clip-path: polygon( |
| 53 | + 6.2px 3.2px, |
| 54 | + 7.3px 3.2px, |
| 55 | + 11.5px 7.5px, |
| 56 | + 11.5px 8.5px, |
| 57 | + 7.3px 12.8px, |
| 58 | + 6.2px 11.7px, |
| 59 | + 9.9px 8px, |
| 60 | + 6.2px 4.3px, |
| 61 | + 6.2px 3.2px |
| 62 | + ); |
| 63 | + } |
| 64 | +} |
| 65 | + |
| 66 | +.Page:last-child { |
| 67 | + margin-right: 0; |
| 68 | +} |
| 69 | + |
| 70 | +.Page:hover, |
| 71 | +.Page:focus { |
| 72 | + text-decoration: none; |
| 73 | + background-color: var(--control-transparent-bgColor-hover); |
| 74 | + outline: 0; |
| 75 | + transition-duration: 0.1s; |
| 76 | +} |
| 77 | + |
| 78 | +.Page:focus-visible { |
| 79 | + outline: 2px solid var(--bgColor-accent-emphasis); |
| 80 | + outline-offset: -2px; |
| 81 | +} |
| 82 | + |
| 83 | +.Page:active { |
| 84 | + border-color: var(--borderColor-muted); |
| 85 | +} |
| 86 | + |
| 87 | +.Page[rel='prev'], |
| 88 | +.Page[rel='next'] { |
| 89 | + color: var(--fgColor-accent); |
| 90 | +} |
| 91 | + |
| 92 | +.Page[aria-current], |
| 93 | +.Page[aria-current]:hover { |
| 94 | + color: var(--fgColor-onEmphasis); |
| 95 | + background-color: var(--bgColor-accent-emphasis); |
| 96 | + border-color: transparent; |
| 97 | +} |
| 98 | + |
| 99 | +.Page[aria-current]:focus-visible { |
| 100 | + outline: 2px solid var(--bgColor-accent-emphasis); |
| 101 | + outline-offset: -2px; |
| 102 | + /* stylelint-disable-next-line primer/box-shadow */ |
| 103 | + box-shadow: inset 0 0 0 3px var(--fgColor-onEmphasis); |
| 104 | +} |
| 105 | + |
| 106 | +.Page[aria-disabled]:first-child, |
| 107 | +.Page[aria-disabled]:hover:first-child { |
| 108 | + /* stylelint-disable-next-line primer/spacing */ |
| 109 | + margin: 0 2px; |
| 110 | + /* stylelint-disable-next-line primer/spacing */ |
| 111 | + margin-right: 6px; |
| 112 | +} |
| 113 | + |
| 114 | +.Page[aria-disabled], |
| 115 | +.Page[aria-disabled]:hover, |
| 116 | +.Page[role='presentation'], |
| 117 | +.Page[role='presentation']:hover { |
| 118 | + color: var(--fgColor-disabled); |
| 119 | + cursor: default; |
| 120 | + background-color: transparent; |
| 121 | +} |
| 122 | + |
| 123 | +.PaginationContainer { |
| 124 | + /* stylelint-disable-next-line primer/spacing */ |
| 125 | + margin-top: 20px; |
| 126 | + /* stylelint-disable-next-line primer/spacing */ |
| 127 | + margin-bottom: 15px; |
| 128 | + text-align: center; |
| 129 | +} |
| 130 | + |
| 131 | +@media ((max-width: calc(768px - 0.02px))) { |
| 132 | + .TablePaginationSteps[data-hidden-viewport-ranges*='narrow'] > *:not(:first-child):not(:last-child) { |
| 133 | + display: none; |
| 134 | + } |
| 135 | + |
| 136 | + .TablePaginationSteps[data-hidden-viewport-ranges*='narrow'] > *:first-child { |
| 137 | + margin-inline-end: 0; |
| 138 | + } |
| 139 | + |
| 140 | + .TablePaginationSteps[data-hidden-viewport-ranges*='narrow'] > *:last-child { |
| 141 | + margin-inline-start: 0; |
| 142 | + } |
| 143 | +} |
| 144 | + |
| 145 | +@media ((min-width: 768px)) { |
| 146 | + .TablePaginationSteps[data-hidden-viewport-ranges*='regular'] > *:not(:first-child):not(:last-child) { |
| 147 | + display: none; |
| 148 | + } |
| 149 | + |
| 150 | + .TablePaginationSteps[data-hidden-viewport-ranges*='regular'] > *:first-child { |
| 151 | + margin-inline-end: 0; |
| 152 | + } |
| 153 | + |
| 154 | + .TablePaginationSteps[data-hidden-viewport-ranges*='regular'] > *:last-child { |
| 155 | + margin-inline-start: 0; |
| 156 | + } |
| 157 | +} |
| 158 | + |
| 159 | +@media ((min-width: 1400px)) { |
| 160 | + .TablePaginationSteps[data-hidden-viewport-ranges*='wide'] > *:not(:first-child):not(:last-child) { |
| 161 | + display: none; |
| 162 | + } |
| 163 | + |
| 164 | + .TablePaginationSteps[data-hidden-viewport-ranges*='wide'] > *:first-child { |
| 165 | + margin-inline-end: 0; |
| 166 | + } |
| 167 | + |
| 168 | + .TablePaginationSteps[data-hidden-viewport-ranges*='wide'] > *:last-child { |
| 169 | + margin-inline-start: 0; |
| 170 | + } |
| 171 | +} |
0 commit comments