browser-shared.css (37160B)
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 @import url("chrome://browser/skin/browser-colors.css"); 6 @import url("chrome://browser/skin/addons/extension-controlled.css"); 7 @import url("chrome://browser/skin/addons/unified-extensions.css"); 8 @import url("chrome://browser/skin/downloads/indicator.css"); 9 @import url("chrome://browser/skin/tabbrowser/content-area.css"); 10 @import url("chrome://browser/skin/tabbrowser/ctrlTab.css"); 11 @import url("chrome://browser/skin/tabbrowser/fullscreen-and-pointerlock.css"); 12 @import url("chrome://browser/skin/tabbrowser/tabs.css"); 13 @import url("chrome://browser/skin/tabbrowser/tab-hover-preview.css"); 14 @import url("chrome://browser/skin/toolbarbuttons.css"); 15 @import url("chrome://browser/skin/toolbarbutton-icons.css"); 16 @import url("chrome://browser/skin/menupanel.css"); 17 @import url("chrome://browser/skin/urlbar-searchbar.css"); 18 @import url("chrome://browser/skin/identity-block/identity-block.css"); 19 @import url("chrome://browser/skin/notification-icons.css"); 20 @import url("chrome://browser/skin/addon-notification.css"); 21 @import url("chrome://browser/skin/identity-credential-notification.css"); 22 @import url("chrome://browser/skin/urlbarView.css"); 23 @import url("chrome://browser/skin/autocomplete.css"); 24 @import url("chrome://browser/skin/places/editBookmarkPanel.css"); 25 @import url("chrome://browser/skin/searchbar.css"); 26 @import url("chrome://browser/skin/sidebar.css"); 27 @import url("chrome://browser/skin/smartbar.css"); 28 @import url("chrome://browser/skin/aiWindowSidebar.css"); 29 @import url("chrome://browser/skin/customizableui/customizeMode.css"); 30 @import url("chrome://browser/skin/UITour.css"); 31 @import url("chrome://browser/skin/formautofill-notification.css"); 32 @import url("chrome://global/skin/tor-colors.css"); 33 @import url("chrome://browser/skin/tor-urlbar-button.css"); 34 @import url("chrome://browser/skin/onionlocation.css"); 35 36 :root, 37 body { 38 height: 100%; 39 width: 100%; 40 overflow: clip; 41 } 42 43 :root { 44 --window-min-width: 500px; 45 /* Vertical tabs need extra room in the nav bar for window controls, 46 drag space, and the sidebar button. */ 47 --window-min-width-increase-for-vertical-tabs: calc(var(--window-controls-size) + 23px); 48 --window-controls-size: 138px; 49 @media (-moz-platform: macos) { 50 --window-controls-size: 76px; 51 } 52 @media (-moz-platform: linux) { 53 /* FIXME: Use --titlebar-button-* variables to calculate the window 54 controls' size. */ 55 --window-controls-size: 115px; 56 } 57 58 user-select: none; 59 color-scheme: light dark; 60 text-rendering: optimizeLegibility; 61 min-height: 95px; 62 min-width: 95px; 63 64 @media not (forced-colors) { 65 accent-color: var(--color-accent-primary); 66 } 67 68 &:-moz-locale-dir(rtl) { 69 direction: rtl; 70 } 71 72 &:not([chromehidden~="toolbar"]) { 73 min-width: var(--window-min-width); 74 min-height: 120px; 75 76 /* stylelint-disable-next-line media-query-no-invalid */ 77 @media -moz-pref("sidebar.verticalTabs") { 78 min-width: calc(var(--window-min-width) + var(--window-min-width-increase-for-vertical-tabs)); 79 80 /* If the Content Analysis icon is showing, we don't 81 want to collapse it, so make a little more room. */ 82 &[contentanalysisactive] { 83 min-width: calc(var(--window-min-width) + var(--window-min-width-increase-for-vertical-tabs) + 36px); 84 } 85 } 86 } 87 88 &[taskbartab]:not([chromehidden~="toolbar"]) { 89 min-width: 804px; 90 } 91 92 /* z-indices that fight on the browser stack */ 93 --browser-stack-z-index-devtools-splitter: 1; 94 --browser-stack-z-index-dialog-stack: 2; 95 --browser-stack-z-index-rdm-toolbar: 3; 96 97 /* z-indices that fight in the general browser / toolbox area */ 98 --browser-area-z-index-toolbox: 0; 99 --browser-area-z-index-sidebar: 1; 100 --browser-area-z-index-tabbox: 2; 101 --browser-area-z-index-sidebar-expand-on-hover: 4; 102 --browser-area-z-index-sidebar-splitter: 3; 103 104 /* on macOS the animation of the toolbox in fullscreen needs the toolbox to be higher */ 105 --browser-area-z-index-toolbox-while-animating: 4; 106 107 --toolbarbutton-border-radius: var(--button-border-radius); 108 --identity-box-margin-inline: 4px; 109 --urlbar-min-height: max(32px, 1.4em); 110 --urlbar-icon-padding: calc((var(--urlbar-min-height) - 2px /* border */ - 2px /* padding */ - 16px /* icon */) / 2); 111 112 /* This should be used for icons and chiclets inside the input field, as well 113 as result rows. It makes the gap around them more uniform when they are 114 close to the field edges. */ 115 --urlbar-inner-border-radius: calc(var(--toolbarbutton-border-radius) - 1px); 116 --urlbar-searchmodeswitcher-inline-padding: 6px; 117 --urlbar-searchmodeswitcher-margin-inline-end: 0.45em; 118 119 --lwt-additional-images: none; 120 --lwt-background-alignment: right top; 121 --lwt-background-tiling: no-repeat; 122 123 --ext-theme-background-transition: background-color 0.1s cubic-bezier(0.17, 0.67, 0.83, 0.67); 124 125 --inactive-window-transition: 0.2s ease; 126 --inactive-titlebar-opacity: 0.6; 127 /** 128 * On macOS and Linux, fading the whole titlebar is the native behavior. 129 * 130 * On Windows there's no particular standard, but the default .6 opacity 131 * feels like too much, specially because Windows "fades" the titlebar of 132 * unresponsive applications. Fade substantially less the titlebar on windows 133 * to account for this platform difference. 134 */ 135 @media (-moz-platform: windows) { 136 --inactive-titlebar-opacity: 0.75; 137 } 138 @media (prefers-reduced-motion) { 139 --inactive-window-transition: 0s; 140 } 141 142 &[lwtheme] { 143 color: var(--lwt-text-color); 144 } 145 146 &[uidensity="compact"] { 147 --urlbar-min-height: max(26px, 1.4em); 148 } 149 150 &[uidensity="touch"] { 151 --urlbar-min-height: max(34px, 1.4em); 152 } 153 } 154 155 body { 156 display: flex; 157 flex-direction: column; 158 flex: 1; 159 margin: 0; 160 } 161 162 /* Toolbox and Toolbars */ 163 164 #navigator-toolbox { 165 appearance: none; 166 z-index: var(--browser-area-z-index-toolbox); 167 168 &[fullscreenShouldAnimate] { 169 transition: 0.8s margin-top ease-out; 170 } 171 172 /* While we are animating / have animated in the titlebar from macOS, 173 * the z-indices are subtly different to accommodate the sidebar better. 174 * 175 * We also give the toolbox a shadow and border in this case. 176 */ 177 &.fullscreen-with-menubar { 178 z-index: var(--browser-area-z-index-toolbox-while-animating); 179 box-shadow: var(--content-area-shadow); 180 border-bottom-color: var(--chrome-content-separator-color); 181 } 182 183 /* Themes define a set of toolbox foreground and background colors which we 184 * want to use across the toolbox and sidebar areas. That happens via the 185 * .browser-toolbox-background class. It's hard to make a theme's background 186 * images work with something other than the toolbox, so for now we ignore 187 * them on other things like the sidebar that could have 188 * .browser-toolbox-background */ 189 :root[lwtheme] & { 190 background-image: var(--lwt-additional-images); 191 background-repeat: var(--lwt-background-tiling); 192 background-position: var(--lwt-background-alignment); 193 } 194 195 /* When a theme defines both theme_frame and additional_backgrounds, show 196 the latter atop the former. */ 197 :root[lwtheme-image] & { 198 background-image: var(--lwt-header-image), var(--lwt-additional-images); 199 background-repeat: no-repeat, var(--lwt-background-tiling); 200 background-position: 201 right top, 202 var(--lwt-background-alignment); 203 } 204 } 205 206 .browser-toolbox-background { 207 position: relative; 208 background-color: var(--toolbox-bgcolor); 209 color: var(--toolbox-textcolor); 210 211 will-change: background-color; 212 transition: background-color var(--inactive-window-transition); 213 214 &:-moz-window-inactive { 215 background-color: var(--toolbox-bgcolor-inactive); 216 color: var(--toolbox-textcolor-inactive); 217 } 218 219 :root[customizing] & { 220 border-bottom-style: none; 221 } 222 223 @media (-moz-platform: macos) and (-moz-native-theme) { 224 /* This is conceptually a background, but putting this on a pseudo-element 225 * avoids it from suppressing the chrome-content separator border, etc. 226 * 227 * We make this exist unconditionally to prevent dynamic changes from 228 * reframing the whole toolbox when adding or removing it. 229 * 230 * See bug 1949528 and bug 1476281 (which would make this unnecessary). */ 231 &::after { 232 content: ""; 233 position: absolute; 234 inset: 0; 235 z-index: -1; 236 } 237 238 /* Don't make the toolbox vibrant when in full-screen. macOS fullscreen has a 239 * native titlebar outside of the window (revealed on hover) anyways. */ 240 :root[customtitlebar]:not([lwtheme], [macOSNativeFullscreen]) & { 241 background-color: transparent; 242 243 &::after { 244 -moz-default-appearance: -moz-window-titlebar; 245 appearance: auto; 246 } 247 } 248 } 249 } 250 251 .browser-toolbar { 252 appearance: none; 253 /* Reset linux padding */ 254 padding: 0; 255 border-style: none; 256 background-color: transparent; 257 color: inherit; 258 259 /* stylelint-disable-next-line media-query-no-invalid */ 260 @media not -moz-pref("sidebar.verticalTabs") { 261 &:not(.browser-titlebar) { 262 background-color: var(--toolbar-bgcolor); 263 color: var(--toolbar-color); 264 } 265 } 266 } 267 268 /* Title bar */ 269 270 .browser-titlebar { 271 -moz-window-dragging: drag; 272 273 :root[customtitlebar] &, 274 :root[customtitlebar] & .urlbar:popover-open { 275 will-change: opacity; 276 transition: opacity var(--inactive-window-transition); 277 278 &:-moz-window-inactive { 279 opacity: var(--inactive-titlebar-opacity); 280 } 281 } 282 } 283 284 .titlebar-buttonbox-container { 285 order: 1000; 286 287 @media (-moz-platform: macos) and (not (-moz-mac-rtl)) { 288 &:-moz-locale-dir(ltr) { 289 order: -1; 290 } 291 } 292 293 @media (-moz-mac-rtl) { 294 &:-moz-locale-dir(rtl) { 295 order: -1; 296 } 297 } 298 299 #toolbar-menubar[autohide]:not([inactive]) ~ :is(#TabsToolbar, #nav-bar) > & { 300 visibility: hidden; 301 } 302 303 :root:not([customtitlebar], [inFullscreen]) & { 304 display: none; 305 } 306 } 307 308 .titlebar-spacer { 309 width: 40px; 310 311 :root[inFullscreen] &, 312 :root:not([customtitlebar]) & { 313 display: none; 314 } 315 316 @media (-moz-platform: windows) { 317 :root:not([sizemode="normal"]) &[type="pre-tabs"] { 318 display: none; 319 } 320 } 321 322 @media (-moz-platform: linux) and (-moz-gtk-csd-reversed-placement: 0) { 323 :root:not([sizemode="normal"]) &[type="pre-tabs"], 324 :root[gtktiledwindow="true"] &[type="pre-tabs"] { 325 display: none; 326 } 327 } 328 329 @media (-moz-gtk-csd-reversed-placement) { 330 :root:not([sizemode="normal"]) &[type="post-tabs"], 331 :root[gtktiledwindow="true"] &[type="post-tabs"] { 332 display: none; 333 } 334 } 335 336 @media (max-width: 500px) { 337 &[type="post-tabs"] { 338 display: none; 339 } 340 } 341 342 /* stylelint-disable-next-line media-query-no-invalid */ 343 @media -moz-pref("sidebar.verticalTabs") { 344 :root:not([taskbartab]) &:is([type="pre-tabs"], [type="post-tabs"]) { 345 display: none; 346 } 347 } 348 } 349 350 /* Hide the TabsToolbar/nav-bar titlebar controls if the menubar is permanently shown. 351 * (That is, if the menu bar doesn't autohide, and we're not in a fullscreen or 352 * popup window.) */ 353 :root:not([chromehidden~="menubar"], [inFullscreen]) 354 #toolbar-menubar:not([autohide], [collapsed]) 355 ~ :is(#TabsToolbar, #nav-bar) 356 > :is(.titlebar-buttonbox-container, .titlebar-spacer) { 357 display: none; 358 } 359 360 /* Only show the titlebar buttons and spacers in the first visible toolbar. */ 361 #navigator-toolbox:not([tabs-hidden]) > #nav-bar > :is(.titlebar-buttonbox-container, .titlebar-spacer) { 362 display: none; 363 } 364 365 :root:not([sizemode="maximized"], [sizemode="fullscreen"]) .titlebar-restore, 366 :root:is([sizemode="maximized"], [sizemode="fullscreen"]) .titlebar-max { 367 display: none; 368 } 369 370 .titlebar-buttonbox { 371 appearance: auto; 372 -moz-default-appearance: -moz-window-button-box; 373 position: relative; 374 375 :root:not([customtitlebar], [sizemode="fullscreen"]) & { 376 display: none; 377 } 378 } 379 380 /* Menu bar */ 381 382 #toolbar-menubar { 383 &[autohide] { 384 overflow: hidden; 385 386 /* For linux and windows, when temporarily showing the menu bar, make it at least 387 as tall as the tab toolbar such that the window controls don't appear to move up. 388 For MacOS, autohide is never true on the menubar. 389 */ 390 :root[customtitlebar] #navigator-toolbox:not([tabs-hidden]) > & { 391 min-height: var(--tabstrip-min-height); 392 } 393 /* adjust the height of the auto-hiding toolbar menubar when the tabstrip is 394 hidden and we need to match the height of the nav-bar. */ 395 :root[customtitlebar] #navigator-toolbox[tabs-hidden] > & { 396 min-height: calc(var(--urlbar-min-height) + 2 * var(--urlbar-padding-block)); 397 } 398 399 &[inactive]:not([customizing]) { 400 min-height: 0 !important; 401 height: 0 !important; 402 padding: 0 !important; 403 appearance: none !important; 404 } 405 } 406 } 407 408 /* Hide menu elements intended for keyboard access support */ 409 #main-menubar[openedwithkey="false"] .show-only-for-keyboard { 410 display: none; 411 } 412 413 /* Profiles menu */ 414 415 #menu_newProfile { 416 -moz-context-properties: fill; 417 fill: currentColor; 418 --menuitem-icon: url(chrome://global/skin/icons/plus.svg); 419 } 420 421 .menuitem-iconic-profile { 422 -moz-context-properties: fill, stroke; 423 fill: var(--menu-profiles-theme-bg); 424 stroke: var(--menu-profiles-theme-fg); 425 } 426 427 /* Navigation toolbar */ 428 429 #nav-bar { 430 /* The toolbar buttons that animate use position:absolute and require a 431 * positioned #nav-bar. */ 432 position: relative; 433 border-top: 0.01px var(--tabs-navbar-separator-style) var(--tabs-navbar-separator-color); 434 435 #navigator-toolbox[tabs-hidden] > & { 436 border-top-style: none; 437 } 438 439 :root[sessionrestored][lwtheme] & { 440 transition: var(--ext-theme-background-transition); 441 } 442 } 443 444 #nav-bar-customization-target { 445 /* Don't grow if potentially-user-sized elements (like the searchbar or the 446 * bookmarks toolbar item list) are too wide. This forces them to flex to the 447 * available space as much as possible, see bug 1795260. */ 448 min-width: 0; 449 450 /* Add space to beginning of toolbar and make that space click the first <toolbarbutton> */ 451 > :is(toolbarbutton, toolbaritem):first-child, 452 > toolbarpaletteitem:first-child > :is(toolbarbutton, toolbaritem) { 453 padding-inline-start: var(--toolbar-start-end-padding); 454 } 455 } 456 457 #vertical-spacer { 458 min-width: 20px; 459 460 /* stylelint-disable-next-line media-query-no-invalid */ 461 @media not -moz-pref("sidebar.verticalTabs") { 462 display: none; 463 } 464 465 :root[taskbartab] & { 466 display: none; 467 } 468 } 469 470 /* Bookmarks toolbar */ 471 472 #PersonalToolbar { 473 /* Make the toolbar not take any vertical space when it's empty, before 474 bookmarks load. Otherwise, showing the toolbar might resize the content 475 area twice. */ 476 min-height: 0; 477 padding-inline: 6px; 478 479 :root[uidensity="compact"] & { 480 padding-inline: 2px; 481 } 482 483 /* Vertical sliding animation */ 484 485 overflow: clip; 486 max-height: 4em; 487 488 :root[sessionrestored] &:not(.instant) { 489 transition: 490 min-height 170ms ease-out, 491 max-height 170ms ease-out, 492 var(--ext-theme-background-transition); 493 494 &[collapsed] { 495 transition: 496 min-height 170ms ease-out, 497 max-height 170ms ease-out, 498 visibility 170ms linear; 499 } 500 } 501 502 &[collapsed] { 503 max-height: 0; 504 505 &.instant { 506 visibility: collapse; 507 } 508 } 509 510 /* Bookmarks toolbar empty message */ 511 512 /* If the toolbar is not initialized set a zero width, but retain height. */ 513 &:not([collapsed], [initialized]) > #personal-toolbar-empty { 514 visibility: hidden; 515 width: 0; 516 overflow-x: hidden; 517 } 518 519 /* Bookmarks toolbar in customize mode */ 520 521 &[customizing] { 522 outline: 1px dashed; 523 outline-offset: -3px; 524 /* Avoid the toolbar having no height when there's no items in it */ 525 min-height: 22px; 526 } 527 } 528 529 #personal-toolbar-empty-description { 530 white-space: nowrap; 531 } 532 533 #personal-bookmarks { 534 position: relative; 535 -moz-window-dragging: inherit; 536 } 537 538 #fxms-bmb-button-wrapper, 539 toolbarpaletteitem > #personal-bookmarks > #PlacesToolbar, 540 #personal-bookmarks:is([overflowedItem="true"], [cui-areatype="panel"]) > #PlacesToolbar { 541 display: none; 542 } 543 544 /* Bookmarks toolbar drop indicator */ 545 546 #PlacesToolbarDropIndicatorHolder { 547 display: block; 548 position: absolute; 549 } 550 551 #PlacesToolbarDropIndicator { 552 list-style-image: url(chrome://browser/skin/toolbar-drag-indicator.svg); 553 pointer-events: none; 554 } 555 556 #notifications-toolbar { 557 min-height: 0; 558 flex-direction: column; 559 } 560 561 .bookmark-item[cutting] { 562 > .toolbarbutton-icon, 563 > .menu-icon { 564 opacity: 0.5; 565 } 566 567 > .toolbarbutton-text, 568 > .menu-text { 569 opacity: 0.7; 570 } 571 } 572 573 /* Menupopup drop indicators */ 574 575 menupopup::part(drop-indicator-container) { 576 /* TODO(emilio): When menupopups get ported to modern flex layout we can 577 * probably simplify this substantially, by making the indicator position: 578 * absolute or so (which was never properly supported in XUL). The container 579 * should become completely unnecessary then. */ 580 min-width: 0; 581 min-height: 0; 582 max-width: 100%; 583 max-height: 100%; 584 } 585 586 menupopup::part(drop-indicator-bar) { 587 position: relative; 588 /* these two margins must together compensate the indicator's height */ 589 margin-block: -1px; 590 } 591 592 menupopup::part(drop-indicator) { 593 list-style-image: none; 594 height: 2px; 595 margin-inline-end: -4em; 596 background-color: AccentColor; 597 pointer-events: none; 598 } 599 600 /* Back / Forward buttons context menu */ 601 602 .unified-nav-current { 603 font-weight: var(--font-weight-semibold); 604 } 605 606 .unified-nav-back, 607 .unified-nav-forward { 608 -moz-context-properties: fill; 609 fill: currentColor; 610 } 611 612 .unified-nav-back[_moz-menuactive]:-moz-locale-dir(ltr), 613 .unified-nav-forward[_moz-menuactive]:-moz-locale-dir(rtl) { 614 --menuitem-icon: url("chrome://browser/skin/back.svg") !important; 615 } 616 617 .unified-nav-forward[_moz-menuactive]:-moz-locale-dir(ltr), 618 .unified-nav-back[_moz-menuactive]:-moz-locale-dir(rtl) { 619 --menuitem-icon: url("chrome://browser/skin/forward.svg") !important; 620 } 621 622 /* Find bar */ 623 624 .browserContainer > findbar { 625 background-color: var(--toolbar-bgcolor); 626 color: var(--toolbar-color); 627 color-scheme: var(--toolbar-color-scheme); 628 border-top-color: var(--chrome-content-separator-color); 629 630 :root[lwtheme] & { 631 background-color: var(--lwt-accent-color); 632 background-image: linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-additional-images); 633 background-repeat: no-repeat, var(--lwt-background-tiling); 634 background-position: 635 right bottom, 636 var(--lwt-background-alignment); 637 background-position-y: bottom !important; 638 } 639 640 :root[lwtheme]:not([lwtheme-image]) &:-moz-window-inactive { 641 background-color: var(--lwt-accent-color-inactive, var(--lwt-accent-color)); 642 } 643 644 :root[lwtheme-image] & { 645 background-image: linear-gradient(var(--toolbar-bgcolor), var(--toolbar-bgcolor)), var(--lwt-header-image), var(--lwt-additional-images); 646 background-repeat: no-repeat, no-repeat, var(--lwt-background-tiling); 647 background-position: 648 center, 649 right bottom, 650 var(--lwt-background-alignment); 651 } 652 } 653 654 /* Private browsing indicator */ 655 656 .private-browsing-indicator-with-label { 657 align-items: center; 658 margin-inline: 7px; 659 660 :root:not([privatebrowsingmode="temporary"]) &, 661 #navigator-toolbox:not([tabs-hidden]) #nav-bar > & { 662 display: none; 663 } 664 665 #navigator-toolbox[tabs-hidden] #nav-bar > & { 666 margin-inline-end: 12px; 667 668 /* Hide the private browsing indicator 669 label when vertical tabs are enabled */ 670 > .private-browsing-indicator-label { 671 display: none; 672 } 673 } 674 } 675 676 .private-browsing-indicator-icon { 677 list-style-image: url("chrome://global/skin/icons/indicator-private-browsing.svg"); 678 width: 16px; 679 height: 16px; 680 } 681 682 /* Content analysis indicator */ 683 .content-analysis-indicator { 684 :root:not([contentanalysisactive]) &, 685 #navigator-toolbox:not([tabs-hidden]) > #nav-bar > & { 686 display: none; 687 } 688 } 689 690 /* Various panels and popup notifications */ 691 692 #screenshotsPagePanel { 693 position: relative; 694 max-height: 0; 695 z-index: 1; /* Above the web content in this stack. */ 696 } 697 698 /* Override theme colors since the picker uses extra colors that 699 themes cannot set */ 700 #DateTimePickerPanel { 701 color-scheme: env(-moz-content-preferred-color-scheme); 702 --arrowpanel-background: Field; 703 --arrowpanel-color: FieldText; 704 } 705 706 #widget-overflow .webextension-popup-browser { 707 background: white; 708 709 /* height set via JS can be lower than the stack min-height, 710 ensure the browser takes up at least that min-height */ 711 min-height: 100%; 712 } 713 714 #addon-progress-notification-progressmeter { 715 margin: 2px 4px; 716 } 717 718 #invalid-form-popup { 719 white-space: pre-wrap; 720 word-break: break-word; 721 unicode-bidi: plaintext; 722 723 > description { 724 max-width: 280px; 725 } 726 } 727 728 .popup-notification-invalid-input { 729 box-shadow: 0 0 1.5px 1px red; 730 731 &[focused] { 732 box-shadow: 0 0 2px 2px rgba(255, 0, 0, 0.4); 733 } 734 } 735 736 .popup-notification-description[popupid="webauthn-prompt-register-direct"] { 737 white-space: pre-line; 738 } 739 740 #sidebar-tools-overflow { 741 margin-inline: var(--space-large); 742 width: 17.5em; 743 744 #tools-overflow-list { 745 display: flex; 746 flex-direction: column; 747 gap: var(--space-xsmall); 748 padding: var(--space-xsmall); 749 width: 100%; 750 751 .expanded-button { 752 width: 100%; 753 754 &::part(button) { 755 font-size: var(--font-size-large); 756 font-weight: normal; 757 justify-content: flex-start; 758 padding-inline: calc((var(--button-size-icon) - var(--icon-size)) / 2 - var(--border-width)); 759 } 760 761 &::part(moz-button-label) { 762 opacity: 1; 763 white-space: nowrap; 764 overflow: hidden; 765 text-overflow: ellipsis; 766 } 767 } 768 } 769 } 770 771 /* Contextual Feature Recommendation popup-notification */ 772 773 #cfr-notification-header { 774 width: 100%; 775 display: block; 776 text-align: center; 777 box-shadow: 0 1px 0 rgba(0, 0, 0, 0.2); 778 } 779 780 #cfr-notification-header-stack { 781 width: 100%; 782 } 783 784 #cfr-notification-header-label { 785 margin: 9px; 786 font-weight: var(--font-weight-semibold); 787 } 788 789 #cfr-notification-header-link { 790 margin: 7px; 791 color: inherit; 792 cursor: default; 793 justify-self: end; 794 } 795 796 #cfr-notification-header-image { 797 width: 19px; 798 height: 19px; 799 padding: 2px; 800 -moz-context-properties: fill, fill-opacity; 801 fill: currentColor; 802 fill-opacity: 0.6; 803 list-style-image: url(chrome://global/skin/icons/help.svg); 804 805 &:hover { 806 background-color: hsla(0, 0%, 70%, 0.2); 807 border-radius: var(--border-radius-xsmall); 808 } 809 } 810 811 #contextual-feature-recommendation-notification { 812 width: 400px; 813 814 .popup-notification-icon { 815 margin-inline-end: 4px; 816 } 817 818 .cfr-doorhanger-large-icon { 819 width: 64px; 820 height: 64px; 821 margin-inline-end: 12px; 822 } 823 824 .cfr-doorhanger-medium-icon { 825 width: 50px; 826 height: 50px; 827 margin-inline-end: 12px; 828 } 829 830 .popup-notification-body-container { 831 width: 100%; 832 padding-bottom: 2px; 833 } 834 835 popupnotificationcontent { 836 margin-top: 0; 837 } 838 839 description { 840 margin-bottom: 0; 841 } 842 843 &[data-notification-bucket="CFR_MILESTONE_MESSAGE"] { 844 &:not([hidden]) { 845 display: flex; 846 flex-direction: row; 847 align-items: center; 848 background: radial-gradient(circle farthest-side at top right, var(--short-notification-gradient), var(--short-notification-background)); 849 width: unset; 850 max-width: 700px; 851 overflow-wrap: break-word; 852 padding: 4px; 853 } 854 855 &:-moz-locale-dir(rtl) { 856 background: radial-gradient(circle farthest-side at top left, var(--short-notification-gradient), var(--short-notification-background)); 857 } 858 859 .popup-notification-body-container, 860 .popup-notification-footer-container, 861 #cfr-notification-header-link { 862 display: none; 863 } 864 865 #cfr-notification-header { 866 box-shadow: none; 867 } 868 869 description { 870 font-weight: normal; 871 margin: unset; 872 margin-inline: 12px; 873 } 874 875 .panel-footer, 876 .popup-notification-header-container { 877 display: inline-flex; 878 } 879 880 .panel-footer { 881 float: inline-end; 882 background-color: transparent; 883 flex-direction: row-reverse; 884 /* Override doorhanger default styles that increase the size of the button */ 885 margin: 0; 886 } 887 888 .popup-notification-primary-button { 889 background-color: rgba(216, 216, 216, 0.2); 890 color: white; 891 border: none; 892 border-radius: var(--border-radius-xsmall); 893 margin: 4px; 894 padding: 3px 12px; 895 flex: 1; 896 min-height: 22px; 897 898 &::after { 899 content: url(chrome://global/skin/icons/arrow-left-12.svg); 900 -moz-context-properties: fill; 901 fill: currentColor; 902 transform: translateY(2px); 903 float: inline-end; 904 } 905 906 &:-moz-locale-dir(ltr)::after { 907 content: url(chrome://global/skin/icons/arrow-right-12.svg); 908 } 909 910 &:hover { 911 background-color: rgba(216, 216, 216, 0.4); 912 } 913 914 &:hover:active { 915 background-color: rgba(216, 216, 216, 0.5); 916 } 917 } 918 919 .popup-notification-secondary-button { 920 margin: 3px; 921 border: none; 922 border-radius: var(--border-radius-xsmall); 923 background-image: url(chrome://global/skin/icons/close.svg); 924 background-color: transparent; 925 background-repeat: no-repeat; 926 background-position: center; 927 background-size: 10px; 928 -moz-context-properties: fill; 929 fill: white; 930 min-height: 22px; 931 width: 22px; 932 padding: 0; 933 align-self: center; 934 flex: none; 935 font-size: 0; 936 937 &:hover { 938 background-color: rgba(216, 216, 216, 0.4); 939 } 940 } 941 942 .popup-notification-header-container { 943 color: white; 944 max-width: unset; 945 } 946 } 947 948 &[data-notification-bucket="CFR_SOCIAL_TRACKING_PROTECTION"] { 949 width: 386px; 950 } 951 952 &[data-notification-category="addon_recommendation"] { 953 .popup-notification-description > b { 954 padding-inline-start: 5px; 955 } 956 957 #cfr-notification-footer-learn-more-link { 958 margin-inline-start: 5px; 959 } 960 961 #cfr-notification-feature-steps, 962 #cfr-notification-header-image { 963 display: none; 964 } 965 966 #cfr-notification-header-label { 967 margin-block-end: 9px; 968 } 969 } 970 971 &[data-notification-category="icon_and_message"] { 972 /* 973 * `icon_and_message` CFR doorhanger with: icon, title and subtitle. 974 * No panel header is shown 975 */ 976 #cfr-notification-header, 977 .popup-notification-footer-container { 978 display: none; 979 } 980 981 .popup-notification-description { 982 font-weight: var(--font-weight-semibold); 983 margin-bottom: 15px; 984 } 985 986 popupnotificationcontent { 987 display: block; /* This forces the subtitle content to wrap */ 988 } 989 } 990 } 991 992 #cfr-notification-footer-text-and-addon-info { 993 display: block; 994 padding: 10px var(--arrowpanel-padding); 995 } 996 997 #cfr-notification-feature-steps { 998 display: flex; 999 flex-direction: column; 1000 margin-top: 10px; 1001 1002 li { 1003 margin-inline-start: 10px; 1004 position: relative; 1005 display: list-item; 1006 1007 &:not(:last-child) { 1008 margin-bottom: 5px; 1009 } 1010 } 1011 } 1012 1013 #cfr-notification-footer-text, 1014 #cfr-notification-footer-users, 1015 #cfr-notification-footer-learn-more-link { 1016 margin: 0; 1017 } 1018 1019 #cfr-notification-footer-addon-info { 1020 align-items: center; 1021 display: flex; 1022 margin-block: 10px 6px; 1023 } 1024 1025 #cfr-notification-footer-filled-stars, 1026 #cfr-notification-footer-empty-stars { 1027 -moz-context-properties: fill, fill-opacity; 1028 background-image: url(chrome://browser/skin/bookmark.svg); 1029 fill: currentColor; 1030 fill-opacity: 0.7; 1031 height: 16px; 1032 } 1033 1034 #cfr-notification-footer-filled-stars:-moz-locale-dir(rtl), 1035 #cfr-notification-footer-empty-stars { 1036 background-position-x: right; 1037 } 1038 1039 #cfr-notification-footer-filled-stars, 1040 #cfr-notification-footer-empty-stars:-moz-locale-dir(rtl) { 1041 background-position-x: left; 1042 } 1043 1044 #cfr-notification-footer-empty-stars[tooltiptext] { 1045 margin-inline-end: 6px; 1046 opacity: 0.3; 1047 } 1048 1049 #cfr-notification-footer-users { 1050 opacity: 0.7; 1051 } 1052 1053 #cfr-notification-footer-spacer { 1054 flex-grow: 1; 1055 } 1056 1057 /* Sharing tabs warning */ 1058 1059 #sharing-tabs-warning-panel { 1060 max-width: 400px; 1061 1062 > hbox[type="window"] > vbox > label > #sharing-warning-screen-panel-header { 1063 display: none; 1064 } 1065 1066 > hbox[type="screen"] > vbox > label > #sharing-warning-window-panel-header { 1067 display: none; 1068 } 1069 } 1070 1071 #sharing-warning-proceed-to-tab { 1072 appearance: none; 1073 border-style: none; 1074 margin: 0; 1075 background-color: rgb(0, 96, 223); 1076 color: rgb(255, 255, 255); 1077 border-radius: var(--border-radius-small); 1078 padding: 10px; 1079 margin-top: 15px; 1080 margin-bottom: 10px; 1081 1082 &:hover { 1083 background-color: rgb(0, 62, 170); 1084 } 1085 } 1086 1087 /* webRTC device sharing selector */ 1088 1089 .webRTC-selectDevice-selector-container { 1090 display: flex; 1091 align-items: center; 1092 1093 > menulist { 1094 flex: 1; 1095 min-width: 0; 1096 } 1097 } 1098 1099 #webRTC-selectSpeaker-richlistbox { 1100 flex: 1; 1101 /* Keep the richlistbox small enough that a large number of devices doesn't 1102 push the main and secondary action buttons off the bottom of the 1103 popupnotification window when limited by screen size. Only enough 1104 richlistitems need to be shown to indicate that there are options 1105 available but give enough space for the common case of only a few 1106 devices. */ 1107 max-height: 600px; 1108 } 1109 1110 #webRTC-selectCamera-label, 1111 #webRTC-selectMicrophone-label { 1112 display: none; 1113 } 1114 1115 .webRTC-selectDevice-icon { 1116 -moz-context-properties: fill; 1117 fill: currentColor; 1118 margin-inline-end: 8px; 1119 /* Setting width explicitly so it's still visible if the device label is very long */ 1120 width: 16px; 1121 } 1122 1123 #webRTC-selectCamera-icon { 1124 list-style-image: url("chrome://browser/skin/notification-icons/camera.svg"); 1125 } 1126 1127 #webRTC-selectMicrophone-icon { 1128 list-style-image: url("chrome://browser/skin/notification-icons/microphone.svg"); 1129 } 1130 1131 #webRTC-selectSpeaker-icon { 1132 list-style-image: url("chrome://browser/skin/notification-icons/speaker.svg"); 1133 } 1134 1135 /* TODO: move these to popupnotification.css */ 1136 1137 popupnotificationcontent { 1138 margin-block-start: 8px; 1139 } 1140 1141 .popup-notification-body menulist { 1142 margin: 0; 1143 } 1144 1145 .popup-notification-checkbox { 1146 margin-block: 12px 0; 1147 } 1148 1149 .popup-notification-body-container { 1150 padding-block-end: 0; 1151 } 1152 1153 .popup-notification-body :is(description, label:not(.learnMore), checkbox, input) { 1154 margin-inline: 0; 1155 } 1156 1157 .popup-notification-description { 1158 font-weight: var(--font-weight-semibold); 1159 margin-top: 0; 1160 1161 > b { 1162 font-weight: inherit; 1163 } 1164 } 1165 1166 /* Password Manager Doorhanger */ 1167 1168 .ac-dropmarker { 1169 appearance: none; 1170 justify-self: end; 1171 margin-inline-end: 8px; 1172 align-self: center; 1173 content: url(chrome://global/skin/icons/arrow-down-12.svg); 1174 -moz-context-properties: fill; 1175 fill: var(--input-color, -moz-DialogText); 1176 } 1177 1178 .ac-has-end-icon { 1179 text-overflow: ellipsis; 1180 overflow: hidden; 1181 } 1182 1183 .popup-notification-body input.ac-has-end-icon { 1184 --input-padding-from-arrow-side: calc(8px + 16px + 8px); /* spacing from the end + arrow element width + extra spacing) */ 1185 padding-inline-end: var(--input-padding-from-arrow-side); 1186 } 1187 1188 /* Avoid overlapping the text on the arrow icon when switching input text direction */ 1189 .popup-notification-body:-moz-locale-dir(rtl) input.ac-has-end-icon:dir(ltr) { 1190 padding-left: var(--input-padding-from-arrow-side); 1191 padding-right: 8px; 1192 } 1193 .popup-notification-body:-moz-locale-dir(ltr) input.ac-has-end-icon:dir(rtl) { 1194 padding-right: var(--input-padding-from-arrow-side); 1195 padding-left: 8px; 1196 } 1197 1198 .password-notification-label { 1199 margin-block-start: 16px; 1200 1201 /** 1202 * There's already a margin-block-start of 8px on popupnotificationcontent, 1203 * so the first label only needs 8px of margin-block-start to match the 1204 * spec. 1205 */ 1206 &:first-of-type { 1207 margin-block-start: 8px; 1208 } 1209 } 1210 1211 #tab-notification-deck { 1212 display: block; 1213 } 1214 1215 /* Relay Integration */ 1216 1217 .relay-integration-header { 1218 display: flex; 1219 align-items: center; 1220 font-size: 2em; 1221 1222 > div:nth-of-type(1) { 1223 width: 32px; 1224 height: 32px; 1225 background-image: url("chrome://browser/content/logos/relay.svg"); 1226 background-repeat: no-repeat; 1227 } 1228 1229 > div:nth-of-type(2) { 1230 direction: ltr; 1231 margin-inline: 8px; 1232 1233 > span:first-of-type { 1234 font-weight: var(--font-weight-bold); 1235 } 1236 1237 > span:last-of-type { 1238 font-weight: normal; 1239 } 1240 } 1241 } 1242 1243 .relay-integration-header-variation { 1244 display: flex; 1245 align-items: center; 1246 font-weight: var(--heading-font-weight); 1247 font-size: 1.5em; 1248 margin: auto; 1249 1250 > p { 1251 margin-block: auto; 1252 } 1253 } 1254 1255 .popup-notification-description[popupid="relay-integration-offer-notification"] > div:first-of-type { 1256 font-weight: normal; 1257 display: grid; 1258 grid-template-columns: auto; 1259 grid-template-rows: auto auto auto auto; 1260 } 1261 1262 #relay-integration-reuse-masks-notification > popupnotificationcontent > div { 1263 font-weight: normal; 1264 display: grid; 1265 grid-template-columns: auto; 1266 grid-template-rows: auto auto auto auto; 1267 } 1268 1269 .reusable-relay-masks { 1270 display: flex; 1271 flex-direction: column; 1272 1273 > button { 1274 padding: 4px; 1275 margin: 4px; 1276 display: flex; 1277 flex-direction: row; 1278 justify-content: space-between; 1279 1280 > span:first-child { 1281 margin-inline-end: 20px; 1282 } 1283 1284 > span:last-child { 1285 opacity: 0.6; 1286 } 1287 } 1288 } 1289 1290 /* History swipe navigation animation */ 1291 1292 #historySwipeAnimationContainer { 1293 overflow: hidden; 1294 pointer-events: none; 1295 } 1296 1297 #historySwipeAnimationPreviousArrow, 1298 #historySwipeAnimationNextArrow { 1299 --swipe-nav-icon-primary-color: AccentColorText; 1300 --swipe-nav-icon-accent-color: AccentColor; 1301 1302 will-change: transform; 1303 1304 @media not (prefers-contrast) { 1305 /* TODO: Should this be in browser-colors to respect system theming on Linux? */ 1306 --swipe-nav-icon-primary-color: light-dark(#0060df, #00ddff); 1307 --swipe-nav-icon-accent-color: light-dark(#ffffff, #000000); 1308 } 1309 1310 > svg { 1311 margin: auto 0; 1312 } 1313 } 1314 1315 .swipe-nav-icon:-moz-locale-dir(rtl), 1316 #historySwipeAnimationNextArrow { 1317 transform: scaleX(-1); 1318 } 1319 1320 .swipe-nav-icon-circle, 1321 .swipe-nav-icon-circle-outline, 1322 .swipe-nav-icon-arrow { 1323 transition: fill 1s; 1324 } 1325 1326 @media not (-moz-platform: macos) { 1327 /* 1328 * Styles for the swipe navigation SVG icon. 1329 * 1330 * `will-navigate` class name is added to the <svg> element when the user's 1331 * swipe gesture reached to the point where history navigation will be 1332 * triggered. It's used for triggering three animations, an arrow color change, 1333 * a circle color change and a glowing effect outer the circle. 1334 */ 1335 .swipe-nav-icon-circle { 1336 fill: var(--swipe-nav-icon-accent-color); 1337 stroke: var(--swipe-nav-icon-primary-color); 1338 1339 .will-navigate > & { 1340 fill: var(--swipe-nav-icon-primary-color); 1341 } 1342 } 1343 1344 .swipe-nav-icon-circle-outline { 1345 fill: var(--swipe-nav-icon-primary-color); 1346 stroke: var(--swipe-nav-icon-primary-color); 1347 transition: opacity 1s; 1348 will-change: opacity; /* a workaround for bug 1804189 */ 1349 opacity: 0; 1350 1351 .will-navigate > & { 1352 transition-delay: 0.2s; 1353 opacity: 0.2; 1354 } 1355 } 1356 1357 .swipe-nav-icon-arrow { 1358 fill: var(--swipe-nav-icon-primary-color); 1359 1360 .will-navigate > & { 1361 fill: var(--swipe-nav-icon-accent-color); 1362 stroke: var(--swipe-nav-icon-accent-color); 1363 } 1364 } 1365 } 1366 1367 @media (-moz-platform: macos) { 1368 /* 1369 * Styles for the swipe navigation SVG icon. 1370 * 1371 * `will-navigate` class name is added to the <svg> element when the user's 1372 * swipe gesture reached to the point where history navigation will be 1373 * triggered. 1374 */ 1375 .swipe-nav-icon-circle-outline, 1376 .swipe-nav-icon-arrow { 1377 fill: var(--swipe-nav-icon-primary-color); 1378 1379 .will-navigate > & { 1380 fill: var(--swipe-nav-icon-accent-color); 1381 } 1382 } 1383 1384 .swipe-nav-icon-circle { 1385 fill: var(--swipe-nav-icon-accent-color); 1386 1387 .will-navigate > & { 1388 fill: var(--swipe-nav-icon-primary-color); 1389 } 1390 } 1391 } 1392 1393 /* Picture-in-Picture panel */ 1394 1395 #PictureInPicturePanel { 1396 width: var(--menu-panel-width-wide); 1397 font: caption; 1398 } 1399 1400 #PictureInPicturePanelBody { 1401 gap: 8px; 1402 padding: 8px 16px; 1403 } 1404 1405 #PictureInPicturePanelFooter { 1406 margin: 8px 16px 16px; 1407 } 1408 1409 /* AI Window Toggle Button */ 1410 1411 #ai-window-toggle { 1412 list-style-image: url("chrome://branding/content/icon32.png"); 1413 padding-inline-end: var(--space-small); 1414 border-radius: var(--border-radius-medium); 1415 1416 :root[ai-window] & { 1417 list-style-image: url("chrome://browser/skin/ai-window.svg"); 1418 } 1419 1420 > .toolbarbutton-icon { 1421 padding: 8px; 1422 } 1423 } 1424 1425 #ai-window-switch-classic, 1426 #ai-window-switch-ai { 1427 &:hover { 1428 background-color: var(--button-background-color-ghost-hover); 1429 } 1430 1431 .toolbarbutton-icon { 1432 margin-inline-end: var(--space-small); 1433 width: var(--icon-size-medium); 1434 height: var(--icon-size-medium); 1435 } 1436 1437 &::after { 1438 content: url("chrome://global/skin/icons/check.svg"); 1439 -moz-context-properties: fill; 1440 fill: currentColor; 1441 width: 16px; 1442 height: 16px; 1443 } 1444 } 1445 1446 #ai-window-switch-classic { 1447 list-style-image: url("chrome://branding/content/icon32.png"); 1448 1449 :root[ai-window] &::after { 1450 display: none; 1451 } 1452 } 1453 1454 #ai-window-switch-ai { 1455 list-style-image: url("chrome://browser/skin/ai-window.svg"); 1456 1457 :root:not([ai-window]) &::after { 1458 display: none; 1459 } 1460 } 1461 1462 /* Bookmarks roots menu-items */ 1463 1464 #BMB_bookmarksToolbar, 1465 #bookmarksToolbarFolderMenu { 1466 --menuitem-icon: url("chrome://browser/skin/places/bookmarksToolbar.svg"); 1467 }