|
1 | 1 | [data-component="tabs"] { |
| 2 | + --tabs-bar-height: 48px; |
| 3 | + --tabs-compact-pill-height: 24px; |
| 4 | + --tabs-compact-pill-radius: 6px; |
| 5 | + --tabs-compact-pill-padding-x: 4px; |
| 6 | + |
2 | 7 | width: 100%; |
3 | 8 | height: 100%; |
4 | 9 | display: flex; |
|
93 | 98 | outline: none; |
94 | 99 | box-shadow: none; |
95 | 100 | } |
96 | | - &:has([data-hidden]) { |
97 | | - [data-slot="tabs-trigger-close-button"] { |
98 | | - opacity: 0; |
99 | | - } |
100 | | - |
101 | | - &:hover { |
102 | | - [data-slot="tabs-trigger-close-button"] { |
103 | | - opacity: 1; |
104 | | - } |
105 | | - } |
106 | | - } |
107 | 101 | &:has([data-selected]) { |
108 | 102 | color: var(--text-strong); |
109 | 103 | background-color: transparent; |
|
112 | 106 | opacity: 1; |
113 | 107 | } |
114 | 108 | } |
| 109 | + |
115 | 110 | &:hover:not(:disabled):not([data-selected]) { |
116 | 111 | color: var(--text-strong); |
117 | 112 | } |
|
140 | 135 | } |
141 | 136 | } |
142 | 137 |
|
| 138 | + #review-panel &[data-variant="normal"][data-orientation="horizontal"] { |
| 139 | + background-color: var(--background-stronger); |
| 140 | + |
| 141 | + [data-slot="tabs-list"] { |
| 142 | + height: var(--tabs-bar-height); |
| 143 | + padding-left: 12px; |
| 144 | + padding-right: 0; |
| 145 | + --tabs-review-gap: 16px; |
| 146 | + --tabs-review-fade: 16px; |
| 147 | + gap: var(--tabs-review-gap); |
| 148 | + background-color: var(--background-stronger); |
| 149 | + border-bottom: 1px solid var(--border-weak-base); |
| 150 | + |
| 151 | + &::after { |
| 152 | + display: none; |
| 153 | + } |
| 154 | + |
| 155 | + > .sticky { |
| 156 | + border-bottom: none; |
| 157 | + background-color: var(--background-stronger); |
| 158 | + |
| 159 | + &::before { |
| 160 | + content: ""; |
| 161 | + position: absolute; |
| 162 | + top: 0; |
| 163 | + bottom: 0; |
| 164 | + left: calc(var(--tabs-review-fade) * -1); |
| 165 | + width: var(--tabs-review-fade); |
| 166 | + pointer-events: none; |
| 167 | + background: linear-gradient(90deg, transparent, var(--background-stronger)); |
| 168 | + } |
| 169 | + } |
| 170 | + } |
| 171 | + |
| 172 | + [data-slot="tabs-trigger-wrapper"] { |
| 173 | + height: var(--tabs-compact-pill-height); |
| 174 | + margin-block: calc((var(--tabs-bar-height) - var(--tabs-compact-pill-height)) / 2); |
| 175 | + max-width: 320px; |
| 176 | + padding-inline: var(--tabs-compact-pill-padding-x); |
| 177 | + box-sizing: border-box; |
| 178 | + border: 1px solid transparent; |
| 179 | + border-radius: var(--tabs-compact-pill-radius); |
| 180 | + background-color: transparent; |
| 181 | + gap: 8px; |
| 182 | + color: var(--text-weak); |
| 183 | + transition: |
| 184 | + color 120ms ease, |
| 185 | + background-color 120ms ease, |
| 186 | + border-color 120ms ease; |
| 187 | + |
| 188 | + &::after { |
| 189 | + content: ""; |
| 190 | + position: absolute; |
| 191 | + left: 0; |
| 192 | + right: 0; |
| 193 | + bottom: calc((var(--tabs-compact-pill-height) - var(--tabs-bar-height)) / 2); |
| 194 | + height: 1px; |
| 195 | + background-color: var(--text-strong); |
| 196 | + opacity: 0; |
| 197 | + transform: scaleX(0.75); |
| 198 | + transform-origin: center; |
| 199 | + transition: |
| 200 | + opacity 120ms ease, |
| 201 | + transform 120ms ease; |
| 202 | + } |
| 203 | + |
| 204 | + &[data-value="review"] { |
| 205 | + padding-left: 8px; |
| 206 | + padding-right: 8px; |
| 207 | + } |
| 208 | + |
| 209 | + [data-slot="tabs-trigger"] { |
| 210 | + height: 100%; |
| 211 | + padding: 0 !important; |
| 212 | + } |
| 213 | + |
| 214 | + &:has([data-slot="tabs-trigger-close-button"]) { |
| 215 | + padding-right: 5px; |
| 216 | + [data-slot="tabs-trigger"] { |
| 217 | + padding-right: 0 !important; |
| 218 | + } |
| 219 | + } |
| 220 | + |
| 221 | + &:has([data-selected]) { |
| 222 | + color: var(--text-strong); |
| 223 | + background-color: var(--surface-base-active); |
| 224 | + border-color: var(--border-weak-base); |
| 225 | + |
| 226 | + &::after { |
| 227 | + opacity: 1; |
| 228 | + transform: scaleX(1); |
| 229 | + } |
| 230 | + } |
| 231 | + |
| 232 | + [data-component="file-icon"] { |
| 233 | + filter: grayscale(1) !important; |
| 234 | + transition: filter 120ms ease; |
| 235 | + } |
| 236 | + |
| 237 | + &:has([data-selected]) { |
| 238 | + [data-component="file-icon"] { |
| 239 | + filter: grayscale(0) !important; |
| 240 | + } |
| 241 | + } |
| 242 | + |
| 243 | + &:hover:not(:disabled):not(:has([data-selected])) { |
| 244 | + color: var(--text-base); |
| 245 | + background-color: var(--surface-base-hover); |
| 246 | + } |
| 247 | + } |
| 248 | + } |
| 249 | + |
143 | 250 | &[data-variant="alt"] { |
144 | 251 | [data-slot="tabs-list"] { |
145 | 252 | padding-left: 24px; |
|
282 | 389 | } |
283 | 390 |
|
284 | 391 | [data-slot="tabs-trigger-wrapper"] { |
285 | | - height: 24px; |
286 | | - border-radius: 6px; |
| 392 | + height: var(--tabs-compact-pill-height); |
| 393 | + border-radius: var(--tabs-compact-pill-radius); |
287 | 394 | color: var(--text-weak); |
| 395 | + box-sizing: border-box; |
| 396 | + border: 1px solid transparent; |
| 397 | + transition: |
| 398 | + color 120ms ease, |
| 399 | + background-color 120ms ease, |
| 400 | + border-color 120ms ease; |
288 | 401 |
|
289 | 402 | &:not(:has([data-selected])):hover:not(:disabled) { |
290 | 403 | color: var(--text-base); |
291 | 404 | } |
292 | 405 |
|
293 | 406 | &:has([data-selected]) { |
294 | 407 | color: var(--text-strong); |
| 408 | + border-color: var(--border-weak-base); |
295 | 409 | } |
296 | 410 | } |
297 | 411 | } |
|
459 | 573 | } |
460 | 574 | } |
461 | 575 | } |
| 576 | + |
| 577 | +[data-component="tabs-drag-preview"] { |
| 578 | + position: relative; |
| 579 | + display: flex; |
| 580 | + align-items: center; |
| 581 | + height: var(--tabs-bar-height, 48px); |
| 582 | + max-width: 320px; |
| 583 | + padding-inline: var(--tabs-compact-pill-padding-x, 4px); |
| 584 | + overflow: hidden; |
| 585 | + color: var(--text-strong); |
| 586 | + opacity: 0.6; |
| 587 | +} |
| 588 | + |
| 589 | +[data-component="tabs-drag-preview"]::before { |
| 590 | + content: ""; |
| 591 | + position: absolute; |
| 592 | + left: 0; |
| 593 | + right: 0; |
| 594 | + top: calc((var(--tabs-bar-height, 48px) - var(--tabs-compact-pill-height, 24px)) / 2); |
| 595 | + height: var(--tabs-compact-pill-height, 24px); |
| 596 | + border: 1px solid var(--border-weak-base); |
| 597 | + border-radius: var(--tabs-compact-pill-radius, 6px); |
| 598 | + background-color: var(--surface-base-active); |
| 599 | +} |
| 600 | + |
| 601 | +[data-component="tabs-drag-preview"]::after { |
| 602 | + content: ""; |
| 603 | + position: absolute; |
| 604 | + left: 0; |
| 605 | + right: 0; |
| 606 | + bottom: 0; |
| 607 | + height: 1px; |
| 608 | + background-color: var(--text-strong); |
| 609 | +} |
| 610 | + |
| 611 | +[data-component="tabs-drag-preview"] > * { |
| 612 | + position: relative; |
| 613 | +} |
0 commit comments