Merge mozilla-central to autoland. a=merge CLOSED TREE
[gecko.git] / browser / base / content / browser.css
blob67831295c7a3730c72077c0c9089f8744d070723
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/. */
5 @namespace html url("http://www.w3.org/1999/xhtml");
7 :root,
8 body {
9 margin: 0;
10 padding: 0;
11 height: 100%;
12 width: 100%;
13 overflow: clip;
16 :root {
17 text-rendering: optimizeLegibility;
18 min-height: 95px;
19 min-width: 95px;
21 /* z-indices that fight on the browser stack */
22 --browser-stack-z-index-devtools-splitter: 1;
23 --browser-stack-z-index-dialog-stack: 2;
24 --browser-stack-z-index-rdm-toolbar: 3;
27 :root:-moz-locale-dir(rtl) {
28 direction: rtl;
31 :root:not([chromehidden~="toolbar"]) {
32 min-width: 450px;
33 min-height: 120px;
36 #appcontent,
37 #browser,
38 #tabbrowser-tabbox,
39 #tabbrowser-tabpanels,
40 .browserSidebarContainer {
41 /* Allow devtools with large specified width/height to shrink */
42 min-width: 0;
43 min-height: 0;
46 /* We set large flex on both containers to allow the devtools toolbox to
47 * set a flex value itself. We don't want the toolbox to actually take up free
48 * space, but we do want it to collapse when the window shrinks, and with
49 * flex: 0 it can't.
51 * When the toolbox is on the bottom it's a sibling of browserStack, and when
52 * it's on the side it's a sibling of browserContainer.
54 .browserContainer {
55 flex: 10000 10000;
56 /* To contain the status panel */
57 position: relative;
59 /* .browserContainer only contains the devtools when docked horizontally */
60 min-height: 0;
63 .browserStack {
64 flex: 10000 10000;
65 /* Prevent shrinking the page content to 0 height and width */
66 min-height: 25px;
67 min-width: 25px;
70 body {
71 display: flex;
72 flex-direction: column;
73 flex: 1;
76 #titlebar {
77 -moz-window-dragging: drag;
80 #toolbar-menubar[autohide="true"] {
81 overflow: hidden;
84 #toolbar-menubar[autohide="true"][inactive="true"]:not([customizing="true"]) {
85 min-height: 0 !important;
86 height: 0 !important;
87 padding: 0 !important;
88 appearance: none !important;
91 #toolbar-menubar:not([autohide]) {
92 visibility: collapse;
95 panelmultiview {
96 align-items: flex-start;
97 min-width: 0;
98 min-height: 0;
101 panelmultiview[transitioning] {
102 pointer-events: none;
105 panelview {
106 flex-direction: column;
109 panelview:not([visible]) {
110 visibility: collapse;
113 .panel-viewcontainer {
114 overflow: hidden;
115 flex-shrink: 0;
116 min-width: 0;
117 min-height: 0;
118 max-height: 100%;
121 .panel-viewcontainer[panelopen] {
122 transition-property: height;
123 transition-timing-function: var(--animation-easing-function);
124 transition-duration: var(--panelui-subview-transition-duration);
125 will-change: height;
128 .panel-viewcontainer.offscreen {
129 display: block;
132 .panel-viewstack {
133 overflow: visible;
134 transition: height var(--panelui-subview-transition-duration);
137 /* stylelint-disable-next-line media-query-no-invalid */
138 @media not (-moz-bool-pref: "browser.tabs.tabmanager.enabled") {
139 #tabbrowser-tabs:not([overflow], [hashiddentabs]) ~ #alltabs-button {
140 display: none;
142 #tabbrowser-tabs:not([overflow])[using-closing-tabs-spacer] ~ #alltabs-button {
143 /* temporary space to keep a tab's close button under the cursor */
144 display: flex;
145 visibility: hidden;
149 #tabbrowser-tabs[hasadjacentnewtabbutton]:not([overflow]) ~ #new-tab-button,
150 #tabbrowser-tabs[overflow] > #tabbrowser-arrowscrollbox > #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button,
151 #tabbrowser-tabs:not([hasadjacentnewtabbutton]) > #tabbrowser-arrowscrollbox > #tabbrowser-arrowscrollbox-periphery > #tabs-newtab-button,
152 #TabsToolbar[customizing="true"] #tabs-newtab-button {
153 display: none;
156 .tabbrowser-tab:not([pinned]) {
157 flex: 100 100;
158 max-width: 225px;
159 min-width: var(--tab-min-width);
160 transition: min-width 100ms ease-out,
161 max-width 100ms ease-out;
164 :root[uidensity=touch] .tabbrowser-tab:not([pinned]) {
165 /* Touch mode needs additional space for the close button. */
166 min-width: calc(var(--tab-min-width) + 10px);
169 .tabbrowser-tab:not([pinned], [fadein]) {
170 max-width: 0.1px;
171 min-width: 0.1px;
172 visibility: hidden;
175 .tab-icon-pending:not([fadein]),
176 .tab-icon-image:not([fadein]),
177 .tab-close-button:not([fadein]),
178 .tabbrowser-tab:not([fadein])::after,
179 .tab-background:not([fadein]) {
180 visibility: hidden;
183 .tab-label:not([fadein]),
184 .tab-throbber:not([fadein]) {
185 display: none;
188 #tabbrowser-tabs[positionpinnedtabs] > #tabbrowser-arrowscrollbox > .tabbrowser-tab[pinned] {
189 position: absolute !important;
190 display: block;
193 #tabbrowser-tabs[movingtab] > #tabbrowser-arrowscrollbox > .tabbrowser-tab[selected],
194 #tabbrowser-tabs[movingtab] > #tabbrowser-arrowscrollbox > .tabbrowser-tab[multiselected] {
195 position: relative;
196 z-index: 2;
197 pointer-events: none; /* avoid blocking dragover events on scroll buttons */
200 @media (prefers-reduced-motion: no-preference) {
201 #tabbrowser-tabs[movingtab] > #tabbrowser-arrowscrollbox > .tabbrowser-tab[fadein]:not([selected]):not([multiselected]),
202 .tabbrowser-tab[tab-grouping],
203 .tabbrowser-tab[tabdrop-samewindow] {
204 transition: transform 200ms var(--animation-easing-function);
208 .tabbrowser-tab[tab-grouping][multiselected]:not([selected]) {
209 z-index: 2;
212 /* Make it easier to drag tabs by expanding the drag area downwards. */
213 #tabbrowser-tabs[movingtab] {
214 padding-bottom: 15px;
215 margin-bottom: -15px;
218 #navigator-toolbox[movingtab] > #nav-bar {
219 pointer-events: none;
222 #nav-bar-customization-target {
223 /* Don't grow if potentially-user-sized elements (like the searchbar or the
224 * bookmarks toolbar item list) are too wide. This forces them to flex to the
225 * available space as much as possible, see bug 1795260. */
226 min-width: 0;
229 /* Allow dropping a tab on buttons with associated drop actions. */
230 #navigator-toolbox[movingtab] > #nav-bar > #nav-bar-customization-target > #personal-bookmarks,
231 #navigator-toolbox[movingtab] > #nav-bar > #nav-bar-customization-target > #home-button,
232 #navigator-toolbox[movingtab] > #nav-bar > #nav-bar-customization-target > #downloads-button,
233 #navigator-toolbox[movingtab] > #nav-bar > #nav-bar-customization-target > #bookmarks-menu-button {
234 pointer-events: auto;
237 /* The address bar needs to be able to render outside of the toolbar, but as
238 * long as it's within the toolbar's bounds we can clip the toolbar so that the
239 * rendering pipeline doesn't reserve an enormous texture for it. */
240 #nav-bar:not([urlbar-exceeds-toolbar-bounds]),
241 /* When customizing, overflowable toolbars move automatically moved items back
242 * from the overflow menu, but we still don't want to render them outside of
243 * the customization target. */
244 toolbar[overflowable][customizing] > .customization-target {
245 overflow: clip;
248 toolbar:not([overflowing]) > .overflow-button,
249 toolbar[customizing] > .overflow-button {
250 display: none;
253 toolbar[customizing] #ion-button,
254 toolbar[customizing] #whats-new-menu-button {
255 display: none;
258 :root:not([chromehidden~="toolbar"]) #nav-bar[nonemptyoverflow] > .overflow-button,
259 #nav-bar[customizing] > .overflow-button {
260 display: flex;
263 /* The ids are ugly, but this should be reasonably performant, and
264 * using a tagname as the last item would be less so.
266 #widget-overflow-list:empty + #widget-overflow-fixed-separator,
267 #widget-overflow:not([hasfixeditems]) #widget-overflow-fixed-separator {
268 display: none;
271 /* Hide the TabsToolbar titlebar controls if the menubar is permanently shown.
272 * (That is, if the menu bar doesn't autohide, and we're not in a fullscreen or
273 * popup window.) */
274 :root:not([chromehidden~="menubar"], [inFullscreen]) #toolbar-menubar[autohide="false"] + #TabsToolbar > :is(.titlebar-buttonbox-container, .titlebar-spacer) {
275 display: none;
278 :root:not([chromemargin], [inFullscreen]) .titlebar-buttonbox-container,
279 :root[inFullscreen] .titlebar-spacer,
280 :root:not([tabsintitlebar]) .titlebar-spacer {
281 display: none;
284 @media (-moz-platform: windows) {
285 :root:not([sizemode=normal]) .titlebar-spacer[type="pre-tabs"] {
286 display: none;
290 @media (-moz-platform: linux) {
291 @media (-moz-gtk-csd-reversed-placement: 0) {
292 :root:not([sizemode=normal]) .titlebar-spacer[type="pre-tabs"],
293 :root[gtktiledwindow=true] .titlebar-spacer[type="pre-tabs"] {
294 display: none;
297 @media (-moz-gtk-csd-reversed-placement) {
298 :root:not([sizemode=normal]) .titlebar-spacer[type="post-tabs"],
299 :root[gtktiledwindow=true] .titlebar-spacer[type="post-tabs"] {
300 display: none;
305 :root:not([sizemode=maximized], [sizemode=fullscreen]) .titlebar-restore,
306 :root:is([sizemode=maximized], [sizemode=fullscreen]) .titlebar-max {
307 display: none;
310 #toolbar-menubar[autohide="true"]:not([inactive]) + #TabsToolbar > .titlebar-buttonbox-container {
311 visibility: hidden;
314 :root[tabsintitlebar] .titlebar-buttonbox {
315 position: relative;
318 :root:not([tabsintitlebar], [sizemode=fullscreen]) .titlebar-buttonbox {
319 display: none;
322 .titlebar-buttonbox {
323 appearance: auto;
324 -moz-default-appearance: -moz-window-button-box;
325 position: relative;
328 #personal-toolbar-empty-description {
329 -moz-window-dragging: no-drag;
332 #personal-bookmarks {
333 -moz-window-dragging: inherit;
336 toolbarpaletteitem {
337 -moz-window-dragging: no-drag;
338 justify-content: flex-start;
341 .titlebar-buttonbox-container {
342 order: 1000;
345 @media (-moz-platform: macos) {
346 @media not (-moz-mac-rtl) {
347 .titlebar-buttonbox-container:-moz-locale-dir(ltr) {
348 order: -1;
352 @media (-moz-mac-rtl) {
353 .titlebar-buttonbox-container:-moz-locale-dir(rtl) {
354 order: -1;
359 :root[inDOMFullscreen] #navigator-toolbox,
360 :root[inDOMFullscreen] #fullscr-toggler,
361 :root[inDOMFullscreen] #sidebar-box,
362 :root[inDOMFullscreen] #sidebar-splitter,
363 :root[inFullscreen]:not([macOSNativeFullscreen]) toolbar:not([fullscreentoolbar=true]),
364 :root[inFullscreen] .global-notificationbox {
365 visibility: collapse;
368 #navigator-toolbox[fullscreenShouldAnimate] {
369 transition: 0.8s margin-top ease-out;
372 /* Rules to help integrate WebExtension buttons */
374 .webextension-browser-action > .toolbarbutton-badge-stack > .toolbarbutton-icon {
375 height: 16px;
376 width: 16px;
379 .webextension-browser-action {
380 list-style-image: var(--webextension-toolbar-image, inherit);
382 toolbar[brighttext] & {
383 list-style-image: var(--webextension-toolbar-image-light, inherit);
385 :root[lwtheme] toolbar:not([brighttext]) & {
386 list-style-image: var(--webextension-toolbar-image-dark, inherit);
388 toolbaritem:is([overflowedItem="true"], [cui-areatype="panel"]) > & {
389 list-style-image: var(--webextension-menupanel-image, inherit);
390 /* TODO: This feels a bit odd, why do we have three images? It feels we
391 * should probably have only two (light/dark), and choose based on
392 * prefers-color-scheme + lwt-popup */
393 :root[lwt-popup="dark"] & {
394 list-style-image: var(--webextension-menupanel-image-light, inherit);
396 :root[lwt-popup="light"] & {
397 list-style-image: var(--webextension-menupanel-image-dark, inherit);
402 .webextension-menuitem {
403 list-style-image: var(--webextension-menuitem-image, inherit) !important;
406 toolbarpaletteitem[removable="false"] {
407 opacity: 0.5;
410 @media not (-moz-platform: macos) {
411 toolbarpaletteitem:is([place="palette"], [place="panel"], [place="toolbar"]) {
412 -moz-user-focus: normal;
416 #bookmarks-toolbar-placeholder,
417 #bookmarks-toolbar-button,
418 toolbarpaletteitem > #personal-bookmarks > #PlacesToolbar,
419 #personal-bookmarks:is([overflowedItem=true], [cui-areatype="panel"]) > #PlacesToolbar {
420 display: none;
423 toolbarpaletteitem[place="toolbar"] > #personal-bookmarks > #bookmarks-toolbar-placeholder,
424 toolbarpaletteitem[place="palette"] > #personal-bookmarks > #bookmarks-toolbar-button,
425 #personal-bookmarks:is([overflowedItem=true], [cui-areatype="panel"]) > #bookmarks-toolbar-button {
426 display: flex;
429 #personal-bookmarks {
430 position: relative;
433 #PlacesToolbarDropIndicatorHolder {
434 display: block;
435 position: absolute;
438 #allTabsMenu-dropIndicatorHolder {
439 display: block;
440 position: relative;
443 #allTabsMenu-dropIndicator {
444 background: url(chrome://browser/skin/tabbrowser/tab-drag-indicator.svg) no-repeat center;
445 display: block;
446 position: absolute;
447 transform: rotate(-90deg);
448 width: 12px;
449 height: 29px;
450 inset-inline-start: 8px;
451 top: 0;
452 pointer-events: none;
455 #allTabsMenu-dropIndicator:-moz-locale-dir(rtl) {
456 transform: rotate(90deg);
459 #nav-bar-customization-target > #personal-bookmarks,
460 toolbar:not(#TabsToolbar) > #wrapper-personal-bookmarks,
461 toolbar:not(#TabsToolbar) > #personal-bookmarks {
462 flex: 1 auto;
465 #reload-button:not([displaystop]) + #stop-button,
466 #reload-button[displaystop] {
467 display: none;
470 /* The reload-button is only disabled temporarily when it becomes visible
471 to prevent users from accidentally clicking it. We don't however need
472 to show this disabled state, as the flicker that it generates is short
473 enough to be visible but not long enough to explain anything to users. */
474 #reload-button[disabled]:not(:-moz-window-inactive) > .toolbarbutton-icon {
475 opacity: 1 !important;
478 /* Ensure stop-button and reload-button are displayed correctly when in the overflow menu */
479 .widget-overflow-list > #stop-reload-button > .toolbarbutton-1 {
480 flex: 1;
483 @media (-moz-platform: macos) {
484 :root[inFullscreen="true"] {
485 padding-top: 0; /* override drawintitlebar="true" */
489 /* Hide menu elements intended for keyboard access support */
490 #main-menubar[openedwithkey=false] .show-only-for-keyboard {
491 display: none;
494 /* ::::: location bar & search bar ::::: */
496 #urlbar,
497 #searchbar {
498 /* Setting a min-width to let the location & search bars maintain a constant
499 * width in case they haven't been resized manually. (bug 965772) */
500 min-width: 1px;
503 /* Align URLs to the right in RTL mode. */
504 #urlbar-input:-moz-locale-dir(rtl) {
505 text-align: right !important;
508 /* Make sure that the location bar's alignment changes according
509 to the input box direction if the user switches the text direction using
510 cmd_switchTextDirection (which applies a dir attribute to the <input>). */
511 #urlbar-input[dir=ltr]:-moz-locale-dir(rtl) {
512 text-align: left !important;
515 #urlbar-input[dir=rtl]:-moz-locale-dir(ltr) {
516 text-align: right !important;
520 * Display visual cue that browser is under remote control.
521 * This is to help users visually distinguish a user agent session that
522 * is under remote control from those used for normal browsing sessions.
524 * Attribute is controlled by browser.js:/gRemoteControl.
526 :root[remotecontrol] #remote-control-box {
527 visibility: visible;
528 padding-inline: var(--urlbar-icon-padding);
531 :root[remotecontrol] #remote-control-icon {
532 list-style-image: url(chrome://browser/content/static-robot.png);
533 width: 16px;
534 height: 16px;
537 :root[remotecontrol] #urlbar-background {
538 background-image: repeating-linear-gradient(
539 -45deg,
540 rgba(255, 60, 60, 0.25) 0 25px,
541 rgba(175, 0, 0, 0.25) 25px 50px
544 background-attachment: fixed;
545 /* Override the usual breakout animation so the gradient doesn't shift around
546 when the panel opens. */
547 animation: none !important;
550 /* Show the url scheme in a static box when overflowing to the left */
551 .urlbar-input-box {
552 position: relative;
553 direction: ltr;
556 #urlbar-scheme {
557 position: absolute;
558 height: 100%;
559 visibility: hidden;
560 direction: ltr;
561 pointer-events: none;
564 #urlbar-input {
565 mask-repeat: no-repeat;
566 unicode-bidi: plaintext;
567 text-align: match-parent;
570 #urlbar:not([focused])[domaindir="ltr"]> #urlbar-input-container > .urlbar-input-box > #urlbar-input {
571 direction: ltr;
572 unicode-bidi: embed;
575 /* The following rules apply overflow masks to the unfocused urlbar
576 This mask may be overriden when a Contextual Feature Recommendation is shown,
577 see browser/themes/shared/urlbar-searchbar.inc.css for details */
579 #urlbar:not([focused])[textoverflow="both"] > #urlbar-input-container > .urlbar-input-box > #urlbar-input {
580 mask-image: linear-gradient(to right, transparent, black 3ch, black calc(100% - 3ch), transparent);
582 #urlbar:not([focused])[textoverflow="right"] > #urlbar-input-container > .urlbar-input-box > #urlbar-input {
583 mask-image: linear-gradient(to left, transparent, black 3ch);
585 #urlbar:not([focused])[textoverflow="left"] > #urlbar-input-container > .urlbar-input-box > #urlbar-input {
586 mask-image: linear-gradient(to right, transparent, black 3ch);
589 /* The protocol is visible if there is an RTL domain and we overflow to the left.
590 Uses the required-valid trick to check if it contains a value */
591 #urlbar:not([focused])[textoverflow="left"][domaindir="rtl"] > #urlbar-input-container > .urlbar-input-box > #urlbar-scheme:valid {
592 visibility: visible;
594 #urlbar:not([focused])[textoverflow="left"][domaindir="rtl"] > #urlbar-input-container > .urlbar-input-box > #urlbar-input {
595 mask-image: linear-gradient(to right, transparent var(--urlbar-scheme-size), black calc(var(--urlbar-scheme-size) + 3ch));
598 /* Apply crisp rendering for favicons at exactly 2dppx resolution */
599 @media (resolution: 2dppx) {
600 .searchbar-engine-image {
601 image-rendering: -moz-crisp-edges;
605 #urlbar[actiontype="switchtab"][action-override] > #urlbar-input-container > #urlbar-label-box,
606 #urlbar:not([actiontype="switchtab"], [actiontype="extension"], [searchmode]) > #urlbar-input-container > #urlbar-label-box,
607 #urlbar:not([actiontype="switchtab"]) > #urlbar-input-container > #urlbar-label-box > #urlbar-label-switchtab,
608 #urlbar:not([actiontype="extension"]) > #urlbar-input-container > #urlbar-label-box > #urlbar-label-extension,
609 #urlbar[searchmode][breakout-extend] > #urlbar-input-container > #urlbar-label-box,
610 #urlbar:not([searchmode]) > #urlbar-input-container > #urlbar-label-box > #urlbar-label-search-mode,
611 #urlbar[breakout-extend] > #urlbar-input-container > #urlbar-label-box > #urlbar-label-search-mode {
612 display: none;
615 #PopupAutoComplete > richlistbox > richlistitem[originaltype="loginsFooter"] {
616 justify-content: center;
617 color: FieldText;
618 min-height: 2.6666em;
619 border-top: 1px solid rgba(38,38,38,.15);
620 background-color: hsla(0,0%,80%,.35); /* match arrowpanel-dimmed */;
623 #PopupAutoComplete > richlistbox > richlistitem[originaltype="loginsFooter"]:hover,
624 #PopupAutoComplete > richlistbox > richlistitem[originaltype="loginsFooter"][selected] {
625 background-color: hsla(0,0%,80%,.5); /* match arrowpanel-dimmed-further */
628 /* Define the minimum width based on the style of result rows.
629 The order of the min-width rules below must be in increasing order. */
630 #PopupAutoComplete:is([resultstyles~="loginsFooter"], [resultstyles~="insecureWarning"])::part(content) {
631 min-width: 17em;
634 #PopupAutoComplete:is([resultstyles~="importableLogins"], [resultstyles~="generatedPassword"])::part(content) {
635 min-width: 22em;
638 #PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] {
639 height: auto;
642 #PopupAutoComplete > richlistbox > richlistitem[originaltype="loginWithOrigin"] > .ac-site-icon,
643 #PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] > .ac-site-icon {
644 margin-inline-start: 0;
645 display: initial;
648 #PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] > .ac-title > .ac-text-overflow-container > .ac-title-text {
649 text-overflow: initial;
650 white-space: initial;
653 #PopupAutoComplete > richlistbox > richlistitem[originaltype="insecureWarning"] > .ac-title > label {
654 margin-inline-start: 0;
657 #urlbar-input-container[pageproxystate=invalid] > #page-action-buttons > .urlbar-page-action,
658 #identity-box.chromeUI ~ #page-action-buttons > .urlbar-page-action:not(#star-button-box),
659 #urlbar[usertyping] > #urlbar-input-container > #page-action-buttons > #urlbar-zoom-button,
660 #urlbar:not([usertyping]) > #urlbar-input-container > #urlbar-go-button,
661 #urlbar:not([focused]) > #urlbar-input-container > #urlbar-go-button {
662 display: none;
665 #nav-bar:not([keyNav=true]) #identity-box,
666 #nav-bar:not([keyNav=true]) #tracking-protection-icon-container {
667 -moz-user-focus: normal;
670 /* We leave 310px plus whatever space the download and unified extensions
671 * buttons will need when they *both* appear. Normally, for each button, this
672 * should be 16px for the icon, plus 2 * 2px padding plus the
673 * toolbarbutton-inner-padding. We're adding 4px to ensure things like rounding
674 * on hidpi don't accidentally result in the buttons going into overflow.
676 #urlbar-container {
677 width: calc(310px + 2 * (24px + 2 * var(--toolbarbutton-inner-padding)));
680 /* When the download button OR the unified extensions button is shown, we leave
681 * 310px plus the space needed for a single button as described above. */
682 #nav-bar:is([downloadsbuttonshown], [unifiedextensionsbuttonshown]) #urlbar-container {
683 width: calc(310px + 24px + 2 * var(--toolbarbutton-inner-padding));
686 /* When both the download and unified extensions buttons are visible, we use
687 * the base min-width value. */
688 #nav-bar[downloadsbuttonshown][unifiedextensionsbuttonshown] #urlbar-container {
689 width: 310px;
692 /* Customize mode is difficult to use at moderate window width if the Urlbar
693 remains 310px wide. */
694 :root[customizing] #urlbar-container {
695 width: 280px;
698 #identity-icon-box {
699 max-width: calc(30px + 13em);
702 @media (max-width: 770px) {
703 #urlbar-container {
704 width: calc(240px + 2 * (24px + 2 * var(--toolbarbutton-inner-padding)));
706 #nav-bar:is([downloadsbuttonshown], [unifiedextensionsbuttonshown]) #urlbar-container {
707 width: calc(240px + 24px + 2 * var(--toolbarbutton-inner-padding));
709 #nav-bar[downloadsbuttonshown][unifiedextensionsbuttonshown] #urlbar-container {
710 width: 240px;
712 :root[customizing] #urlbar-container {
713 width: 245px;
715 #identity-icon-box {
716 max-width: 80px;
718 /* Contenxtual identity labels are user-customizable and can be very long,
719 so we only show the colored icon when the window gets small. */
720 #userContext-label {
721 display: none;
725 /* The page actions menu is hidden by default, it is only shown in small
726 windows as the overflow target of multiple page action buttons */
727 #pageActionButton {
728 visibility: collapse;
731 /* 680px is just below half of popular 1366px wide screens, so when putting two
732 browser windows next to each other on such a screen, they'll be above this
733 threshold. */
734 @media (max-width: 680px) {
735 /* Page action buttons are duplicated in the page action menu so we can
736 safely hide them in small windows. */
737 #pageActionSeparator,
738 #pageActionButton[multiple-children] ~ .urlbar-page-action {
739 display: none;
741 #pageActionButton[multiple-children] {
742 visibility: visible;
745 @media (max-width: 550px) {
746 #urlbar-container {
747 width: calc(176px + 2 * (24px + 2 * var(--toolbarbutton-inner-padding)));
749 #nav-bar[downloadsbuttonshown] #urlbar-container,
750 #nav-bar[unifiedextensionsbuttonshown] #urlbar-container {
751 width: calc(176px + 24px + 2 * var(--toolbarbutton-inner-padding));
753 #nav-bar[downloadsbuttonshown][unifiedextensionsbuttonshown] #urlbar-container {
754 width: 176px;
756 #identity-icon-box {
757 max-width: 70px;
759 #urlbar-zoom-button {
760 display: none;
764 /* Flexible spacer sizing (gets overridden in the navbar) */
765 toolbarpaletteitem[place=toolbar][id^=wrapper-customizableui-special-spring],
766 toolbarspring {
767 flex: 1;
768 min-width: 28px;
769 max-width: 112px;
772 #nav-bar toolbarpaletteitem[id^=wrapper-customizableui-special-spring],
773 #nav-bar toolbarspring {
774 flex: 80 80;
775 /* We shrink the flexible spacers, but not to nothing so they can be
776 * manipulated in customize mode; the next rule shrinks them further
777 * outside customize mode. */
778 min-width: 10px;
781 #nav-bar:not([customizing]) toolbarspring {
782 min-width: 1px;
785 #widget-overflow-list > toolbarspring {
786 display: none;
789 /* ::::: Unified Back-/Forward Button ::::: */
790 .unified-nav-current {
791 font-weight: bold;
794 .bookmark-item > label {
795 /* ensure we use the direction of the bookmarks label instead of the
796 * browser locale */
797 unicode-bidi: plaintext;
798 /* Preserve whitespace in bookmark names */
799 white-space: pre;
802 /* Apply crisp rendering for favicons at exactly 2dppx resolution */
803 @media (resolution: 2dppx) {
804 .menuitem-with-favicon > .menu-iconic-left > .menu-iconic-icon {
805 image-rendering: -moz-crisp-edges;
808 .bookmark-item > .toolbarbutton-icon,
809 .bookmark-item > .menu-iconic-left > .menu-iconic-icon {
810 image-rendering: -moz-crisp-edges;
814 menupopup[emptyplacesresult="true"] > .hide-if-empty-places-result {
815 display: none;
818 /* Hide extension toolbars that neglected to set the proper class */
819 :root[chromehidden~="location"][chromehidden~="toolbar"] toolbar:not(.chromeclass-menubar) {
820 display: none;
823 #navigator-toolbox ,
824 #mainPopupSet {
825 min-width: 1px;
828 /* History Swipe Animation */
830 #historySwipeAnimationContainer {
831 overflow: hidden;
832 pointer-events: none;
835 /* Full Screen UI */
837 #fullscr-toggler {
838 top: 0;
839 left: 0;
840 right: 0;
841 height: 1px;
842 position: fixed;
843 z-index: 2147483647;
846 #fullscreen-and-pointerlock-wrapper {
847 position: fixed;
848 z-index: 2147483647 !important;
849 width: 100%;
850 height: 100%;
851 top: 0;
852 pointer-events: none;
855 .pointerlockfswarning {
856 position: fixed;
857 visibility: visible;
858 transition: transform 300ms ease-in;
859 /* To center the warning box horizontally,
860 we use left: 50% with translateX(-50%). */
861 top: 0; left: 50%;
862 transform: translate(-50%, -100%);
863 box-sizing: border-box;
864 width: max-content;
865 max-width: 95%;
866 pointer-events: none;
868 .pointerlockfswarning:not([hidden]) {
869 display: flex;
870 will-change: transform;
872 .pointerlockfswarning[onscreen] {
873 transform: translate(-50%, 50px);
875 .pointerlockfswarning[ontop] {
876 /* Use -10px to hide the border and border-radius on the top */
877 transform: translate(-50%, -10px);
879 :root[macOSNativeFullscreen] .pointerlockfswarning[ontop] {
880 transform: translate(-50%, 80px);
883 .pointerlockfswarning-domain-text,
884 .pointerlockfswarning-generic-text {
885 word-wrap: break-word;
886 /* We must specify a min-width, otherwise word-wrap:break-word doesn't work. Bug 630864. */
887 min-width: 1px
889 .pointerlockfswarning-domain-text:not([hidden]) + .pointerlockfswarning-generic-text {
890 display: none;
893 #fullscreen-exit-button {
894 pointer-events: auto;
897 /* notification anchors should only be visible when their associated
898 notifications are */
899 #nav-bar:not([keyNav=true]) .notification-anchor-icon {
900 -moz-user-focus: normal;
903 #blocked-permissions-container > .blocked-permission-icon:not([showing]),
904 .notification-anchor-icon:not([showing]) {
905 display: none;
908 #invalid-form-popup > description {
909 max-width: 280px;
912 .popup-anchor {
913 /* should occupy space but not be visible */
914 opacity: 0;
915 pointer-events: none;
916 position: absolute;
919 browser[tabDialogShowing] {
920 -moz-user-focus: none !important;
923 /*** Visibility of downloads indicator controls ***/
925 /* Hide the default icon, show the anchor instead. */
926 #downloads-button > .toolbarbutton-badge-stack > image.toolbarbutton-icon {
927 display: none;
930 toolbarpaletteitem[place="palette"] > #downloads-button > .toolbarbutton-badge-stack > image.toolbarbutton-icon {
931 display: flex;
934 toolbarpaletteitem[place="palette"] > #downloads-button > .toolbarbutton-badge-stack > #downloads-indicator-anchor {
935 display: none;
938 /* Apply crisp rendering for favicons at exactly 2dppx resolution */
939 @media (resolution: 2dppx) {
940 .PanelUI-remotetabs-clientcontainer > toolbarbutton > .toolbarbutton-icon,
941 #PanelUI-recentlyClosedWindows > toolbarbutton > .toolbarbutton-icon,
942 #PanelUI-recentlyClosedTabs > toolbarbutton > .toolbarbutton-icon,
943 #PanelUI-historyItems > toolbarbutton > .toolbarbutton-icon {
944 image-rendering: -moz-crisp-edges;
948 #customization-container {
949 flex-direction: row;
950 flex-direction: column;
951 min-height: 0;
954 #customization-container:not([hidden]) {
955 /* In a separate rule to avoid 'display:flex' causing the node to be
956 * displayed while the container is still hidden. */
957 display: flex;
960 #customization-content-container {
961 display: flex;
962 flex: 1; /* Grow so there isn't empty space below the footer */
963 min-height: 0; /* Allow this to shrink so the footer doesn't get pushed out. */
966 #customization-panelHolder {
967 padding-top: 10px;
968 padding-bottom: 10px;
971 #customization-panelHolder > #widget-overflow-fixed-list {
972 flex: 1; /* Grow within the available space, and allow ourselves to shrink */
973 display: flex;
974 flex-direction: column;
975 overflow-y: auto;
976 overflow-x: hidden;
979 #customization-panelWrapper,
980 #customization-panelWrapper > .panel-arrowcontent,
981 #customization-panelHolder {
982 flex-direction: column;
983 display: flex;
984 flex-shrink: 1;
985 min-height: calc(174px + 9em);
988 #customization-panelWrapper {
989 flex: 1;
990 align-items: end; /* align to the end on the cross-axis (affects arrow) */
993 #customization-panel-container {
994 overflow-y: auto;
995 display: flex;
996 flex-direction: column;
997 flex: none;
1000 toolbarpaletteitem[dragover] {
1001 border-inline-color: transparent;
1004 #customization-palette-container {
1005 display: flex;
1006 flex-direction: column;
1007 flex: 1;
1010 #customization-palette:not([hidden]) {
1011 display: block;
1012 flex: 1 1 auto;
1013 overflow: auto;
1014 min-height: 3em;
1017 #customization-footer-spacer,
1018 #customization-spacer {
1019 flex: 1 1 auto;
1022 #customization-footer {
1023 display: flex;
1024 align-items: center;
1025 flex-shrink: 0;
1026 flex-wrap: wrap;
1029 toolbarpaletteitem[place="palette"] {
1030 flex-direction: column;
1031 width: 7em;
1032 max-width: 7em;
1033 /* icon (16) + margin (9 + 12) + 3 lines of text: */
1034 height: calc(39px + 3em);
1035 margin-bottom: 5px;
1036 margin-inline-end: 24px;
1037 overflow: visible;
1038 display: inline-flex;
1039 vertical-align: top;
1042 toolbarpaletteitem[place="palette"][hidden] {
1043 display: none;
1046 toolbarpaletteitem > toolbarbutton,
1047 toolbarpaletteitem > toolbaritem {
1048 /* Prevent children from getting events */
1049 pointer-events: none;
1050 justify-content: center;
1053 toolbarpaletteitem:not([place="palette"]) > #stop-reload-button {
1054 justify-content: inherit;
1057 :root[customizing=true] .addon-banner-item,
1058 :root[customizing=true] .panel-banner-item {
1059 display: none;
1062 /* Firefox View */
1063 :root[firefoxviewhidden] #wrapper-firefox-view-button,
1064 :root[firefoxviewhidden] #firefox-view-button {
1065 display: none;
1068 /* UI Tour */
1070 @keyframes uitour-wobble {
1071 from {
1072 transform: rotate(0deg) translateX(3px) rotate(0deg);
1074 50% {
1075 transform: rotate(360deg) translateX(3px) rotate(-360deg);
1077 to {
1078 transform: rotate(720deg) translateX(0px) rotate(-720deg);
1082 @keyframes uitour-zoom {
1083 from {
1084 transform: scale(0.8);
1086 50% {
1087 transform: scale(1.0);
1089 to {
1090 transform: scale(0.8);
1094 @keyframes uitour-color {
1095 from {
1096 border-color: #5B9CD9;
1098 50% {
1099 border-color: #FF0000;
1101 to {
1102 border-color: #5B9CD9;
1106 #UITourHighlightContainer,
1107 #UITourHighlight {
1108 pointer-events: none;
1111 #UITourHighlight[active] {
1112 animation-delay: 2s;
1113 animation-fill-mode: forwards;
1114 animation-iteration-count: infinite;
1115 animation-timing-function: linear;
1118 #UITourHighlight[active="wobble"] {
1119 animation-name: uitour-wobble;
1120 animation-delay: 0s;
1121 animation-duration: 1.5s;
1122 animation-iteration-count: 1;
1124 #UITourHighlight[active="zoom"] {
1125 animation-name: uitour-zoom;
1126 animation-duration: 1s;
1128 #UITourHighlight[active="color"] {
1129 animation-name: uitour-color;
1130 animation-duration: 2s;
1133 .popup-notification-invalid-input {
1134 box-shadow: 0 0 1.5px 1px red;
1137 .popup-notification-invalid-input[focused] {
1138 box-shadow: 0 0 2px 2px rgba(255,0,0,0.4);
1141 .popup-notification-description[popupid=webauthn-prompt-register-direct] {
1142 white-space: pre-line;
1145 .dragfeedback-tab {
1146 appearance: none;
1147 opacity: 0.65;
1148 -moz-window-shadow: none;
1151 /* Page action buttons */
1152 .pageAction-panel-button > .toolbarbutton-icon,
1153 .urlbar-page-action {
1154 list-style-image: var(--pageAction-image, inherit);
1157 /* Print pending */
1158 .printSettingsBrowser {
1159 width: 250px !important;
1162 .previewStack {
1163 background-color: #f9f9fa;
1164 color: #0c0c0d;
1167 .previewRendering {
1168 background-repeat: no-repeat;
1169 background-size: 60px 60px;
1170 background-position: center center;
1171 display: flex;
1172 align-items: center;
1173 justify-content: center;
1174 visibility: hidden;
1177 .printPreviewBrowser {
1178 visibility: collapse;
1179 opacity: 1;
1182 .previewStack[rendering=true] > .previewRendering,
1183 .previewStack[previewtype="source"] > .printPreviewBrowser[previewtype="source"],
1184 .previewStack[previewtype="selection"] > .printPreviewBrowser[previewtype="selection"],
1185 .previewStack[previewtype="simplified"] > .printPreviewBrowser[previewtype="simplified"] {
1186 visibility: inherit;
1189 .previewStack[rendering=true] > .printPreviewBrowser {
1190 opacity: 0;
1193 .print-pending-label {
1194 margin-top: 110px;
1195 font-size: large;
1198 printpreview-pagination {
1199 opacity: 0;
1201 printpreview-pagination:focus-within,
1202 .previewStack:hover printpreview-pagination {
1203 opacity: 1;
1205 .previewStack[rendering=true] printpreview-pagination {
1206 opacity: 0;
1209 @media (prefers-color-scheme: dark) {
1210 .previewStack {
1211 background-color: #2A2A2E;
1212 color: rgb(249, 249, 250);
1216 @media (prefers-reduced-motion: no-preference) {
1217 .previewRendering {
1218 background-image: url("chrome://browser/skin/tabbrowser/pendingpaint.png");
1221 .printPreviewBrowser {
1222 transition: opacity 60ms;
1225 .previewStack[rendering=true] > .printPreviewBrowser {
1226 transition: opacity 1ms 250ms;
1229 printpreview-pagination {
1230 transition: opacity 100ms 500ms;
1233 printpreview-pagination:focus-within,
1234 .previewStack:hover printpreview-pagination {
1235 transition: opacity 100ms;
1239 /* Screenshots */
1240 #screenshotsPagePanel {
1241 position: relative;
1242 max-height: 0;
1246 #sidebar-box {
1247 min-width: 14em;
1248 max-width: 36em;
1249 width: 18em;
1252 /* WebExtension Sidebars */
1253 #sidebar-box[sidebarcommand$="-sidebar-action"] > #sidebar-header > #sidebar-switcher-target > #sidebar-icon {
1254 list-style-image: var(--webextension-menuitem-image, inherit);
1255 -moz-context-properties: fill;
1256 fill: currentColor;
1257 width: 16px;
1258 height: 16px;
1261 toolbar[keyNav=true]:not([collapsed=true], [customizing=true]) toolbartabstop {
1262 -moz-user-focus: normal;
1266 * Dialogs
1269 .dialogStack {
1270 z-index: var(--browser-stack-z-index-dialog-stack);
1271 position: absolute;
1272 inset: 0;
1275 .dialogStack.temporarilyHidden {
1276 /* For some printing use cases we need to visually hide the dialog before
1277 * actually closing it / make it disappear from the frame tree. */
1278 visibility: hidden;
1281 .dialogOverlay {
1282 align-items: center;
1283 visibility: hidden;
1286 .dialogOverlay[topmost="true"] {
1287 z-index: 1;
1290 .dialogBox {
1291 background-clip: content-box;
1292 display: flex;
1293 margin: 0 3vw;
1294 padding: 0;
1295 overflow-x: auto;
1298 .dialogBox:not(.spotlightBox) {
1299 box-shadow: 0 2px 14px 0 rgba(0, 0, 0, 0.2);
1300 border-radius: 8px;
1304 * In High Contrast Mode, this prevents a dialog from visually bleeding into
1305 * the window behind it, which looks jarring.
1307 @media (prefers-contrast) {
1308 .dialogBox {
1309 outline: 1px solid WindowText;
1313 .dialogBox[resizable="true"] {
1314 resize: both;
1315 overflow: hidden;
1316 min-height: 20em;
1319 .dialogBox[sizeto="available"] {
1320 --box-top-px: 0px; /* Overridden using inline style */
1321 --box-inline-margin: 4px;
1322 --box-block-margin: 4px;
1323 --box-ideal-width: 1000;
1324 --box-ideal-height: 650;
1325 --box-max-width-margin: calc(100vw - 2 * var(--box-inline-margin));
1326 --box-max-height-margin: calc(100vh - var(--box-top-px) - var(--box-block-margin));
1327 --box-max-width-ratio: 70vw;
1328 --box-max-height-ratio: calc(var(--box-ideal-height) / var(--box-ideal-width) * var(--box-max-width-ratio));
1329 --box-max-height-requested: 100vh;
1330 --box-max-width-requested: 100vw;
1331 --box-max-height-remaining: calc(100vh - var(--box-top-px));
1332 width: 100vw;
1333 height: 100vh;
1334 margin: 0;
1337 .dialogBox:not(.spotlightBox)[sizeto="available"] {
1338 max-width: min(max(var(--box-ideal-width) * 1px, var(--box-max-width-ratio)), var(--box-max-width-margin), var(--box-max-width-requested));
1339 max-height: min(max(var(--box-ideal-height) * 1px, var(--box-max-height-ratio)), var(--box-max-height-margin), var(--box-max-height-requested), var(--box-max-height-remaining));
1342 @media (min-width: 550px) {
1343 .dialogBox[sizeto="available"] {
1344 --box-inline-margin: min(calc(4px + (100vw - 550px) / 4), 16px);
1348 @media (min-width: 800px) {
1349 .dialogBox[sizeto="available"] {
1350 --box-inline-margin: min(calc(16px + (100vw - 800px) / 4), 32px);
1354 @media (min-height: 350px) {
1355 .dialogBox[sizeto="available"] {
1356 --box-block-margin: min(calc(4px + (100vh - 350px) / 4), 16px);
1360 @media (min-height: 550px) {
1361 .dialogBox[sizeto="available"] {
1362 --box-block-margin: min(calc(16px + (100vh - 550px) / 4), 32px);
1366 .dialogStack .dialogBox.spotlightBox[sizeto="available"] {
1367 /* Tab modal: subtract the navigator toolbox height from the dialog height. */
1368 height: calc(100vh - var(--box-top-px));
1371 .content-prompt-dialog > .dialogOverlay {
1372 display: grid;
1373 align-items: unset;
1374 place-content: center;
1375 /* 90% for 5% top/bottom margins, the document height so that
1376 * smaller dialogs don't become too big. */
1377 grid-auto-rows: min(90%, var(--doc-height-px));
1380 :not(.content-prompt-dialog) > .dialogOverlay > .dialogBox:not(.spotlightBox) {
1381 /* Make dialogs overlap with upper chrome UI. Not necessary for Spotlight
1382 dialogs that are intended to be centered above the window or content area. */
1383 margin-top: -5px;
1386 /* For window-modal dialogs, we allow overlapping the urlbar if the window is
1387 * small enough. */
1388 #window-modal-dialog > .dialogOverlay > .dialogBox:not(.spotlightBox) {
1389 /* Do not go below 3px (as otherwise the top of the dialog would be
1390 * adjacent to or clipped by the top of the window), or above the window
1391 * size. */
1392 margin-top: clamp(
1393 3px,
1394 var(--chrome-offset, 20px) - 5px,
1395 calc(100vh - var(--subdialog-inner-height) - 5px)
1399 #window-modal-dialog {
1400 overflow: visible;
1401 padding: 0;
1402 /* Override default <html:dialog> styles */
1403 border-width: 0;
1404 background-color: transparent;
1405 /* This makes the dialog top-aligned by default (the dialog box will move via
1406 * margin-top above) */
1407 bottom: auto;
1408 /* When showModal() is called on a <dialog>, the <dialog> itself will be
1409 * focused when there's no content, hence the focus ring. However, this
1410 * focus ring is not needed because we always setup the content of the dialog
1411 * after its opened and manually focus an element within it.
1413 outline: none;
1416 #window-modal-dialog.spotlight {
1417 /* Spotlight window modal dialogs should be equal in size to the window. */
1418 bottom: revert;
1419 max-height: 100%;
1420 max-width: 100%;
1423 .dialogFrame {
1424 margin: 0;
1425 flex: 1;
1426 /* Default dialog dimensions */
1427 width: 34em;
1430 .dialogOverlay[topmost="true"],
1431 #window-modal-dialog::backdrop {
1432 background-color: rgba(28, 27, 34, 0.45);
1435 .dialogOverlay[hideContent="true"][topmost="true"] {
1436 background-color: var(--tabpanel-background-color);
1439 /* For the window-modal dialog, the background is supplied by the HTML dialog
1440 * backdrop, so the dialogOverlay background above "double backgrounds" - so
1441 * we remove it here: */
1442 #window-modal-dialog > .dialogOverlay[topmost="true"] {
1443 background-color: transparent;
1446 /* Hide tab-modal dialogs when a window-modal one is up. */
1447 :root[window-modal-open] .browserStack > .dialogStack {
1448 visibility: hidden;
1452 * End Dialogs