tabs.css (85037B)
1 /* This Source Code Form is subject to the terms of the Mozilla Public 2 * License, v. 2.0. If a copy of the MPL was not distributed with this 3 * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ 4 5 :root { 6 --tabstrip-inner-border: 1px solid color-mix(in srgb, currentColor 25%, transparent); 7 --tabstrip-min-height: calc(var(--tab-min-height) + 2 * var(--tab-block-margin)); 8 --tab-min-height: 36px; 9 --tab-group-suggestions-loading-animation-color-1: color-mix(in srgb, currentColor 5%, transparent); 10 --tab-group-suggestions-loading-animation-color-2: color-mix(in srgb, currentColor 35%, transparent); 11 &[uidensity="compact"] { 12 --tab-min-height: 29px; 13 } 14 &[uidensity="touch"] { 15 --tab-min-height: 41px; 16 } 17 --tab-group-label-height: max(1.5em, var(--tab-min-height) - 14px); 18 --tab-group-label-padding: 4px; 19 --tab-group-label-highlight-thickness: 3px; 20 --tab-group-label-animation-duration: 150ms; 21 --tab-group-line-thickness: 2px; 22 --tab-group-line-toolbar-border-distance: 1px; 23 /* Collapsed tabs should be square, so set width to match the min height */ 24 --tab-collapsed-background-width: var(--tab-min-height); 25 --tab-collapsed-width: calc(var(--tab-collapsed-background-width) + 2 * var(--tab-inner-inline-margin)); 26 --tab-inner-inline-margin: var(--space-medium); 27 --tab-inline-padding: 8px; 28 --tab-pinned-expanded-background-width: 40px; 29 --tab-pinned-margin-inline-expanded: var(--space-xsmall); 30 --tab-pinned-min-width-expanded: calc(var(--tab-pinned-expanded-background-width) + 2 * var(--tab-pinned-margin-inline-expanded)); 31 --tab-pinned-container-margin-inline-expanded: var(--space-small); 32 --tab-border-radius: var(--toolbarbutton-border-radius); 33 --tab-overflow-clip-margin: 2px; 34 --tab-close-button-padding: 6px; 35 --tab-block-margin: 4px; 36 --tab-icon-end-margin: 5.5px; 37 --tab-label-line-height: 1.7; 38 --tab-loading-fill: #0a84ff; 39 --tab-hover-background-color: color-mix(in srgb, currentColor 11%, transparent); 40 --tab-selected-textcolor: var(--toolbar-color); 41 --tab-selected-bgcolor: var(--toolbar-bgcolor); 42 --tab-selected-color-scheme: var(--toolbar-color-scheme); 43 &[lwt-tab-selected="light"] { 44 --tab-selected-color-scheme: light; 45 } 46 &[lwt-tab-selected="dark"] { 47 --tab-selected-color-scheme: dark; 48 } 49 --tab-selected-shadow: var(--box-shadow-tab); 50 --tab-outline: 1px solid var(--tab-outline-color); 51 --tab-outline-color: transparent; 52 --tab-outline-offset: -1px; 53 --tab-selected-outline-color: transparent; 54 --tab-hover-outline-color: transparent; 55 @media (prefers-contrast) { 56 --tab-selected-outline-color: currentColor; 57 --tab-hover-outline-color: currentColor; 58 } 59 @media (forced-colors) { 60 &:not([lwtheme]) { 61 --tab-outline-color: ButtonText; 62 --tab-hover-outline-color: SelectedItem; 63 --tab-selected-outline-color: SelectedItem; 64 } 65 } 66 &[lwtheme] { 67 --tab-selected-outline-color: var(--lwt-tab-line-color, currentColor); 68 } 69 --tab-dragover-transition: transform 200ms var(--animation-easing-function); 70 71 --vertical-tabs-scrollbar-color: auto; 72 @media (-moz-platform: macos) { 73 --vertical-tabs-scrollbar-color: color-mix(in srgb, currentColor 26%, transparent) transparent; 74 } 75 76 /* TAB GROUP COLORS 77 * tab-group-color-* is used for expanded groups in light mode and collapsed groups in dark mode 78 * tab-group-color-*-invert is used for expanded groups in dark mode 79 * tab-group-color-*-pale is used for collapsed groups in light mode */ 80 --tab-group-color-blue: var(--color-blue-70); 81 --tab-group-color-blue-invert: var(--color-blue-20); 82 --tab-group-color-blue-pale: var(--color-blue-0); 83 --tab-group-color-purple: var(--color-purple-70); 84 --tab-group-color-purple-invert: var(--color-purple-20); 85 --tab-group-color-purple-pale: var(--color-purple-0); 86 --tab-group-color-cyan: var(--color-cyan-70); 87 --tab-group-color-cyan-invert: var(--color-cyan-20); 88 --tab-group-color-cyan-pale: var(--color-cyan-0); 89 --tab-group-color-orange: var(--color-orange-70); 90 --tab-group-color-orange-invert: var(--color-orange-20); 91 --tab-group-color-orange-pale: var(--color-orange-0); 92 --tab-group-color-yellow: var(--color-yellow-70); 93 --tab-group-color-yellow-invert: var(--color-yellow-20); 94 --tab-group-color-yellow-pale: var(--color-yellow-0); 95 --tab-group-color-pink: var(--color-pink-70); 96 --tab-group-color-pink-invert: var(--color-pink-20); 97 --tab-group-color-pink-pale: var(--color-pink-0); 98 --tab-group-color-green: var(--color-green-70); 99 --tab-group-color-green-invert: var(--color-green-20); 100 --tab-group-color-green-pale: var(--color-green-0); 101 --tab-group-color-red: var(--color-red-70); 102 --tab-group-color-red-invert: var(--color-red-20); 103 --tab-group-color-red-pale: var(--color-red-0); 104 --tab-group-color-gray: #5e6a77; 105 --tab-group-color-gray-invert: #99a6b4; 106 --tab-group-color-gray-pale: #f2f9ff; 107 108 --tab-group-label-text-dark: var(--color-gray-100); 109 /* 5px of padding-block are adding to .tabbrowser-tab */ 110 --tab-height-with-margin-padding: calc(5px + var(--tab-min-height) + (2 * var(--tab-block-margin))); 111 } 112 113 /* stylelint-disable-next-line media-query-no-invalid */ 114 @media -moz-pref("sidebar.verticalTabs") { 115 :root { 116 --tab-min-height: max(32px, calc(var(--tab-label-line-height) * 1em)); 117 --tab-block-margin: 2px; 118 --tab-inline-padding: var(--space-medium); 119 } 120 } 121 122 #tabbrowser-tabs { 123 /* Overriding tabbox.css */ 124 border: 0; 125 126 /* Use a bigger flex value than the searchbar to prevent it from 127 * taking all the toolbar space. */ 128 flex: 1000 1000; 129 130 &[orient="horizontal"] { 131 min-height: var(--tabstrip-min-height); 132 133 --tab-min-width: 76px; 134 --tab-min-width-extra-icons: 0px; 135 --tab-min-width-uidensity: 0px; 136 --tab-max-width: 225px; 137 138 /* Touch mode needs additional space for the close button. */ 139 :root[uidensity="touch"] & { 140 --tab-min-width-uidensity: 10px; 141 } 142 143 /* Make it easier to drag tabs by expanding the drag area downwards. */ 144 &[movingtab] { 145 padding-bottom: 15px; 146 margin-bottom: -15px; 147 } 148 149 --tab-width-transition: min-width 100ms ease-out, max-width 100ms ease-out; 150 } 151 152 &[noshadowfortests] { 153 --tab-selected-shadow: none; 154 } 155 156 &[orient="horizontal"] { 157 --tab-group-label-highlight-radius: 2px; 158 } 159 160 &[orient="vertical"] { 161 --tab-group-label-highlight-radius: 4px; 162 } 163 } 164 165 #navigator-toolbox[movingtab] > #nav-bar { 166 pointer-events: none; 167 168 /* Allow dropping a tab on buttons with associated drop actions. */ 169 > #nav-bar-customization-target { 170 > #personal-bookmarks, 171 > #home-button, 172 > #downloads-button, 173 > #bookmarks-menu-button { 174 pointer-events: auto; 175 } 176 } 177 } 178 179 .closing-tabs-spacer { 180 pointer-events: none; 181 182 #tabbrowser-arrowscrollbox:not(:hover) > #tabbrowser-arrowscrollbox-periphery > & { 183 transition: width 0.15s ease-out; 184 } 185 } 186 187 #tabbrowser-arrowscrollbox-periphery { 188 position: relative; 189 } 190 191 .tabbrowser-tab[dragtarget], 192 tab-split-view-wrapper[dragtarget] { 193 /* Margin needs to be at least 4px to not clip multiselect stacking effect */ 194 overflow-clip-margin: 4px; 195 z-index: 3 !important; 196 position: absolute !important; 197 pointer-events: none; /* avoid blocking dragover events on scroll buttons */ 198 199 /* stylelint-disable-next-line media-query-no-invalid */ 200 @media -moz-pref("browser.tabs.dragDrop.multiselectStacking") { 201 &[multiselected]:not([small-stack], [big-stack]) { 202 visibility: hidden; 203 } 204 } 205 } 206 207 .tabbrowser-tab { 208 --tab-label-mask-size: 1em; 209 210 appearance: none; 211 background-color: transparent; 212 color: inherit; 213 color-scheme: unset; 214 border-radius: 0; 215 border-width: 0; 216 margin: 0; 217 padding: 0 var(--tab-overflow-clip-margin); 218 align-items: stretch; 219 /* Needed so that overflowing content overflows towards the end rather than 220 getting centered. That prevents tab opening animation from looking off at 221 the start, see bug 1759221. */ 222 justify-content: flex-start; 223 overflow: clip; 224 /* Needed to avoid clipping the tab-background shadow, which has a 4px blur. */ 225 overflow-clip-margin: var(--tab-overflow-clip-margin); 226 227 #tabbrowser-tabs[orient="horizontal"] &:not([pinned]) { 228 flex: 100 100; 229 max-width: var(--tab-max-width); 230 transition: var(--tab-width-transition); 231 232 &:not([fadein]) { 233 max-width: 0.1px; 234 min-width: 0.1px; 235 visibility: hidden; 236 } 237 238 &[fadein] { 239 min-width: calc(var(--tab-min-width-pref, var(--tab-min-width)) + var(--tab-min-width-extra-icons) + var(--tab-min-width-uidensity)); 240 &:is([muted], [soundplaying], [activemedia-blocked]):not([tab-note]) { 241 --tab-min-width-extra-icons: 24px; 242 } 243 &[tab-note]:not([muted], [soundplaying], [activemedia-blocked]) { 244 --tab-min-width-extra-icons: 20px; 245 } 246 &[tab-note]:is([muted], [soundplaying], [activemedia-blocked]) { 247 --tab-min-width-extra-icons: 44px; 248 } 249 } 250 } 251 252 #tabbrowser-tabs[movingtab] & { 253 position: relative; 254 255 @media (prefers-reduced-motion: no-preference) { 256 :not(tab-group:active) > &[fadein]:not(:active, [multiselected]), 257 &[multiselected-move-together], 258 &[tabdrop-samewindow] { 259 transition: var(--tab-dragover-transition); 260 } 261 } 262 } 263 264 &[multiselected-move-together][multiselected] { 265 z-index: 3; 266 267 &[visually-selected] { 268 z-index: 4; 269 } 270 271 &:not([selected]) { 272 z-index: 2; 273 } 274 } 275 276 /* stylelint-disable-next-line media-query-no-invalid */ 277 @media not -moz-pref("sidebar.visibility", "expand-on-hover") { 278 /* We need these rules to apply at all times when the sidebar.visibility 279 pref is not set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 280 has not been added to root. There are certain scenarios when that attribute is temporarily 281 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 282 &:is([muted], [soundplaying], [activemedia-blocked]) { 283 --tab-icon-end-margin: 2px; 284 } 285 } 286 } 287 288 .tab-content { 289 position: relative; 290 padding: 0 var(--tab-inline-padding); 291 292 &:not([pinned]) { 293 min-width: 0; 294 } 295 296 :root:not([uidensity="compact"], [sidebar-expand-on-hover]) &[pinned] { 297 padding: 0 10px; 298 } 299 300 &:is([selected], [multiselected]) { 301 color: var(--tab-selected-textcolor); 302 color-scheme: var(--tab-selected-color-scheme); 303 } 304 } 305 306 @media (prefers-reduced-motion: no-preference) { 307 .tab-loading-burst { 308 border-radius: inherit; 309 position: relative; 310 overflow: hidden; 311 312 &::before { 313 position: absolute; 314 content: ""; 315 /* We set the width to be a percentage of the tab's width so that we can use 316 the `scale` transform to scale it up to the full size of the tab when the 317 burst occurs. We also need to set the margin-inline-start so that the 318 center of the burst matches the center of the favicon. */ 319 width: 5%; 320 height: 100%; 321 /* Center the burst over the .tab-loading-burst; it's 9px from the edge thanks 322 to .tab-content, plus 8px more since .tab-loading-burst is 16px wide. */ 323 margin-inline-start: calc(17px - 2.5%); 324 } 325 326 &[pinned]::before { 327 /* This is like the margin-inline-start rule above, except that icons for 328 pinned tabs are 12px from the edge. */ 329 margin-inline-start: calc(20px - 2.5%); 330 } 331 332 &[bursting]::before { 333 background-color: var(--tab-loading-fill); 334 clip-path: circle(closest-side); 335 animation: tab-burst-animation 375ms cubic-bezier(0, 0, 0.58, 1); 336 } 337 338 &[bursting][notselectedsinceload]::before { 339 animation-name: tab-burst-animation-light; 340 } 341 } 342 343 @keyframes tab-burst-animation { 344 0% { 345 opacity: 0.4; 346 transform: scale(1); 347 } 348 100% { 349 opacity: 0; 350 transform: scale(40); 351 } 352 } 353 354 @keyframes tab-burst-animation-light { 355 0% { 356 opacity: 0.2; 357 transform: scale(1); 358 } 359 100% { 360 opacity: 0; 361 transform: scale(40); 362 } 363 } 364 } 365 366 .tab-icon-pending:not([fadein]), 367 .tab-icon-image:not([fadein]), 368 .tab-close-button:not([fadein]), 369 .tab-background:not([fadein]) { 370 visibility: hidden; 371 } 372 373 .tab-label:not([fadein]), 374 .tab-throbber:not([fadein]) { 375 display: none; 376 } 377 378 /* Width/height & margins apply on tab icon stack children */ 379 .tab-throbber, 380 .tab-icon-pending, 381 .tab-icon-image, 382 .tab-sharing-icon-overlay, 383 .tab-icon-overlay { 384 height: 16px; 385 width: 16px; 386 387 /* apply end margin to tabs which are: 388 - oriented horizontally and not pinned 389 - vertical but expanded and not pinned 390 - expand on hover enabled, vertical but expanded 391 */ 392 #tabbrowser-tabs[orient="horizontal"] &:not([pinned]), 393 :root:not([sidebar-expand-on-hover]) #tabbrowser-tabs[orient="vertical"][expanded] &:not([pinned]) { 394 margin-inline-end: var(--tab-icon-end-margin); 395 } 396 397 /* stylelint-disable-next-line media-query-no-invalid */ 398 @media -moz-pref("sidebar.visibility", "expand-on-hover") { 399 /* We need these rules to apply at all times when the sidebar.visibility 400 pref is set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 401 has been added to root. There are certain scenarios when that attribute is temporarily 402 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 403 #tabbrowser-tabs[orient="vertical"][expanded] & { 404 margin-inline-end: var(--tab-icon-end-margin); 405 } 406 } 407 } 408 409 .tab-throbber { 410 &:not([busy]) { 411 display: none; 412 } 413 414 @media (prefers-reduced-motion: reduce) { 415 background-image: url("chrome://global/skin/icons/loading.svg"); 416 background-position: center; 417 background-repeat: no-repeat; 418 -moz-context-properties: fill; 419 fill: currentColor; 420 opacity: 0.4; 421 422 &[progress] { 423 opacity: 0.8; 424 } 425 } 426 427 @media (prefers-reduced-motion: no-preference) { 428 :root[sessionrestored] & { 429 &[busy] { 430 position: relative; 431 overflow: hidden; 432 433 &::before { 434 content: ""; 435 position: absolute; 436 background-image: url("chrome://browser/skin/tabbrowser/loading.svg"); 437 background-position: left center; 438 background-repeat: no-repeat; 439 width: 480px; 440 height: 100%; 441 animation: tab-throbber-animation 1.05s steps(30) infinite; 442 -moz-context-properties: fill; 443 fill: currentColor; 444 opacity: 0.7; 445 } 446 447 &:-moz-locale-dir(rtl)::before { 448 animation-name: tab-throbber-animation-rtl; 449 } 450 } 451 452 &[progress]::before { 453 fill: var(--tab-loading-fill); 454 opacity: 1; 455 } 456 457 #TabsToolbar[brighttext] &[progress]:not([selected])::before { 458 fill: #84c1ff; 459 } 460 } 461 } 462 } 463 464 @keyframes tab-throbber-animation { 465 0% { 466 transform: translateX(0); 467 } 468 100% { 469 transform: translateX(-100%); 470 } 471 } 472 473 @keyframes tab-throbber-animation-rtl { 474 0% { 475 transform: translateX(0); 476 } 477 100% { 478 transform: translateX(100%); 479 } 480 } 481 482 .tab-icon-pending:is(:not([pendingicon]), [busy], [pinned]) { 483 display: none; 484 } 485 486 :root { 487 --tab-sharing-icon-animation: 3s linear tab-sharing-icon-pulse infinite; 488 } 489 490 @keyframes tab-sharing-icon-pulse { 491 0%, 492 16.66%, 493 83.33%, 494 100% { 495 opacity: 0; 496 } 497 33.33%, 498 66.66% { 499 opacity: 1; 500 } 501 } 502 503 .tab-icon-image { 504 -moz-context-properties: fill, stroke; 505 fill: currentColor; 506 507 /* stylelint-disable-next-line media-query-no-invalid */ 508 @media -moz-pref("browser.tabs.fadeOutUnloadedTabs") { 509 &[pending] { 510 filter: grayscale(100%); 511 @media (prefers-color-scheme: dark) { 512 filter: grayscale(100%) invert(); 513 } 514 opacity: 0.5; 515 /* Fade the favicon out */ 516 transition-property: filter, opacity; 517 transition-duration: 1s; 518 } 519 &:not([pending]) { 520 /* When loading the tab, just show the favicon without a transition. 521 The favicon turns into the "loading" state anyway, so we don't want 522 to interfere with that. */ 523 transition: none; 524 } 525 } 526 527 /* stylelint-disable-next-line media-query-no-invalid */ 528 @media -moz-pref("browser.tabs.fadeOutExplicitlyUnloadedTabs") { 529 &[pending][discarded] { 530 filter: grayscale(100%); 531 @media (prefers-color-scheme: dark) { 532 filter: grayscale(100%) invert(); 533 } 534 opacity: 0.5; 535 /* Fade the favicon out */ 536 transition-property: filter, opacity; 537 transition-duration: 1s; 538 } 539 &:not([pending]) { 540 /* When loading the tab, just show the favicon without a transition. 541 The favicon turns into the "loading" state anyway, so we don't want 542 to interfere with that. */ 543 transition: none; 544 } 545 } 546 547 &:not([src]), 548 &:-moz-broken { 549 content: url("chrome://global/skin/icons/defaultFavicon.svg"); 550 } 551 552 &[sharing]:not([selected]) { 553 animation: var(--tab-sharing-icon-animation); 554 animation-delay: -1.5s; 555 } 556 /* Hide the generic favicon only in horizontal mode. In vertical mode, tabs may not 557 have labels (collapsed state) or we want icons and labels to line up vertically 558 (expanded state). */ 559 #tabbrowser-tabs[orient="horizontal"] &:not([src], [pinned], [crashed], [sharing], [pictureinpicture]), 560 &[busy] { 561 display: none; 562 } 563 } 564 565 .tab-sharing-icon-overlay, 566 .tab-icon-overlay, 567 .tab-note-icon-overlay { 568 display: none; 569 } 570 571 .tab-sharing-icon-overlay { 572 position: relative; 573 -moz-context-properties: fill; 574 fill: rgb(224, 41, 29); 575 animation: var(--tab-sharing-icon-animation); 576 577 &[sharing="camera"] { 578 list-style-image: url("chrome://browser/skin/notification-icons/camera.svg"); 579 } 580 581 &[sharing="microphone"] { 582 list-style-image: url("chrome://browser/skin/notification-icons/microphone.svg"); 583 } 584 585 &[sharing="screen"] { 586 list-style-image: url("chrome://browser/skin/notification-icons/screen.svg"); 587 } 588 589 &[sharing]:not([selected]) { 590 display: revert; 591 } 592 } 593 594 .tab-icon-overlay { 595 position: relative; 596 padding: 2px; 597 top: -7px; 598 inset-inline-end: -7px; 599 z-index: 1; /* Overlay tab title */ 600 601 #tabbrowser-tabs[orient="vertical"] & { 602 top: 7px; 603 } 604 605 &[crashed] { 606 list-style-image: url("chrome://browser/skin/tabbrowser/crashed.svg"); 607 } 608 609 #tabbrowser-tabs[orient="vertical"]:not([expanded]) &:not([crashed]), 610 &[pinned]:not([crashed]) { 611 &[soundplaying] { 612 list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg"); 613 } 614 615 &[muted] { 616 list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-muted-small.svg"); 617 } 618 619 &[activemedia-blocked] { 620 list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-blocked-small.svg"); 621 } 622 623 &:is([soundplaying], [muted], [activemedia-blocked]) { 624 /* We want to make this look like the selected tab, but fully opaque. For that, 625 * we build a stack of `--lwt-accent-color` (guaranteed opaque), then 626 * `--toolbox-bgcolor`, then `--tab-selected-bgcolor`. 627 * 628 * We rely on at least one of `--toolbox-bgcolor` / `--tab-selected-bgcolor` 629 * being opaque on the system themes, so even though `--lwt-accent-color` is 630 * not set there, it ends up working out because we never see it through. 631 * 632 * We also apply one extra color on top (--audio-overlay-extra-background) 633 * for hover / active feedback. 634 */ 635 --audio-overlay-extra-background: transparent; 636 background-color: var(--lwt-accent-color); 637 background-image: linear-gradient(var(--audio-overlay-extra-background)), linear-gradient(var(--toolbox-bgcolor)); 638 -moz-context-properties: fill; 639 fill: var(--tab-selected-textcolor); 640 color-scheme: var(--tab-selected-color-scheme); 641 border-radius: var(--border-radius-circle); 642 643 .browser-toolbox-background:-moz-window-inactive &:not([selected]) { 644 background-image: linear-gradient(var(--audio-overlay-extra-background)), linear-gradient(var(--toolbox-bgcolor-inactive)); 645 } 646 647 &:hover { 648 --audio-overlay-extra-background: var(--button-background-color-ghost-hover); 649 } 650 651 &:hover:active { 652 --audio-overlay-extra-background: var(--button-background-color-ghost-active); 653 } 654 655 &[selected] { 656 background-image: 657 linear-gradient(var(--audio-overlay-extra-background)), linear-gradient(var(--tab-selected-bgcolor)), linear-gradient(var(--toolbox-bgcolor)); 658 } 659 660 .browser-toolbox-background:-moz-window-inactive &[selected] { 661 background-image: 662 linear-gradient(var(--audio-overlay-extra-background)), linear-gradient(var(--tab-selected-bgcolor)), linear-gradient(var(--toolbox-bgcolor-inactive)); 663 } 664 } 665 } 666 667 &[pinned]:is([soundplaying], [muted], [activemedia-blocked]), 668 &[crashed] { 669 display: revert; 670 } 671 672 /* stylelint-disable-next-line media-query-no-invalid */ 673 @media -moz-pref("sidebar.visibility", "expand-on-hover") { 674 /* We need these rules to apply at all times when the sidebar.visibility 675 pref is set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 676 has been added to root. There are certain scenarios when that attribute is temporarily 677 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 678 #tabbrowser-tabs[orient="vertical"] &:is([soundplaying], [muted], [activemedia-blocked]) { 679 display: revert; 680 } 681 682 #tabbrowser-tabs[orient="vertical"] &:not([crashed]) { 683 &[soundplaying] { 684 list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg"); 685 } 686 687 &[muted] { 688 list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-muted-small.svg"); 689 } 690 691 &[activemedia-blocked] { 692 list-style-image: url("chrome://browser/skin/tabbrowser/tab-audio-blocked-small.svg"); 693 } 694 695 &:is([soundplaying], [muted], [activemedia-blocked]) { 696 /* We want to make this look like the selected tab, but fully opaque. For that, 697 * we build a stack of `--lwt-accent-color` (guaranteed opaque), then 698 * `--toolbox-bgcolor`, then `--tab-selected-bgcolor`. 699 * 700 * We rely on at least one of `--toolbox-bgcolor` / `--tab-selected-bgcolor` 701 * being opaque on the system themes, so even though `--lwt-accent-color` is 702 * not set there, it ends up working out because we never see it through. 703 * 704 * We also apply one extra color on top (--audio-overlay-extra-background) 705 * for hover / active feedback. 706 */ 707 --audio-overlay-extra-background: transparent; 708 background-color: var(--lwt-accent-color); 709 background-image: linear-gradient(var(--audio-overlay-extra-background)), linear-gradient(var(--toolbox-bgcolor)); 710 -moz-context-properties: fill; 711 fill: var(--tab-selected-textcolor); 712 color-scheme: var(--tab-selected-color-scheme); 713 border-radius: var(--border-radius-circle); 714 715 .browser-toolbox-background:-moz-window-inactive &:not([selected]) { 716 background-image: linear-gradient(var(--audio-overlay-extra-background)), linear-gradient(var(--toolbox-bgcolor-inactive)); 717 } 718 719 &:hover { 720 --audio-overlay-extra-background: var(--button-background-color-ghost-hover); 721 } 722 723 &:hover:active { 724 --audio-overlay-extra-background: var(--button-background-color-ghost-active); 725 } 726 727 &[selected] { 728 background-image: 729 linear-gradient(var(--audio-overlay-extra-background)), linear-gradient(var(--tab-selected-bgcolor)), linear-gradient(var(--toolbox-bgcolor)); 730 } 731 732 .browser-toolbox-background:-moz-window-inactive &[selected] { 733 background-image: 734 linear-gradient(var(--audio-overlay-extra-background)), linear-gradient(var(--tab-selected-bgcolor)), 735 linear-gradient(var(--toolbox-bgcolor-inactive)); 736 } 737 } 738 } 739 } 740 741 /* stylelint-disable-next-line media-query-no-invalid */ 742 @media not -moz-pref("sidebar.visibility", "expand-on-hover") { 743 /* We need these rules to apply at all times when the sidebar.visibility 744 pref is not set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 745 has not been added to root. There are certain scenarios when that attribute is temporarily 746 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 747 #tabbrowser-tabs[orient="vertical"]:not([expanded]) &:is([soundplaying], [muted], [activemedia-blocked]) { 748 display: revert; 749 } 750 } 751 } 752 753 /* 754 * Tab note icon that overlays the favicon for pinned tabs and the collapsed 755 * vertical tab strip. The horizontal tab strip and expanded vertical tab strip 756 * get a separate, more spacious treatment using the `.tab-notes-icon` image. 757 * Note: This is intended to display instead of the `.tab-icon-overlay`. This 758 * is defined separately from `.tab-icon-overlay` since the tab notes icon has 759 * fewer features (e.g. no icon interactivity) and 760 */ 761 .tab-note-icon-overlay { 762 position: relative; 763 padding: 2px; 764 top: -7px; 765 inset-inline-end: -7px; 766 z-index: 1; /* Overlay tab title */ 767 list-style-image: url("chrome://global/skin/icons/tab-notes-12.svg"); 768 769 background-color: var(--lwt-accent-color); 770 background-image: linear-gradient(transparent), linear-gradient(var(--toolbox-bgcolor)); 771 -moz-context-properties: fill; 772 fill: var(--icon-color); 773 color-scheme: var(--tab-selected-color-scheme); 774 border-radius: var(--border-radius-circle); 775 776 .browser-toolbox-background:-moz-window-inactive .tabbrowser-tab:not([selected]) & { 777 background-image: linear-gradient(transparent), linear-gradient(var(--toolbox-bgcolor-inactive)); 778 } 779 .tabbrowser-tab[selected] & { 780 background-image: linear-gradient(transparent), linear-gradient(var(--tab-selected-bgcolor)), linear-gradient(var(--toolbox-bgcolor)); 781 } 782 783 .browser-toolbox-background:-moz-window-inactive .tabbrowser-tab[selected] & { 784 background-image: linear-gradient(transparent), linear-gradient(var(--tab-selected-bgcolor)), linear-gradient(var(--toolbox-bgcolor-inactive)); 785 } 786 787 #tabbrowser-tabs[orient="vertical"] & { 788 top: 7px; 789 } 790 791 #tabbrowser-tabs[orient="vertical"]:not([expanded]) .tabbrowser-tab[tab-note]:not([crashed], [soundplaying], [muted], [activemedia-blocked]) &, 792 .tabbrowser-tab[pinned][tab-note]:not([crashed], [soundplaying], [muted], [activemedia-blocked]) & { 793 display: revert; 794 } 795 796 /* stylelint-disable-next-line media-query-no-invalid */ 797 @media -moz-pref("sidebar.visibility", "expand-on-hover") { 798 /* We need these rules to apply at all times when the sidebar.visibility 799 pref is set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 800 has been added to root. There are certain scenarios when that attribute is temporarily 801 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 802 #tabbrowser-tabs[orient="vertical"] .tabbrowser-tab[tab-note]:not([crashed], [soundplaying], [muted], [activemedia-blocked]) & { 803 display: revert; 804 } 805 } 806 807 /* stylelint-disable-next-line media-query-no-invalid */ 808 @media not -moz-pref("sidebar.visibility", "expand-on-hover") { 809 /* We need these rules to apply at all times when the sidebar.visibility 810 pref is not set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 811 has not been added to root. There are certain scenarios when that attribute is temporarily 812 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 813 #tabbrowser-tabs[orient="vertical"]:not([expanded]) .tabbrowser-tab[tab-note]:not([crashed], [soundplaying], [muted], [activemedia-blocked]) & { 814 display: revert; 815 } 816 } 817 } 818 819 .tab-audio-button { 820 display: none; 821 margin-inline-end: var(--tab-icon-end-margin); 822 --icon-size: var(--icon-size-xsmall); 823 --button-size-icon-small: 24px; 824 --button-min-height-small: 24px; 825 --button-border-radius: var(--border-radius-small); 826 827 /* stylelint-disable-next-line media-query-no-invalid */ 828 @media not -moz-pref("sidebar.visibility", "expand-on-hover") { 829 /* We need these rules to apply at all times when the sidebar.visibility 830 pref is not set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 831 has not been added to root. There are certain scenarios when that attribute is temporarily 832 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 833 #tabbrowser-tabs[orient="horizontal"] &:not([pinned]):not([crashed]), 834 :root:not([sidebar-expand-on-hover]) #tabbrowser-tabs[orient="vertical"][expanded] &:not([pinned]):not([crashed]) { 835 &:is([soundplaying], [muted], [activemedia-blocked]) { 836 display: flex; 837 } 838 839 &[soundplaying]::part(button) { 840 background-image: url("chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg"); 841 } 842 843 &[muted]::part(button) { 844 background-image: url("chrome://browser/skin/tabbrowser/tab-audio-muted-small.svg"); 845 } 846 847 &[activemedia-blocked]::part(button) { 848 background-image: url("chrome://browser/skin/tabbrowser/tab-audio-blocked-circle-12.svg"); 849 } 850 } 851 } 852 } 853 854 .tab-label-container { 855 overflow: hidden; 856 857 #tabbrowser-tabs:not([secondarytext-unsupported], [orient="vertical"]) & { 858 height: 2.7em; 859 } 860 861 &[pinned] { 862 width: 0; 863 } 864 865 &[textoverflow] { 866 &[labeldirection="ltr"], 867 &:not([labeldirection]):-moz-locale-dir(ltr) { 868 direction: ltr; 869 mask-image: linear-gradient(to left, transparent, black var(--tab-label-mask-size)); 870 } 871 872 &[labeldirection="rtl"], 873 &:not([labeldirection]):-moz-locale-dir(rtl) { 874 direction: rtl; 875 mask-image: linear-gradient(to right, transparent, black var(--tab-label-mask-size)); 876 } 877 } 878 } 879 880 .tab-label { 881 margin-inline: 0; 882 line-height: var(--tab-label-line-height); /* override 'normal' in case of fallback math fonts with huge metrics */ 883 white-space: nowrap; 884 } 885 886 .tab-close-button { 887 -moz-context-properties: fill, fill-opacity; 888 margin-inline-end: calc(var(--tab-inline-padding) / -2); 889 width: 24px; 890 height: 24px; 891 box-sizing: border-box; 892 padding: var(--tab-close-button-padding); 893 list-style-image: url(resource://content-accessible/close-12.svg); 894 895 /* Adjust border radius by the distance to the tab. This is a hardcoded approximation 896 because the exact distance is intentionally not always equal across all sides. */ 897 border-radius: calc(var(--tab-border-radius) - 3px); 898 899 #tabbrowser-tabs[orient="horizontal"] &[pinned], 900 :root:not([sidebar-expand-on-hover]) #tabbrowser-tabs[orient="vertical"] &[pinned], 901 #tabbrowser-tabs[closebuttons="activetab"][orient="horizontal"] &:not([selected]) { 902 display: none; 903 } 904 } 905 906 /* The following rulesets allow showing more of the tab title by shrinking the 907 * width of the close button. We don't do this in forced-colors mode since 908 * the button has a visible outline shown */ 909 @media not (forced-colors) { 910 #tabbrowser-tabs[orient="horizontal"] { 911 .tabbrowser-tab:not([labelendaligned], [tab-note], :hover) > .tab-stack > .tab-content > .tab-close-button { 912 padding-inline-start: 0; 913 width: 18px; 914 } 915 916 .tabbrowser-tab[visuallyselected]:not([labelendaligned]):hover, 917 &:not([closebuttons="activetab"]) .tabbrowser-tab:not([visuallyselected], [labelendaligned]):hover { 918 --tab-label-mask-size: 2em; 919 } 920 } 921 } 922 923 .tab-secondary-label { 924 font-size: 0.75em; 925 margin: -0.3em 0 0.3em; /* adjust margins to compensate for line-height of .tab-label */ 926 opacity: 0.8; 927 928 #tabbrowser-tabs:is([secondarytext-unsupported], [orient="vertical"]) &, 929 :root[uidensity="compact"] &, 930 &:not([pictureinpicture]) { 931 display: none; 932 } 933 } 934 935 .tab-icon-sound-label { 936 /* Set height back to equivalent of parent's 1em based 937 on the .tab-icon-sound having a reduced font-size */ 938 height: 1.3333em; 939 white-space: nowrap; 940 margin: 0; 941 } 942 943 .tab-background { 944 border-radius: var(--tab-border-radius); 945 margin-block: var(--tab-block-margin); 946 min-height: var(--tab-min-height); 947 outline: var(--tab-outline); 948 outline-offset: var(--tab-outline-offset); 949 950 .tabbrowser-tab:hover > .tab-stack > &:not([selected], [multiselected]) { 951 background-color: var(--tab-hover-background-color); 952 outline-color: var(--tab-hover-outline-color); 953 } 954 955 &:is([selected], [multiselected]) { 956 background-color: var(--tab-selected-bgcolor); 957 box-shadow: var(--tab-selected-shadow); 958 outline-color: var(--tab-selected-outline-color); 959 } 960 961 &[multiselected] { 962 outline-color: var(--focus-outline-color); 963 964 &[selected] { 965 outline-width: 2px; 966 outline-offset: -2px; 967 } 968 } 969 970 #tabbrowser-tabs[orient="vertical"]:not([movingtab-group]) & { 971 .tabbrowser-tab[small-stack] > .tab-stack > & { 972 box-shadow: 973 0 5px 0 -3px var(--tab-selected-bgcolor), 974 0 3px var(--focus-outline-color); 975 } 976 977 .tabbrowser-tab[big-stack] > .tab-stack > & { 978 box-shadow: 979 0 5px 0 -3px var(--tab-selected-bgcolor), 980 0 3px var(--focus-outline-color), 981 0 8px 0 -3px var(--tab-selected-bgcolor), 982 0 6px var(--focus-outline-color); 983 } 984 } 985 986 #tabbrowser-tabs[orient="horizontal"]:not([movingtab-group]) & { 987 .tabbrowser-tab[small-stack] > .tab-stack > & { 988 box-shadow: 989 5px 0 0 -3px var(--tab-selected-bgcolor), 990 3px 0 var(--focus-outline-color); 991 } 992 993 .tabbrowser-tab[big-stack] > .tab-stack > & { 994 box-shadow: 995 5px 0 0 -3px var(--tab-selected-bgcolor), 996 3px 0 var(--focus-outline-color), 997 8px 0 0 -3px var(--tab-selected-bgcolor), 998 6px 0 var(--focus-outline-color); 999 } 1000 1001 &:-moz-locale-dir(rtl) { 1002 .tabbrowser-tab[small-stack] > .tab-stack > & { 1003 box-shadow: 1004 -5px 0 0 -3px var(--tab-selected-bgcolor), 1005 -3px 0 var(--focus-outline-color); 1006 } 1007 1008 .tabbrowser-tab[big-stack] > .tab-stack > & { 1009 box-shadow: 1010 -5px 0 0 -3px var(--tab-selected-bgcolor), 1011 -3px 0 var(--focus-outline-color), 1012 -8px 0 0 -3px var(--tab-selected-bgcolor), 1013 -6px 0 var(--focus-outline-color); 1014 } 1015 } 1016 } 1017 1018 #tabbrowser-tabs[orient="vertical"][movingtab-group] & { 1019 .tabbrowser-tab[small-stack] > .tab-stack > & { 1020 box-shadow: 1021 0 5px 0 -3px var(--tab-selected-bgcolor), 1022 0 3px var(--dragover-tab-group-color); 1023 } 1024 1025 .tabbrowser-tab[big-stack] > .tab-stack > & { 1026 box-shadow: 1027 0 5px 0 -3px var(--tab-selected-bgcolor), 1028 0 3px var(--dragover-tab-group-color), 1029 0 8px 0 -3px var(--tab-selected-bgcolor), 1030 0 6px var(--dragover-tab-group-color); 1031 } 1032 } 1033 1034 #tabbrowser-tabs[orient="horizontal"][movingtab-group] & { 1035 .tabbrowser-tab[small-stack] > .tab-stack > & { 1036 box-shadow: 1037 5px 0 0 -3px var(--tab-selected-bgcolor), 1038 3px 0 var(--dragover-tab-group-color); 1039 } 1040 1041 .tabbrowser-tab[big-stack] > .tab-stack > & { 1042 box-shadow: 1043 5px 0 0 -3px var(--tab-selected-bgcolor), 1044 3px 0 var(--dragover-tab-group-color), 1045 8px 0 0 -3px var(--tab-selected-bgcolor), 1046 6px 0 var(--dragover-tab-group-color); 1047 } 1048 1049 &:-moz-locale-dir(rtl) { 1050 .tabbrowser-tab[small-stack] > .tab-stack > & { 1051 box-shadow: 1052 -5px 0 0 -3px var(--tab-selected-bgcolor), 1053 -3px 0 var(--dragover-tab-group-color); 1054 } 1055 1056 .tabbrowser-tab[big-stack] > .tab-stack > & { 1057 box-shadow: 1058 -5px 0 0 -3px var(--tab-selected-bgcolor), 1059 -3px 0 var(--dragover-tab-group-color), 1060 -8px 0 0 -3px var(--tab-selected-bgcolor), 1061 -6px 0 var(--dragover-tab-group-color); 1062 } 1063 } 1064 } 1065 1066 #tabbrowser-tabs[movingtab] & { 1067 transition: 1068 background-color 50ms ease, 1069 color 50ms ease, 1070 outline-color 50ms ease; 1071 } 1072 1073 #tabbrowser-tabs[movingtab-group] & { 1074 &[dragover-groupTarget] { 1075 background-color: light-dark(var(--dragover-tab-group-color-pale), var(--dragover-tab-group-color)); 1076 color: light-dark(var(--dragover-tab-group-color), var(--dragover-tab-group-color-pale)); 1077 outline-color: light-dark(var(--dragover-tab-group-color), var(--dragover-tab-group-color-pale)); 1078 } 1079 1080 &:is([selected], [multiselected]) { 1081 outline-color: var(--dragover-tab-group-color); 1082 outline-width: 2px; 1083 outline-offset: -2px; 1084 } 1085 } 1086 } 1087 1088 /* Keyboard focus outline */ 1089 1090 #TabsToolbar #firefox-view-button:focus-visible > .toolbarbutton-icon, 1091 #tabbrowser-tabs[tablist-has-focus] .tabbrowser-tab.tablist-keyboard-focus > .tab-stack > .tab-background { 1092 outline: var(--focus-outline); 1093 outline-offset: var(--focus-outline-inset); 1094 } 1095 1096 /* Pinned tabs */ 1097 1098 .tabbrowser-tab:is([image], [pinned]) > .tab-stack > .tab-content[attention]:not([selected]), 1099 .tabbrowser-tab > .tab-stack > .tab-content[pinned][titlechanged]:not([selected]), 1100 #tabbrowser-tabs[orient="vertical"] .tabbrowser-tab > .tab-stack > .tab-content[titlechanged]:not([selected]) { 1101 background-image: radial-gradient(circle, var(--attention-dot-color), var(--attention-dot-color) 2px, transparent 2px); 1102 background-position: center bottom 6.5px; 1103 background-size: 4px 4px; 1104 background-repeat: no-repeat; 1105 1106 #tabbrowser-tabs[orient="vertical"] & { 1107 background-position-y: 6px; 1108 background-position-x: calc(var(--tab-inline-padding) + var(--icon-size) + 1px); 1109 1110 &:-moz-locale-dir(rtl) { 1111 background-position-x: right calc(var(--tab-inline-padding) + var(--icon-size) + 1px); 1112 } 1113 1114 :root:not([sidebar-expand-on-hover]) &[pinned] { 1115 background-position-x: calc(50% + 11px); 1116 1117 &:-moz-locale-dir(rtl) { 1118 background-position-x: calc(50% - 11px); 1119 } 1120 } 1121 } 1122 } 1123 1124 .tabbrowser-tab[image] > .tab-stack > .tab-content[attention]:not([pinned], [selected]) { 1125 background-position-x: left calc(var(--tab-inline-padding) + 6px); 1126 1127 &:-moz-locale-dir(rtl) { 1128 background-position-x: right calc(var(--tab-inline-padding) + 6px); 1129 } 1130 } 1131 1132 .tab-label[attention]:not([selected]) { 1133 font-weight: var(--font-weight-bold); 1134 } 1135 1136 #pinned-tabs-container[orient="horizontal"] { 1137 max-width: max(80px, calc(100vw - var(--window-controls-size) - 300px /* Room for toolbar buttons, drag space, and unpinned tabs */)); 1138 1139 &:empty { 1140 display: none; 1141 } 1142 } 1143 1144 #pinned-drop-indicator-icon, 1145 #pinned-drop-indicator-text { 1146 display: none; 1147 } 1148 1149 #pinned-drop-indicator { 1150 display: none; 1151 flex-direction: column; 1152 align-items: center; 1153 justify-content: center; 1154 color: var(--toolbarbutton-icon-fill-attention); 1155 outline: 1px dashed currentColor; 1156 1157 @media not (prefers-reduced-motion) { 1158 transition-duration: 0.25s; 1159 transition-timing-function: ease-in-out; 1160 } 1161 1162 &[visible] { 1163 display: flex; 1164 border-radius: var(--border-radius-small); 1165 background: color-mix(in srgb, currentColor 12%, transparent); 1166 1167 #pinned-drop-indicator-icon { 1168 width: var(--size-item-small); 1169 height: var(--size-item-small); 1170 -moz-context-properties: fill; 1171 fill: currentColor; 1172 display: inline; 1173 } 1174 } 1175 1176 &[interactive] { 1177 outline-style: solid; 1178 } 1179 } 1180 1181 #tabbrowser-tabs[orient="vertical"] > #pinned-drop-indicator { 1182 transition-property: height; 1183 1184 &[visible] { 1185 height: 70px; 1186 width: calc(100% - 2 * var(--tab-inner-inline-margin)); 1187 gap: var(--space-small); 1188 margin: var(--space-small) var(--tab-inner-inline-margin) 0; 1189 1190 @starting-style { 1191 height: 0; 1192 } 1193 1194 > #pinned-drop-indicator-text { 1195 display: inline; 1196 text-align: center; 1197 } 1198 1199 #tabbrowser-tabs:not([expanded]) > & { 1200 width: var(--tab-collapsed-background-width); 1201 height: var(--size-item-large); 1202 1203 /* stylelint-disable max-nesting-depth */ 1204 > #pinned-drop-indicator-text { 1205 display: none; 1206 } 1207 } 1208 } 1209 } 1210 1211 #tabbrowser-tabs[orient="horizontal"] > #pinned-drop-indicator { 1212 transition-property: width; 1213 1214 &[visible] { 1215 margin-inline: var(--space-small); 1216 align-self: center; 1217 align-items: flex-start; 1218 width: calc(2 * var(--size-item-large)); 1219 height: var(--tab-min-height); 1220 padding-inline-start: var(--space-small); 1221 1222 @starting-style { 1223 width: 0; 1224 } 1225 1226 > #pinned-drop-indicator-text { 1227 display: none; 1228 } 1229 } 1230 } 1231 1232 /* Split View */ 1233 1234 tab-group > tab-split-view-wrapper { 1235 #tabbrowser-tabs[orient="vertical"] & { 1236 margin-inline-end: var(--space-medium); 1237 1238 #tabbrowser-tabs[expanded] & { 1239 margin-inline-start: calc(var(--space-medium) + var(--tab-inner-inline-margin) - var(--space-xsmall)); 1240 } 1241 1242 #tabbrowser:not([expanded]) & { 1243 margin-inline-start: calc(var(--space-medium) - var(--space-xsmall)); 1244 } 1245 1246 #tabbrowser-tabs:not([expanded]) & { 1247 .tab-group-line { 1248 inset-inline-start: calc(((var(--space-medium)) * -1) + 2px) !important; 1249 } 1250 } 1251 1252 &[last-tab-or-split-view] > .tabbrowser-tab .tab-group-line { 1253 inset-block-start: calc(var(--space-xsmall) * -2); 1254 } 1255 1256 > .tabbrowser-tab { 1257 overflow: visible; 1258 1259 .tab-group-line { 1260 inset-inline-start: calc(var(--space-medium) * -1) !important; 1261 inset-block: calc(var(--space-xsmall) * -1); 1262 } 1263 1264 &:last-child { 1265 .tab-group-line { 1266 display: none; 1267 1268 @container vertical-tabs-container (max-width: 210px) { 1269 display: flex; 1270 } 1271 } 1272 } 1273 } 1274 } 1275 } 1276 1277 #tabbrowser-tabs[orient="horizontal"] tab-split-view-wrapper { 1278 margin-block: var(--tab-block-margin); 1279 margin-inline: 0; 1280 align-items: flex-end; 1281 flex: 100 100; 1282 padding: 2px 0; 1283 min-width: calc(var(--tab-min-width-pref, var(--tab-min-width)) * 2 + 6px); 1284 max-width: var(--tab-max-width); 1285 transition: var(--tab-width-transition); 1286 1287 &[last-tab-or-split-view] .tabbrowser-tab:last-child .tab-group-line { 1288 inset-inline-end: calc(var(--tab-border-radius) / 2); 1289 } 1290 1291 &:has(tab:is([muted], [soundplaying], [activemedia-blocked])) { 1292 min-width: 200px; 1293 } 1294 1295 tab-group[collapsed] &:not([hasactivetab]) { 1296 min-width: 0 !important; 1297 max-width: 0 !important; 1298 max-height: 0 !important; 1299 padding: 0; 1300 margin: 0; 1301 overflow: hidden; 1302 } 1303 1304 .tabbrowser-tab { 1305 padding-inline: 2px; 1306 .tab-background { 1307 --tab-min-height: 32px; 1308 1309 .tab-group-line { 1310 inset-block-end: calc(((var(--tab-block-margin) / 2) + var(--space-xsmall)) * -1); 1311 inset-inline-start: calc(var(--space-small) * -2); 1312 } 1313 } 1314 1315 tab-group & { 1316 overflow: visible; 1317 } 1318 } 1319 } 1320 1321 #tabbrowser-tabs tab-split-view-wrapper { 1322 display: grid; 1323 grid-template-columns: 50% 50%; 1324 margin-inline: var(--space-small); 1325 padding: var(--space-xsmall); 1326 border-radius: var(--tab-border-radius); 1327 position: relative; /* prevents splitview wrappers from shifting during other drag events*/ 1328 1329 &[hasactivetab] { 1330 background-color: var(--tab-hover-background-color); 1331 1332 @media (forced-colors) { 1333 border: 1px solid SelectedItem; 1334 background: SelectedItemText; 1335 } 1336 } 1337 1338 .tabbrowser-tab { 1339 padding-block: 0 !important; 1340 1341 .tab-background { 1342 margin-inline: var(--space-xxsmall); 1343 margin-block: 0; 1344 } 1345 1346 .tab-content { 1347 padding-inline: var(--space-medium); 1348 1349 @media (forced-colors) { 1350 #tabbrowser-tabs tab-split-view-wrapper[hasactivetab] .tabbrowser-tab:not([selected]) & { 1351 color: SelectedItem; 1352 } 1353 } 1354 } 1355 1356 &:first-child { 1357 .tab-background { 1358 margin-inline-end: 0; 1359 } 1360 1361 tab-split-view-wrapper:not([hasactivetab]) & { 1362 border-block-end: transparent; 1363 } 1364 } 1365 1366 &:last-child { 1367 .tab-background { 1368 margin-inline-start: 0; 1369 } 1370 1371 .tab-content { 1372 padding-inline-start: var(--space-medium); 1373 } 1374 } 1375 } 1376 1377 &:not([hasactivetab]) { 1378 outline: var(--tab-outline); 1379 outline-offset: var(--tab-outline-offset); 1380 1381 &:hover { 1382 background-color: var(--tab-hover-background-color); 1383 outline-color: var(--tab-hover-outline-color); 1384 } 1385 1386 .tabbrowser-tab { 1387 .tab-background { 1388 outline-color: transparent; 1389 } 1390 1391 &:hover .tab-background { 1392 background-color: transparent; 1393 outline-color: transparent; 1394 } 1395 1396 &:last-child { 1397 border-inline-start: 1px solid var(--toolbarbutton-icon-fill); 1398 } 1399 } 1400 } 1401 1402 #tabbrowser-tabs[orient="vertical"] & { 1403 border-radius: var(--tab-border-radius); 1404 gap: var(--space-xsmall); 1405 grid-template-columns: 49.5% 49.5%; 1406 1407 @container vertical-tabs-container (max-width: 210px) { 1408 grid-template-columns: 1fr; 1409 1410 &:not([hasactivetab]) .tabbrowser-tab { 1411 &:first-child { 1412 border-block-end: 1px solid var(--toolbarbutton-icon-fill); 1413 border-inline-end: transparent; 1414 } 1415 1416 &:last-child { 1417 border-inline-start: transparent !important; 1418 } 1419 } 1420 } 1421 } 1422 1423 #tabbrowser-tabs[orient="vertical"]:not([expanded]) & { 1424 .tab-close-button { 1425 top: -5px; 1426 inset-inline-start: -7px; 1427 } 1428 } 1429 } 1430 1431 /* Tab Groups */ 1432 1433 /* 1434 * .tab-group-line needs to span the drop shadows + space between tabs in the 1435 * same tab group so that the whole tab group appears to be underlined by an 1436 * unbroken line. 1437 * 1438 * The last tab in a tab group should have its group underline stop 1439 * at the end edge of the tab itself, otherwise it looks like the tab group 1440 * extends too far past the edge of the tab. 1441 * 1442 * When a tab group with the currently selected tab is collapsed, the selected 1443 * tab remains visible along with its underline. If there are other tabs in 1444 * the group that have been hidden by the collapse, a counter indicating the 1445 * number of hidden tabs appears at the end of the group, which continues 1446 * the underline, so in this case the line should not terminate underneath 1447 * the tab. 1448 * 1449 */ 1450 .tab-group-line { 1451 display: none; 1452 position: absolute; 1453 background-color: var(--tab-group-line-color); 1454 1455 #tabbrowser-tabs[orient="horizontal"] & { 1456 height: var(--tab-group-line-thickness); 1457 inset-inline: calc(-1 * var(--tab-overflow-clip-margin)); 1458 inset-block-end: var(--tab-group-line-toolbar-border-distance); 1459 1460 tab-group:not([collapsed]) > .tabbrowser-tab:last-of-type > .tab-stack > .tab-background > &, 1461 tab-group[collapsed]:not([hasmultipletabs]) & { 1462 inset-inline-end: calc(var(--tab-border-radius) / 2); 1463 border-start-end-radius: calc(var(--tab-group-line-thickness) / 2); 1464 border-end-end-radius: calc(var(--tab-group-line-thickness) / 2); 1465 } 1466 } 1467 1468 #tabbrowser-tabs[orient="vertical"] & { 1469 width: var(--tab-group-line-thickness); 1470 inset-block: -3px -2px; 1471 inset-inline: 2px 0; 1472 1473 #tabbrowser-tabs[expanded] & { 1474 inset-inline-start: 0; 1475 } 1476 1477 tab-group:not([collapsed]) > .tabbrowser-tab:last-of-type > .tab-stack > .tab-background > &, 1478 tab-group[collapsed]:not([hasmultipletabs]) & { 1479 inset-block-end: 0; 1480 border-end-start-radius: calc(var(--tab-group-line-thickness) / 2); 1481 border-end-end-radius: calc(var(--tab-group-line-thickness) / 2); 1482 } 1483 } 1484 1485 tab-group & { 1486 display: flex; 1487 } 1488 1489 /* prettier-ignore */ 1490 #tabbrowser-tabs[movingtab]:not([movingtab-group],[movingtab-ungroup]) .tabbrowser-tab:is(:active,[multiselected]) > .tab-stack > .tab-background > & { 1491 display: flex; 1492 background-color: light-dark(var(--dragover-tab-group-color), var(--dragover-tab-group-color-invert)); 1493 border-radius: var(--border-radius-xsmall); 1494 } 1495 1496 #tabbrowser-tabs:is([movingtab-group], [movingtab-ungroup]) &:is([selected], [multiselected]) { 1497 display: none; 1498 } 1499 } 1500 1501 tab-group { 1502 /* 1503 * Let the tab bar flexbox distribute space between all tabs evenly, regardless of 1504 * whether they are children of the tab bar directly or children of tab groups 1505 */ 1506 display: contents; 1507 1508 --tab-group-line-color: light-dark(var(--tab-group-color), var(--tab-group-color-invert)); 1509 1510 #tabbrowser-tabs[orient="horizontal"] &[movingtabgroup][collapsed] > .tabbrowser-tab[visuallyselected], 1511 #tabbrowser-tabs[orient="horizontal"] &[collapsed] > .tabbrowser-tab:not([visuallyselected], [multiselected]) { 1512 min-width: 0 !important; 1513 max-width: 0 !important; 1514 padding: 0; 1515 overflow-clip-margin: 0; 1516 } 1517 1518 #tabbrowser-tabs[orient="vertical"] &[movingtabgroup][collapsed] > .tabbrowser-tab[visuallyselected], 1519 #tabbrowser-tabs[orient="vertical"] &[collapsed] > .tabbrowser-tab:not([visuallyselected], [multiselected]), 1520 #tabbrowser-tabs[orient="vertical"] &[collapsed] > tab-split-view-wrapper:not([hasactivetab]) { 1521 display: none; 1522 } 1523 1524 &[collapsed] { 1525 --tab-group-line-color: light-dark(var(--tab-group-color), var(--tab-group-color-pale)); 1526 /* Override xul.css, we're using the collapsed attribute for our own purposes */ 1527 visibility: inherit; 1528 } 1529 } 1530 1531 #tabbrowser-tabs[orient="vertical"][expanded] { 1532 tab-group > :is(.tab-group-label-container, .tabbrowser-tab), 1533 &[movingtab][movingtab-addToGroup]:not([movingtab-group], [movingtab-ungroup]) .tabbrowser-tab:is(:active, [multiselected]) { 1534 margin-inline-start: var(--space-medium); 1535 } 1536 } 1537 1538 /** 1539 * Tab group label and overflow counter should appear to be underlined 1540 * with the same continuous line as the group's tabs. This is achieved 1541 * by positioning pseudoelement of the appropriate size and color. 1542 */ 1543 .tab-group-label-container, 1544 .tab-group-overflow-count-container { 1545 position: relative; 1546 1547 #tabbrowser-tabs:is([orient="horizontal"], [orient="vertical"]:not([expanded])) tab-group:not([collapsed]) > &::after, 1548 #tabbrowser-tabs:is([orient="horizontal"], [orient="vertical"]:not([expanded])) tab-group[hasactivetab] > &::after, 1549 #tabbrowser-tabs[orient="vertical"] tab-group[hasactivetab][hasmultipletabs] > &.tab-group-overflow-count-container::after { 1550 content: ""; 1551 background-color: var(--tab-group-line-color); 1552 position: absolute; 1553 } 1554 1555 #tabbrowser-tabs[orient="vertical"][expanded] & { 1556 contain: inline-size; 1557 } 1558 } 1559 1560 .tab-group-label-container { 1561 &[dragtarget] { 1562 z-index: 3; 1563 position: absolute; 1564 pointer-events: none; /* avoid blocking dragover events on scroll buttons */ 1565 } 1566 1567 @media (prefers-reduced-motion: no-preference) { 1568 #tabbrowser-tabs[movingtab] &:not(:active) { 1569 transition: var(--tab-dragover-transition); 1570 } 1571 } 1572 1573 /* 1574 * Provide some empty space to either side of the tab group label. 1575 * Use margin at the start because the group line should not extend beyond 1576 * the tab group label. 1577 * Use padding at the end because the group line should extend to connect to 1578 * the group line of the first tab in the group. 1579 */ 1580 #tabbrowser-tabs[orient="horizontal"] & { 1581 margin-inline-start: 3px; 1582 padding-inline-end: 3px; 1583 } 1584 #tabbrowser-tabs[orient="vertical"] & { 1585 margin-block-start: var(--space-small); 1586 1587 tab-group:not([collapsed]) > &, 1588 tab-group[collapsed][hasactivetab] > & { 1589 padding-block-end: var(--space-small); 1590 } 1591 } 1592 1593 #tabbrowser-tabs[orient="horizontal"] tab-group:not([collapsed]) > &::after, 1594 #tabbrowser-tabs[orient="horizontal"] tab-group[collapsed][hasactivetab]:not([movingtabgroup]) > &::after { 1595 height: var(--tab-group-line-thickness); 1596 inset: auto 0 var(--tab-group-line-toolbar-border-distance); 1597 border-start-start-radius: 1px; 1598 border-end-start-radius: 1px; 1599 } 1600 1601 #tabbrowser-tabs[orient="vertical"] tab-group:not([collapsed]) > &::after, 1602 #tabbrowser-tabs[orient="vertical"] tab-group[collapsed][hasactivetab]:not([movingtabgroup]) > &::after { 1603 width: var(--tab-group-line-thickness); 1604 inset-block: 0; 1605 inset-inline: 2px auto; 1606 border-start-start-radius: 1px; 1607 border-start-end-radius: 1px; 1608 } 1609 } 1610 1611 .tab-group-overflow-count-container { 1612 display: none; 1613 1614 #tabbrowser-tabs:not([movingtab]) tab-group[collapsed][hasmultipletabs][hasactivetab] > & { 1615 display: flex; 1616 } 1617 1618 /* 1619 * Similar to .tab-group-label, use padding/margin to space the indicator 1620 * correctly relative to the group line. 1621 */ 1622 #tabbrowser-tabs[orient="horizontal"] & { 1623 padding-inline-end: 3px; 1624 margin-inline-end: 3px; 1625 } 1626 #tabbrowser-tabs[orient="vertical"] & { 1627 #tabbrowser-tabs[expanded] & { 1628 margin-inline-start: var(--space-medium); 1629 } 1630 1631 tab-group:not([collapsed]) > & { 1632 margin-block-end: var(--space-small); 1633 } 1634 } 1635 1636 #tabbrowser-tabs[orient="horizontal"] tab-group[hasactivetab][hasmultipletabs] > &::after { 1637 height: var(--tab-group-line-thickness); 1638 inset: auto 0 var(--tab-group-line-toolbar-border-distance); 1639 border-start-end-radius: 1px; 1640 border-end-end-radius: 1px; 1641 } 1642 1643 #tabbrowser-tabs[orient="vertical"] tab-group[hasactivetab][hasmultipletabs] > &::after { 1644 width: var(--tab-group-line-thickness); 1645 inset-block: 0; 1646 border-end-start-radius: 1px; 1647 border-end-end-radius: 1px; 1648 } 1649 1650 #tabbrowser-tabs:not([expanded]) &::after { 1651 inset-inline: 2px auto; 1652 } 1653 } 1654 1655 .tab-group-overflow-count { 1656 color: var(--tab-group-line-color); 1657 margin: 0; 1658 padding: var(--space-small); 1659 1660 #tabbrowser-tabs[orient="vertical"] & { 1661 margin-inline-start: var(--tab-inner-inline-margin); 1662 } 1663 } 1664 1665 .tab-group-label-hover-highlight { 1666 tab-group[collapsed] & { 1667 /* Since effective border radius is the sum of border-radius and box-shadow 1668 * spread radius, make sure that these values vary together in order to add 1669 * up to --tab-border-radius. 1670 */ 1671 border-radius: calc(var(--tab-border-radius) - var(--tab-group-label-highlight-radius)); 1672 1673 #tabbrowser-tabs[orient="horizontal"] & { 1674 padding-block: 4px; 1675 } 1676 1677 #tabbrowser-tabs[orient="vertical"][expanded] & { 1678 margin-inline-end: var(--space-medium); 1679 } 1680 } 1681 1682 #tabbrowser-tabs[orient="vertical"]:not([expanded]) & { 1683 /* 1684 * Keep tab group label square in collapsed sidebar centered without 1685 * margin: auto, similar to how tabs' .tab-background use margin in order 1686 * to stay centered in the collapsed sidebar. This helps prevent the tab 1687 * group label from jumping around during the sidebar collapsed-to-expanded 1688 * transition. 1689 */ 1690 margin-inline: calc(var(--tab-inner-inline-margin) + (var(--tab-collapsed-background-width) - 24px) / 2); 1691 } 1692 1693 tab-group[collapsed]:not([movingtabgroup]) &:hover, 1694 tab-group[previewpanelactive] & { 1695 background-color: var(--tab-hover-background-color); 1696 box-shadow: 0 0 0 var(--tab-group-label-highlight-radius) var(--tab-hover-background-color); 1697 } 1698 } 1699 1700 .tab-group-label { 1701 -moz-window-dragging: no-drag; 1702 text-align: center; 1703 font-weight: var(--font-weight-semibold); 1704 text-overflow: ellipsis; 1705 white-space: nowrap; 1706 overflow: hidden; 1707 text-shadow: none; 1708 /* .tab-group-label-hover-highlight shadow surrounds the .tab-group-label; keep 1709 * the border radius of the inside element 2px smaller so that these two elements 1710 * look good when hovering over a collapsed tab group label. 1711 */ 1712 border-radius: calc(var(--tab-border-radius) - 2px); 1713 line-height: calc(var(--tab-group-label-height) - var(--tab-group-line-thickness)); 1714 min-height: var(--tab-group-label-height); 1715 min-width: var(--tab-group-label-height); 1716 max-width: 10em; 1717 padding-inline: var(--tab-group-label-padding); 1718 color: light-dark(var(--tab-group-color-pale), var(--tab-group-label-text-dark)); 1719 background-color: light-dark(var(--tab-group-color), var(--tab-group-color-invert)); 1720 margin: auto 0; 1721 1722 /* Animations for hovering a tab(s) over a collapsed tab group. Indicates to 1723 * the user that they can drop the tab(s) into the tab group. 1724 */ 1725 transition: box-shadow var(--tab-group-label-animation-duration); 1726 1727 &[dragover-groupTarget] { 1728 box-shadow: color-mix(in oklab, light-dark(var(--tab-group-color), var(--tab-group-color-pale)) 30%, transparent) 0 0 0 1729 var(--tab-group-label-highlight-thickness); 1730 } 1731 1732 tab-group[collapsed] > .tab-group-label-container & { 1733 background-color: light-dark(var(--tab-group-color-pale), var(--tab-group-color)); 1734 color: light-dark(var(--tab-group-color), var(--tab-group-color-pale)); 1735 outline: 1px solid light-dark(var(--tab-group-color), var(--tab-group-color-pale)); 1736 outline-offset: -1px; 1737 } 1738 1739 #tabbrowser-tabs[tablist-has-focus] &.tablist-keyboard-focus { 1740 outline: var(--focus-outline); 1741 outline-offset: var(--focus-outline-offset); 1742 } 1743 1744 #tabbrowser-tabs[orient="vertical"] & { 1745 height: 24px; 1746 min-height: auto; 1747 line-height: 24px; 1748 min-width: 24px; 1749 1750 #tabbrowser-tabs:not([expanded]) & { 1751 width: 24px; 1752 max-width: 24px; 1753 font-size-adjust: 0; 1754 1755 &::first-letter { 1756 font: message-box; 1757 font-weight: var(--font-weight-semibold); 1758 line-height: 24px; 1759 } 1760 } 1761 1762 #tabbrowser-tabs[expanded] & { 1763 align-self: start; 1764 max-width: -moz-available; 1765 margin-inline-end: var(--space-medium); 1766 } 1767 } 1768 } 1769 1770 .tab-group-editor-panel { 1771 --panel-width: 22em; 1772 --panel-padding: var(--space-large); 1773 --panel-separator-padding: var(--space-medium) 0; 1774 font: menu; 1775 1776 .panel-header { 1777 min-height: auto; 1778 > h1 { 1779 margin-top: 0; 1780 } 1781 } 1782 1783 .panel-body { 1784 padding-block: var(--space-medium); 1785 } 1786 1787 &.tab-group-editor-mode-create .tab-group-edit-mode-only, 1788 &:not(.tab-group-editor-mode-create) .tab-group-create-mode-only { 1789 display: none; 1790 } 1791 1792 .tab-group-editor-name { 1793 display: flex; 1794 flex-direction: column; 1795 > label { 1796 margin-inline: 0; 1797 margin-bottom: var(--space-small); 1798 } 1799 > input[type="text"] { 1800 padding: var(--space-medium); 1801 } 1802 } 1803 1804 .tab-group-editor-swatches { 1805 display: flex; 1806 flex-flow: row nowrap; 1807 justify-content: space-between; 1808 } 1809 1810 input[name="tab-group-color"] { 1811 width: 0; 1812 height: 0; 1813 opacity: 0; 1814 margin: 0; 1815 position: absolute; 1816 pointer-events: none; 1817 top: -100px; 1818 } 1819 1820 .tab-group-editor-swatch { 1821 font-size: 0; 1822 width: 16px; 1823 height: 16px; 1824 /* stylelint-disable-next-line stylelint-plugin-mozilla/no-non-semantic-token-usage */ 1825 padding: var(--focus-outline-offset); 1826 border: var(--focus-outline-width) solid transparent; 1827 border-radius: var(--border-radius-medium); 1828 background-clip: content-box; 1829 background-color: light-dark(var(--tabgroup-swatch-color), var(--tabgroup-swatch-color-invert)); 1830 1831 input:checked + & { 1832 border-color: var(--focus-outline-color); 1833 } 1834 1835 input:disabled + & { 1836 opacity: 0.5; 1837 } 1838 1839 input:focus-visible + & { 1840 outline: 1px solid var(--focus-outline-color); 1841 outline-offset: 1px; 1842 } 1843 } 1844 1845 .tab-group-edit-actions, 1846 .tab-group-delete { 1847 padding-block: 0; 1848 > toolbarbutton { 1849 justify-content: flex-start; 1850 } 1851 } 1852 1853 toolbarbutton { 1854 margin: 0; 1855 } 1856 } 1857 1858 .tab-group-editor-panel.tab-group-editor-panel-expanded { 1859 --panel-width: 25em; 1860 } 1861 1862 @media not (prefers-contrast) { 1863 #tabGroupEditor_deleteGroup { 1864 color: var(--text-color-error); 1865 } 1866 } 1867 1868 /* Tab Notes */ 1869 .tab-note-editor-panel { 1870 --panel-width: 300px; 1871 --arrowpanel-header-min-height: auto; 1872 padding-inline: var(--space-xsmall); 1873 padding-block: 0; 1874 font: menu; 1875 1876 .panel-header { 1877 padding-block-start: 0; 1878 1879 & > h1 { 1880 margin: var(--space-small); 1881 } 1882 } 1883 1884 toolbarseparator { 1885 padding-inline: 0; 1886 } 1887 1888 .panel-body { 1889 display: flex; 1890 padding-block: var(--space-medium); 1891 } 1892 1893 .panel-action-row { 1894 display: flex; 1895 justify-content: space-between; 1896 gap: var(--space-large); 1897 } 1898 } 1899 1900 #tab-note-text { 1901 width: 100%; 1902 padding: var(--space-medium); 1903 resize: none; 1904 min-height: 3lh; 1905 max-height: 352px; 1906 overflow-y: auto; 1907 } 1908 1909 #tab-note-overflow-indicator { 1910 font-size: 0.85em; 1911 visibility: hidden; 1912 color: var(--text-color-deemphasized); 1913 1914 /* This will apply to both the overflow=warn state (the user has almost 1915 * overflowed the limit) and the overflow=overflow state (the user actually 1916 * has overflowed the limit). 1917 */ 1918 .tab-note-editor-panel[overflow] & { 1919 visibility: inherit; 1920 } 1921 1922 .tab-note-editor-panel[overflow="overflow"] & { 1923 color: var(--text-color-error); 1924 } 1925 } 1926 1927 /* Tab Overflow */ 1928 1929 #tabbrowser-arrowscrollbox, 1930 #pinned-tabs-container { 1931 &[orient="horizontal"] { 1932 &:not([scrolledtostart])::part(overflow-start-indicator), 1933 &:not([scrolledtoend])::part(overflow-end-indicator) { 1934 width: 7px; /* The width is the sum of the inline margins */ 1935 /* prettier-ignore */ 1936 background-image: radial-gradient(ellipse at bottom, 1937 rgba(0,0,0,0.1) 0%, 1938 rgba(0,0,0,0.1) 7.6%, 1939 rgba(0,0,0,0) 87.5%); 1940 background-repeat: no-repeat; 1941 background-position: -3px; 1942 border-left: 0.5px solid rgba(255, 255, 255, 0.2); 1943 pointer-events: none; 1944 position: relative; 1945 border-bottom: 0.5px solid transparent; 1946 } 1947 1948 &:not([scrolledtostart])::part(overflow-start-indicator) { 1949 margin-inline: -0.5px -6.5px; 1950 } 1951 1952 &:not([scrolledtoend])::part(overflow-end-indicator) { 1953 margin-inline: -6.5px -0.5px; 1954 } 1955 1956 &:-moz-locale-dir(rtl)::part(overflow-start-indicator), 1957 &:-moz-locale-dir(ltr)::part(overflow-end-indicator) { 1958 transform: scaleX(-1); 1959 } 1960 } 1961 1962 &[orient="vertical"] { 1963 &::part(overflow-start-indicator), 1964 &::part(overflow-end-indicator) { 1965 background-image: linear-gradient(to top, transparent 0%, light-dark(rgba(0, 0, 0, 0.05), rgba(255, 255, 255, 0.05))); 1966 background-repeat: no-repeat; 1967 pointer-events: none; 1968 1969 position: relative; 1970 height: 16px; 1971 z-index: 1; 1972 1973 margin-block: 0 -16px; 1974 } 1975 1976 /* Flip the fade at the bottom */ 1977 &::part(overflow-end-indicator) { 1978 transform: scaleY(-1); 1979 margin-block: -16px 0; 1980 } 1981 } 1982 1983 /* Scroll arrows */ 1984 1985 &::part(scrollbutton-up), 1986 &::part(scrollbutton-down) { 1987 --arrowscrollbox-scrollicon-border-radius: var(--tab-border-radius); 1988 --arrowscrollbox-scrollicon-hover-background-color: var(--toolbarbutton-hover-background); 1989 --arrowscrollbox-scrollicon-active-background-color: var(--toolbarbutton-active-background); 1990 --arrowscrollbox-scrollicon-padding: var(--toolbarbutton-inner-padding) 2px; 1991 1992 appearance: none; 1993 padding: 0 4px; 1994 fill: var(--toolbarbutton-icon-fill); 1995 margin: 0; 1996 } 1997 1998 #navigator-toolbox:not(:hover) &:not([highlight])::part(scrollbutton-down) { 1999 --arrowscrollbox-scrollicon-transition: 1s background-color ease-out; 2000 } 2001 2002 &[highlight]::part(scrollbutton-down) { 2003 --arrowscrollbox-scrollicon-background-color: SelectedItem; 2004 } 2005 2006 &[scrolledtostart]::part(overflow-start-indicator), 2007 &[scrolledtoend]::part(overflow-end-indicator) { 2008 opacity: 0; 2009 } 2010 2011 &::part(overflow-start-indicator), 2012 &::part(overflow-end-indicator) { 2013 transition: opacity 150ms ease; 2014 } 2015 } 2016 2017 #tabbrowser-arrowscrollbox[orient="horizontal"]::part(scrollbox) { 2018 contain: inline-size; 2019 } 2020 2021 /* Vertical tabs styling */ 2022 2023 #tabbrowser-arrowscrollbox[orient="vertical"] { 2024 /* Don't allow resizing below the height of 3 tabs */ 2025 min-height: calc(3 * var(--tab-height-with-margin-padding)); 2026 2027 &::part(scrollbutton-up), 2028 &::part(scrollbutton-down) { 2029 display: none; 2030 } 2031 2032 &::part(scrollbox) { 2033 scrollbar-width: thin; 2034 scrollbar-color: var(--vertical-tabs-scrollbar-color); 2035 overflow-y: auto; 2036 } 2037 } 2038 2039 #tabbrowser-arrowscrollbox[orient="vertical"] > #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button, 2040 #vertical-tabs-newtab-button { 2041 appearance: none; 2042 min-height: var(--tab-min-height); 2043 line-height: var(--tab-label-line-height); 2044 border-radius: var(--tab-border-radius); 2045 padding: 0 calc(var(--tab-inline-padding) - var(--tab-inner-inline-margin)); 2046 width: var(--tab-collapsed-background-width); 2047 margin-inline: var(--tab-inner-inline-margin); 2048 2049 #tabbrowser-tabs[orient="vertical"]:not([expanded]) & > .toolbarbutton-text { 2050 display: none; 2051 } 2052 2053 &:hover { 2054 background-color: var(--tab-hover-background-color); 2055 outline-color: var(--tab-hover-outline-color); 2056 } 2057 2058 &:focus-visible { 2059 outline: var(--focus-outline); 2060 outline-offset: var(--focus-outline-inset); 2061 } 2062 2063 > .toolbarbutton-text { 2064 text-align: start; 2065 padding-inline-start: var(--tab-icon-end-margin); 2066 } 2067 } 2068 2069 /* For #vertical-tabs-newtab-button, shown when tabs are overflowing, the gap 2070 * with the other items comes from the grid-gap on tabbrowser-tabs which is a 2071 * flex container. #tabs-newtab-button is a child of the arrowscrollbox where 2072 * we don't want a gap (between tabs), so we have to add some margin. 2073 */ 2074 #tabbrowser-arrowscrollbox[orient="vertical"] > #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button { 2075 margin-block: var(--tab-block-margin); 2076 } 2077 2078 #tabbrowser-tabs[expanded] { 2079 > #vertical-tabs-newtab-button { 2080 width: auto; 2081 } 2082 2083 > #tabbrowser-arrowscrollbox[orient="vertical"] > #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button { 2084 width: 100%; 2085 } 2086 } 2087 2088 #vertical-tabs { 2089 overflow: hidden; 2090 display: none; 2091 2092 &[visible] { 2093 display: flex; 2094 flex-grow: 1; 2095 container-type: inline-size; 2096 container-name: vertical-tabs-container; 2097 } 2098 } 2099 2100 #pinned-tabs-container[orient="vertical"] { 2101 /* Don't allow resizing below the height of 1 row of pinned tabs */ 2102 min-height: var(--tab-height-with-margin-padding); 2103 2104 &:empty { 2105 display: none; 2106 } 2107 2108 &::part(scrollbutton-up), 2109 &::part(scrollbutton-down) { 2110 display: none; 2111 } 2112 2113 &::part(scrollbox) { 2114 scrollbar-width: thin; 2115 scrollbar-color: var(--vertical-tabs-scrollbar-color); 2116 overflow-y: auto; 2117 } 2118 2119 .tabbrowser-tab:not(:hover) > .tab-stack > .tab-background:not([selected], [multiselected]) { 2120 background-color: color-mix(in srgb, currentColor 7%, transparent); 2121 } 2122 2123 &::part(items-wrapper) { 2124 flex: 0 1 0; 2125 } 2126 2127 :root:not([sidebar-expand-on-hover]) & { 2128 --tab-inline-padding: calc((var(--tab-collapsed-background-width) + 2 * var(--tab-pinned-margin-inline-expanded) - var(--icon-size)) / 2); 2129 /* stylelint-disable-next-line media-query-no-invalid */ 2130 @media not -moz-pref("sidebar.visibility", "expand-on-hover") { 2131 /* We need these rules to apply at all times when the sidebar.visibility 2132 pref is not set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 2133 has not been added to root. There are certain scenarios when that attribute is temporarily 2134 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 2135 &::part(items-wrapper) { 2136 grid-template-columns: repeat(auto-fit, minmax(var(--tab-pinned-min-width-expanded), auto)); 2137 display: grid; 2138 grid-auto-rows: var(--tab-height-with-margin-padding); 2139 } 2140 2141 .tab-label-container { 2142 display: none; 2143 } 2144 } 2145 2146 .tab-content { 2147 justify-content: center; 2148 } 2149 2150 #tabbrowser-tabs { 2151 display: grid; 2152 } 2153 2154 #tabbrowser-tabs[expanded] > & { 2155 .tab-background { 2156 margin-inline: var(--tab-pinned-margin-inline-expanded); 2157 } 2158 2159 &::part(items-wrapper) { 2160 padding-inline: var(--tab-pinned-container-margin-inline-expanded); 2161 } 2162 } 2163 } 2164 2165 /* stylelint-disable-next-line media-query-no-invalid */ 2166 @media -moz-pref("sidebar.visibility", "expand-on-hover") { 2167 /* We need this rule to apply at all times when the sidebar.visibility 2168 pref is set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 2169 has been added to root. There are certain scenarios when that attribute is temporarily 2170 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 2171 grid-template-columns: 1fr; 2172 } 2173 } 2174 2175 #vertical-pinned-tabs-splitter { 2176 display: block; 2177 border-top: var(--tabstrip-inner-border); 2178 border-bottom: none; 2179 background-color: transparent; 2180 margin-inline: var(--tab-inner-inline-margin); 2181 min-height: 2px; 2182 2183 #pinned-tabs-container:empty + & { 2184 display: none; 2185 } 2186 2187 /* stylelint-disable-next-line media-query-no-invalid */ 2188 @media not -moz-pref("sidebar.verticalTabs") { 2189 display: none; 2190 } 2191 2192 &:hover { 2193 background-color: var(--focus-outline-color); 2194 border-radius: var(--border-radius-medium); 2195 } 2196 2197 /* stylelint-disable-next-line media-query-no-invalid */ 2198 @media not -moz-pref("sidebar.visibility", "expand-on-hover") { 2199 /* We need these rules to apply at all times when the sidebar.visibility 2200 pref is not set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 2201 has not been added to root. There are certain scenarios when that attribute is temporarily 2202 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 2203 #tabbrowser-tabs[expanded] > & { 2204 border-top-color: transparent; 2205 } 2206 } 2207 } 2208 2209 #tabbrowser-tabs[orient="vertical"] { 2210 --tab-min-width: unset; 2211 --tab-inline-padding: calc((var(--tab-collapsed-width) - var(--icon-size)) / 2); 2212 2213 min-height: 0; 2214 display: flex; 2215 flex-direction: column; 2216 align-content: flex-start; 2217 grid-gap: var(--space-small); 2218 2219 &::after { 2220 content: ""; 2221 border-bottom: var(--tabstrip-inner-border); 2222 margin-inline: var(--tab-inner-inline-margin); 2223 } 2224 2225 &:not([overflow])::after { 2226 border-color: transparent; 2227 } 2228 2229 /* stylelint-disable-next-line media-query-no-invalid */ 2230 @media not -moz-pref("sidebar.visibility", "expand-on-hover") { 2231 /* We need these rules to apply at all times when the sidebar.visibility 2232 pref is not set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 2233 has not been added to root. There are certain scenarios when that attribute is temporarily 2234 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 2235 &:not([expanded])::after { 2236 border-color: transparent; 2237 } 2238 } 2239 2240 .tabbrowser-tab { 2241 flex: none; 2242 padding-inline: 0; 2243 padding-block: 3px 2px; 2244 2245 /* prevent the shadow of the close button from being cutoff by the toolbar on the first tab */ 2246 &:nth-child(1 of :not([hidden], [pinned])) { 2247 padding-block-start: 5px; 2248 } 2249 } 2250 2251 .tab-label-container { 2252 contain: inline-size; 2253 } 2254 2255 .tab-background { 2256 flex-direction: row-reverse; 2257 margin-inline: var(--tab-inner-inline-margin); 2258 } 2259 2260 &:not([expanded]) { 2261 .tabbrowser-tab[pinned] { 2262 width: var(--tab-collapsed-width); 2263 } 2264 2265 .tab-background { 2266 width: var(--tab-collapsed-background-width); 2267 } 2268 2269 .tab-label-container { 2270 display: none; 2271 } 2272 2273 .tab-close-button { 2274 opacity: 0; 2275 width: 15px; 2276 height: 15px; 2277 padding: 3.5px; 2278 margin: 0; 2279 fill: var(--tab-selected-textcolor); 2280 /* We want to make this look like the selected tab, but fully opaque. For that, 2281 * we build a stack of `--lwt-accent-color` (guaranteed opaque), then 2282 * `--toolbox-bgcolor`, then `--tab-selected-bgcolor`. 2283 * 2284 * We rely on at least one of `--toolbox-bgcolor` / `--tab-selected-bgcolor` 2285 * being opaque on the system themes, so even though `--lwt-accent-color` is 2286 * not set there, it ends up working out because we never see it through. 2287 * 2288 * We also apply one extra color on top (--close-button-extra-background) 2289 * for hover / active feedback. 2290 */ 2291 --close-button-extra-background: transparent; 2292 background-color: var(--lwt-accent-color); 2293 background-image: 2294 linear-gradient(var(--close-button-extra-background)), linear-gradient(var(--tab-selected-bgcolor)), linear-gradient(var(--toolbox-bgcolor)); 2295 color-scheme: var(--tab-selected-color-scheme); 2296 outline-color: var(--tab-selected-outline-color); 2297 box-shadow: var(--tab-selected-shadow); 2298 border-radius: var(--border-radius-circle); 2299 display: block; 2300 position: absolute; 2301 inset: auto; 2302 top: -3px; 2303 inset-inline-start: 2px; 2304 2305 &:-moz-window-inactive { 2306 background-image: 2307 linear-gradient(var(--close-button-extra-background)), linear-gradient(var(--tab-selected-bgcolor)), linear-gradient(var(--toolbox-bgcolor-inactive)); 2308 } 2309 2310 &:hover { 2311 --close-button-extra-background: var(--button-background-color-ghost-hover); 2312 } 2313 2314 &:hover:active { 2315 --close-button-extra-background: var(--button-background-color-ghost-active); 2316 } 2317 2318 .tabbrowser-tab:hover & { 2319 opacity: 1; 2320 } 2321 2322 &[pinned] { 2323 display: none; 2324 } 2325 2326 /* stylelint-disable-next-line media-query-no-invalid */ 2327 @media -moz-pref("sidebar.visibility", "expand-on-hover") { 2328 /* Tab close button when the sidebar is collapsed should 2329 not be shown when expand on hover is enabled because once 2330 you hover over the launcher to use the button, the launcher 2331 starts to expand and the button is no longer shown. Users can 2332 rely on the close button within the tab once expanded. 2333 We need this rule to apply at all times when the sidebar.visibility 2334 pref is set to "expand-on-hover" as opposed to when the "sidebar-expand-on-hover" attribute 2335 has been added to root. There are certain scenarios when that attribute is temporarily 2336 removed from root such as when toggling the sidebar to expand with the toolbar button. */ 2337 display: none; 2338 } 2339 } 2340 } 2341 2342 &[expanded] { 2343 --tab-icon-end-margin: 7.5px; 2344 2345 .tabbrowser-tab { 2346 max-width: none; 2347 2348 .tab-close-button { 2349 margin-inline-end: calc(var(--tab-close-button-padding) / -2); 2350 } 2351 2352 &:not(:hover) .tab-close-button:not([selected]) { 2353 display: none; 2354 } 2355 } 2356 } 2357 } 2358 2359 /* Tab drag and drop */ 2360 2361 .tab-drop-indicator { 2362 width: var(--icon-size-xsmall); 2363 margin-inline-start: calc(var(--icon-size-xsmall) * -1); 2364 background: url(chrome://browser/skin/tabbrowser/tab-drag-indicator.svg) no-repeat center; 2365 position: relative; 2366 z-index: 2; 2367 pointer-events: none; 2368 } 2369 2370 .dragfeedback-tab { 2371 appearance: none; 2372 opacity: 0.65; 2373 -moz-window-shadow: none; 2374 } 2375 2376 /* Firefox View button and menu item */ 2377 2378 #TabsToolbar #firefox-view-button[open] > .toolbarbutton-icon { 2379 background-color: var(--tab-selected-bgcolor); 2380 box-shadow: var(--tab-selected-shadow); 2381 outline-color: var(--tab-selected-outline-color); 2382 color: var(--tab-selected-textcolor); 2383 color-scheme: var(--tab-selected-color-scheme); 2384 } 2385 2386 /* about:firefoxview is disabled in Base Browser. See tor-browser#42037. 2387 * Therefore we always hide #firefox-view-button, regardless of private 2388 * browsing. Here we only want to draw the border if there is a non-hidden 2389 * toolbar item before the tabs. */ 2390 :root :is(toolbarbutton:not(#firefox-view-button), toolbarpaletteitem:not(#wrapper-firefox-view-button)) ~ #tabbrowser-tabs { 2391 border-inline-start: var(--tabstrip-inner-border); 2392 padding-inline-start: 2px; 2393 margin-inline-start: 2px; 2394 } 2395 2396 /* about:firefoxview is disabled in Base Browser. Always hide the toolbar button 2397 * and menu item regardless of private browsing. See tor-browser#42037. */ 2398 #firefox-view-button, 2399 #menu_openFirefoxView { 2400 display: none; 2401 } 2402 2403 toolbar:not(#TabsToolbar) #firefox-view-button { 2404 background-position: top 25% right 25%; 2405 2406 /* RTL notification dot */ 2407 &:-moz-locale-dir(rtl) { 2408 background-position-x: left 25%; 2409 } 2410 } 2411 2412 :is(#widget-overflow-mainView, #widget-overflow-fixed-list) #firefox-view-button { 2413 background-position: top 25% left 22px; 2414 2415 &:-moz-locale-dir(rtl) { 2416 background-position-x: right 22px; 2417 } 2418 } 2419 2420 /* New tab button */ 2421 2422 #tabs-newtab-button, 2423 #vertical-tabs-newtab-button, 2424 #TabsToolbar #new-tab-button { 2425 list-style-image: url(chrome://global/skin/icons/plus.svg); 2426 } 2427 2428 #tabbrowser-tabs[hasadjacentnewtabbutton]:not([overflow]) ~ #new-tab-button, 2429 #tabbrowser-tabs[orient="horizontal"] > #vertical-tabs-newtab-button, 2430 #tabbrowser-tabs[orient="vertical"]:not([overflow]) > #vertical-tabs-newtab-button, 2431 #tabbrowser-arrowscrollbox[overflowing] > #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button, 2432 #tabbrowser-tabs:not([hasadjacentnewtabbutton])[orient="horizontal"] > #tabbrowser-arrowscrollbox > #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button, 2433 #TabsToolbar[customizing] #tabs-newtab-button { 2434 display: none; 2435 } 2436 2437 /* All tabs button and menupopup */ 2438 2439 #alltabs-button { 2440 list-style-image: url("chrome://browser/skin/tabs.svg"); 2441 2442 #TabsToolbar & { 2443 list-style-image: url("chrome://global/skin/icons/arrow-down.svg"); 2444 } 2445 2446 #tabbrowser-tabs[hiddensoundplaying] ~ & > .toolbarbutton-badge-stack > .toolbarbutton-badge { 2447 background: transparent url(chrome://browser/skin/tabbrowser/tab-audio-playing-small.svg); 2448 box-shadow: none; 2449 /* Match the color of the button, rather than label default. */ 2450 color: inherit; 2451 display: block; 2452 -moz-context-properties: fill, fill-opacity, stroke; 2453 fill: currentColor; 2454 stroke: transparent; 2455 /* "!important" is necessary to override the rule in toolbarbutton.css */ 2456 margin: -7px 0 0 !important; 2457 margin-inline-end: -4px !important; 2458 min-width: var(--icon-size-xsmall); 2459 min-height: var(--icon-size-xsmall); 2460 } 2461 } 2462 2463 /* The list of tabs is in its own panel-subview-body which will scroll. We don't 2464 want any padding below the scrollbar, so remove the bottom padding 2465 from the outer panel-subview-body. */ 2466 #allTabsMenu-allTabsView > .panel-subview-body { 2467 padding-bottom: 0; 2468 } 2469 2470 #allTabsMenu-allTabsView-tabs { 2471 padding-top: 0; 2472 } 2473 2474 #allTabsMenu-dropIndicatorHolder { 2475 display: block; 2476 position: relative; 2477 } 2478 2479 #allTabsMenu-dropIndicator { 2480 background: url(chrome://browser/skin/tabbrowser/tab-drag-indicator.svg) no-repeat center; 2481 display: block; 2482 position: absolute; 2483 transform: rotate(-90deg); 2484 width: var(--icon-size-xsmall); 2485 height: 29px; 2486 inset-inline-start: 8px; 2487 top: 0; 2488 pointer-events: none; 2489 2490 &:-moz-locale-dir(rtl) { 2491 transform: rotate(90deg); 2492 } 2493 } 2494 2495 #allTabsMenu-groupsView { 2496 &:empty, 2497 &:empty + #allTabsMenu-groupsSeparator { 2498 display: none; 2499 } 2500 } 2501 2502 .all-tabs-item { 2503 border-radius: var(--arrowpanel-menuitem-border-radius); 2504 margin-inline: var(--arrowpanel-menuitem-margin-inline); 2505 2506 &.grouped { 2507 /* Indent further by the size of a favicon and the favicon's end margin. */ 2508 margin-inline-start: calc(var(--arrowpanel-menuitem-margin-inline) + 16px + 8px); 2509 } 2510 2511 &[selected] { 2512 font-weight: var(--font-weight-semibold); 2513 } 2514 2515 > toolbarbutton { 2516 margin: 0; 2517 color: var(--button-text-color-ghost); 2518 background-color: var(--button-background-color-ghost); 2519 2520 &:hover { 2521 color: var(--button-text-color-ghost-hover); 2522 background-color: var(--button-background-color-ghost-hover); 2523 } 2524 2525 &:hover:active { 2526 color: var(--button-text-color-ghost-active); 2527 background-color: var(--button-background-color-ghost-active); 2528 } 2529 2530 &.all-tabs-container-indicator { 2531 position: relative; 2532 &::before { 2533 content: ""; 2534 position: absolute; 2535 inset: 2px -3px; 2536 background: var(--identity-tab-color); 2537 width: 2px; 2538 } 2539 } 2540 } 2541 } 2542 2543 .all-tabs-button { 2544 list-style-image: url("chrome://global/skin/icons/defaultFavicon.svg"); 2545 } 2546 2547 .all-tabs-secondary-button { 2548 -moz-context-properties: fill; 2549 fill: currentColor; 2550 2551 > label { 2552 display: none !important; /* override panelUI-shared.css */ 2553 } 2554 2555 &:hover { 2556 opacity: 1; 2557 } 2558 } 2559 2560 .all-tabs-mute-button[soundplaying] { 2561 list-style-image: url(chrome://global/skin/media/audio.svg); 2562 } 2563 2564 .all-tabs-mute-button[muted] { 2565 list-style-image: url(chrome://global/skin/media/audio-muted.svg); 2566 } 2567 2568 .all-tabs-close-button { 2569 list-style-image: url(resource://content-accessible/close-12.svg); 2570 2571 > .toolbarbutton-icon { 2572 margin-inline: 2px !important; /* override panelUI-shared.css */ 2573 } 2574 } 2575 2576 .tab-throbber-tabslist { 2577 height: 16px; 2578 width: 16px; 2579 2580 &[busy] { 2581 list-style-image: url("chrome://global/skin/icons/loading.svg"); 2582 -moz-context-properties: fill; 2583 fill: currentColor; 2584 opacity: 0.7; 2585 } 2586 2587 &[progress] { 2588 color: var(--tab-loading-fill); 2589 opacity: 1; 2590 } 2591 } 2592 2593 /* 2594 * Tab note icon that displays inline on unpinned tabs in the horizontal tab 2595 * strip and the expanded vertical tab strip. Pinned tabs and the collapsed 2596 * vertical tab strip get a separate space-constrained treatment using the 2597 * `.tab-notes-icon-overlay` image. 2598 */ 2599 .tab-note-icon { 2600 display: none; 2601 box-sizing: border-box; 2602 2603 width: calc(var(--icon-size-xsmall) + 8px); 2604 height: calc(var(--icon-size-xsmall) + 8px); 2605 padding: 4px; 2606 margin-inline-end: calc(var(--tab-close-button-padding) / -2); 2607 2608 list-style-image: url("chrome://global/skin/icons/tab-notes-12.svg"); 2609 -moz-context-properties: fill; 2610 fill: var(--icon-color); 2611 2612 #tabbrowser-tabs[orient="vertical"][expanded] & { 2613 /* 2614 * Keep the tab note icon out of the way of the close button, even when 2615 * the close button is not showing because the tab is not being hovered. 2616 */ 2617 .tabbrowser-tab:not(:hover) & { 2618 /* .tab-close-button is 24px wide with border-box sizing */ 2619 margin-inline-end: calc(24px - var(--tab-close-button-padding)); 2620 } 2621 .tabbrowser-tab:is([visuallyselected], :hover) & { 2622 margin-inline-end: calc(var(--tab-close-button-padding) / -2); 2623 } 2624 } 2625 } 2626 2627 /* stylelint-disable-next-line media-query-no-invalid */ 2628 @media -moz-pref("browser.tabs.notes.enabled") and (not -moz-pref("sidebar.visibility", "expand-on-hover")) { 2629 .tabbrowser-tab[tab-note]:not([pinned]) .tab-note-icon { 2630 #tabbrowser-tabs[orient="horizontal"] &, 2631 #tabbrowser-tabs[orient="vertical"][expanded] & { 2632 display: revert; 2633 } 2634 } 2635 } 2636 2637 /* NOTE(emilio): The double class is an specificity hack to win over the 2638 * .subviewbutton-iconic rules */ 2639 .tab-group-icon.tab-group-icon { 2640 list-style-image: url("chrome://browser/skin/tabbrowser/tab-group-chicklet.svg"); 2641 --menuitem-icon: url("chrome://browser/skin/tabbrowser/tab-group-chicklet.svg"); 2642 -moz-context-properties: fill, stroke; 2643 fill: light-dark(var(--tab-group-color), var(--tab-group-color-invert)); 2644 stroke: light-dark(var(--tab-group-color), var(--tab-group-color-invert)); 2645 2646 &.tab-group-icon-collapsed { 2647 fill: light-dark(var(--tab-group-color-pale), var(--tab-group-color)); 2648 stroke: light-dark(var(--tab-group-color), var(--tab-group-color-pale)); 2649 } 2650 2651 &.tab-group-icon-closed { 2652 fill: transparent; 2653 stroke: light-dark(var(--tab-group-color), var(--tab-group-color-invert)); 2654 } 2655 } 2656 2657 #tab-group-suggestions-heading, 2658 #tab-group-main { 2659 flex-direction: column; 2660 } 2661 2662 #tab-group-default-actions { 2663 padding-top: var(--space-medium); 2664 } 2665 2666 #tab-group-default-actions, 2667 #tab-group-suggestions-load-actions, 2668 #tab-group-suggestion-button, 2669 #tab-group-suggestions-message-container { 2670 display: none; 2671 } 2672 2673 #tab-group-suggestions-heading:not([hidden]), 2674 #tab-group-main:not([hidden]), 2675 #tab-group-suggestions-separator:not([hidden]), 2676 #tab-group-suggestions-load-actions:not([hidden]), 2677 #tab-group-suggestions-loading:not([hidden]), 2678 #tab-group-default-actions:not([hidden]), 2679 #tab-group-suggestion-button:not([hidden]) { 2680 display: flex; 2681 } 2682 2683 #tab-group-suggestions-message-container:not([hidden]), 2684 #tab-group-suggestions-container:not([hidden]) { 2685 display: block; 2686 } 2687 2688 #tab-group-suggestions-disclaimer > a { 2689 display: inline; 2690 color: inherit; 2691 } 2692 2693 #tab-group-suggestions-disclaimer:not([hidden]) { 2694 display: initial; 2695 } 2696 2697 #tab-group-select-checkbox { 2698 margin-top: 0.5em; 2699 } 2700 2701 #tab-group-suggestion-button { 2702 --button-border-color-ghost: var(--border-color-selected); 2703 color: var(--color-accent-primary); 2704 width: 100%; 2705 2706 &:hover { 2707 --button-border-color-ghost-hover: var(--border-color-selected); 2708 } 2709 } 2710 2711 #tab-group-suggestions { 2712 margin-inline-start: var(--space-xlarge); 2713 margin-block-start: var(--space-xlarge); 2714 display: flex; 2715 flex-direction: column; 2716 gap: var(--space-xlarge); 2717 } 2718 2719 #tab-group-suggestions-loading { 2720 gap: 4px; 2721 flex-direction: column; 2722 margin: 0 8px 8px; 2723 } 2724 2725 #tab-group-suggestions-message-container { 2726 --button-opacity-disabled: 1; 2727 color: inherit; 2728 font-size: 0.85em; 2729 margin-bottom: var(--space-medium); 2730 & > p { 2731 margin-top: 0; 2732 padding-inline: 35px var(--space-medium); 2733 } 2734 } 2735 2736 .tab-group-suggestions-loading-header, 2737 #tab-group-suggestions-header { 2738 margin: 8px 0; 2739 } 2740 2741 @keyframes tab-group-loading-block-animation { 2742 0% { 2743 background-position: 200% 0; 2744 } 2745 2746 50% { 2747 background-position: 0 0; 2748 } 2749 2750 100% { 2751 background-position: -200% 0; 2752 } 2753 } 2754 2755 .tab-group-suggestions-loading-block:nth-of-type(2) { 2756 animation-delay: 0.1s; 2757 } 2758 .tab-group-suggestions-loading-block:nth-of-type(3) { 2759 animation-delay: 0.2s; 2760 } 2761 .tab-group-suggestions-loading-block:nth-of-type(4) { 2762 animation-delay: 0.3s; 2763 } 2764 2765 .tab-group-suggestions-loading-block { 2766 animation: tab-group-loading-block-animation 3s infinite; 2767 outline-color: var(--tab-group-suggestions-loading-animation-color-1); 2768 border-color: var(--tab-group-suggestions-loading-animation-color-2); 2769 background: linear-gradient( 2770 100deg, 2771 color-mix(in srgb, var(--tab-group-suggestions-loading-animation-color-2), transparent 60%) 30%, 2772 var(--tab-group-suggestions-loading-animation-color-1) 50%, 2773 color-mix(in srgb, var(--tab-group-suggestions-loading-animation-color-2), transparent 60%) 70% 2774 ); 2775 background-size: 200% 100%; 2776 border-radius: var(--border-radius-small); 2777 height: 1.5em; 2778 margin: 0; 2779 margin-bottom: 0.5em; 2780 padding: 0; 2781 white-space: nowrap; 2782 width: 100%; 2783 }