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@namespace html url("http://www.w3.org/1999/xhtml");
6
7%include ../shared/browser.inc.css
8%include ../shared/browser-custom-colors.inc.css
9
10:root {
11  --toolbar-non-lwt-bgcolor: -moz-dialog;
12  --toolbar-non-lwt-textcolor: -moz-dialogtext;
13  --toolbar-non-lwt-bgimage: none;
14
15  --toolbarbutton-vertical-text-padding: calc(var(--toolbarbutton-inner-padding) + 1px);
16  --toolbarbutton-border-radius: 4px;
17  --toolbarbutton-icon-fill-opacity: 1;
18
19  --panel-separator-color: hsla(210,4%,10%,.14);
20
21  --arrowpanel-field-background: rgba(249,249,250,.3);
22
23  --chrome-content-separator-color: #e1e1e2;
24}
25
26:root:-moz-lwtheme {
27  --chrome-content-separator-color: rgba(0,0,0,.3);
28}
29
30:root[lwt-popup-brighttext] {
31  --panel-separator-color: rgba(249,249,250,.1);
32  --arrowpanel-field-background: rgba(12,12,13,.3);
33}
34
35#navigator-toolbox {
36  appearance: none;
37}
38
39#navigator-toolbox:not(:-moz-lwtheme) {
40  background-color: window;
41}
42
43@media not (prefers-contrast) {
44  #navigator-toolbox:not(:-moz-lwtheme) {
45    background-color: #f0f0f4;
46  }
47}
48
49/*
50  This is a workaround for Bug 1482157
51  -moz-default-appearance: toolbox; makes the macOS sheets attached to the
52  element's bottom border. We cannot put this property on the toolbox itself as
53  it cancels all backgrounds that are there, so we set it on the toolbox bottom
54  border.
55*/
56#navigator-toolbox::after {
57  content: "";
58  display: -moz-box;
59  appearance: auto;
60  -moz-default-appearance: toolbox;
61  height: 1px;
62  margin-top: -1px;
63  opacity: 0.001;
64}
65
66/** Begin titlebar **/
67
68#titlebar {
69  /* Centrally align content items vertically */
70  -moz-box-pack: center;
71}
72
73.titlebar-button {
74  display: none;
75}
76
77/* Making the toolbox position:relative (browser.inc.css) occludes titlebar indicators
78 * if the toolbox has a background. Fix this by positioning the relevant elements, too: */
79#titlebar-secondary-buttonbox {
80  position: relative;
81  z-index: 1;
82  /* Centrally align indicators and full screen button vertically */
83  -moz-box-align: center;
84}
85
86.titlebar-buttonbox-container {
87  -moz-box-align: center;
88}
89
90/* These would be margin-inline-start/end if it wasn't for the fact that OS X
91 * doesn't reverse the order of the items in the titlebar in RTL mode. */
92.titlebar-buttonbox {
93  margin-left: 12px;
94}
95
96/** End titlebar **/
97
98:root[chromehidden~="toolbar"][chromehidden~="location"][chromehidden~="directories"] {
99  border-top: 1px solid rgba(0,0,0,0.65);
100}
101
102.browser-toolbar {
103  appearance: none;
104}
105
106.browser-toolbar:not(.titlebar-color) {
107  background: var(--toolbar-bgcolor);
108  color: var(--toolbar-color);
109}
110
111/* Draw the bottom border of the tabs toolbar when titlebar isn't using vibrancy */
112:root:not([inFullscreen], [tabsintitlebar]) #nav-bar:not([tabs-hidden="true"]),
113#nav-bar:not([tabs-hidden="true"]):-moz-lwtheme {
114  box-shadow: 0 calc(-1 * var(--tabs-navbar-shadow-size)) 0 var(--tabs-border-color);
115}
116
117#nav-bar:not([tabs-hidden="true"]) {
118  /* The toolbar buttons that animate are only visible when the #TabsToolbar is not collapsed.
119     The animations use position:absolute and require a positioned #nav-bar. */
120  position: relative;
121}
122
123/* ----- BOOKMARK TOOLBAR ----- */
124
125#nav-bar-customization-target > #wrapper-personal-bookmarks > #personal-bookmarks {
126  min-height: 32px;
127  -moz-box-align: center;
128}
129
130/* Workaround for native menubar inheritance */
131.openintabs-menuitem {
132  list-style-image: none;
133}
134
135.bookmark-item[cutting] > .toolbarbutton-icon,
136.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-icon {
137  opacity: 0.5;
138}
139
140.bookmark-item[cutting] > .toolbarbutton-text,
141.bookmark-item[cutting] > .menu-iconic-left > .menu-iconic-text {
142  opacity: 0.7;
143}
144
145/* ----- BOOKMARK MENUS ----- */
146
147.bookmark-item > .menu-iconic-left > .menu-iconic-icon {
148  width: 16px;
149  height: 16px;
150}
151
152#bookmarksToolbarFolderMenu,
153#BMB_bookmarksToolbar,
154#panelMenu_bookmarksToolbar {
155  list-style-image: url("chrome://browser/skin/places/bookmarksToolbar.svg");
156}
157
158%include ../shared/toolbarbuttons.inc.css
159%include ../shared/toolbarbutton-icons.inc.css
160%include ../shared/menupanel.inc.css
161
162/* Inactive elements are faded out on OSX */
163.toolbarbutton-1:not(:hover):-moz-window-inactive,
164.bookmark-item:not(:hover):-moz-window-inactive,
165:root:not([customizing]) .toolbarbutton-1:-moz-window-inactive[disabled="true"] {
166  opacity: 0.5;
167}
168
169/* ----- FULLSCREEN WINDOW CONTROLS ----- */
170
171#minimize-button,
172#close-button,
173#fullscreen-button ~ #window-controls > #restore-button {
174  display: none;
175}
176
177/* Address bar */
178
179%include ../shared/urlbar-searchbar.inc.css
180
181@media not (prefers-contrast) {
182  :root:not(:-moz-lwtheme) #urlbar:not([focused="true"]) {
183    --urlbar-box-bgcolor: white;
184  }
185  :root[lwt-default-theme-in-dark-mode] #urlbar:not([focused="true"]) {
186    --urlbar-box-bgcolor: var(--lwt-toolbar-field-focus);
187  }
188}
189
190@media (prefers-contrast) {
191  /* The "increase contrast" preference on macOS draws a 1px black line around
192     panels, including the separate search bar. Since the Urlbar is not
193     implemented as a panel, it does not get this outline. This outline rule
194     resembles the system outline, bringing the Urlbar in line with panels and
195     other Mac apps. */
196  #urlbar[open] > #urlbar-background {
197    outline: 1px solid var(--focus-outline-color)
198  }
199}
200
201#urlbar,
202#searchbar {
203  font-size: 1.25em;
204}
205
206@supports -moz-bool-pref("browser.urlbar.experimental.expandTextOnFocus") {
207  #urlbar[breakout-extend] {
208    font-size: 1.36em;
209  }
210}
211
212/* Ensure diacritics and other edge-of-font-box glyphs do not get clipped,
213 * even in non-Latin scripts. */
214#urlbar-input {
215  line-height: 1.745em;
216}
217
218/* Move the margin to the parent element to properly position the ::after badge */
219moz-input-box > menupopup .context-menu-add-engine > .menu-iconic-left > .menu-iconic-icon {
220  margin-inline: 0;
221}
222moz-input-box > menupopup .context-menu-add-engine > .menu-iconic-left {
223  margin-inline: 0 5px;
224}
225
226%include ../shared/identity-block/identity-block.inc.css
227%include ../shared/notification-icons.inc.css
228%include ../shared/addon-notification.inc.css
229
230/* Address bar results view */
231
232%include ../shared/urlbarView.inc.css
233
234/* ----- AUTOCOMPLETE ----- */
235
236%include ../shared/autocomplete.inc.css
237
238#PopupAutoComplete > richlistbox > richlistitem[originaltype~="datalist-first"] {
239  border-top: 1px solid #C7C7C7;
240}
241
242#BMB_bookmarksPopup[side="top"],
243#BMB_bookmarksPopup[side="bottom"] {
244  margin-inline: -17px;
245}
246
247#BMB_bookmarksPopup[side="left"],
248#BMB_bookmarksPopup[side="right"] {
249  margin-block: -17px;
250}
251
252/* Bookmarking panel */
253
254%include ../shared/places/editBookmarkPanel.inc.css
255
256/* The following elements come from editBookmarkPanel.inc.xhtml. Styling that's
257   specific to the editBookmarkPanel should be in browser.css. Styling that
258   should be shared by all editBookmarkPanel.inc.xhtml consumers should be in
259   editBookmark.css. */
260
261#editBMPanel_newFolderBox {
262  background-color: var(--arrowpanel-field-background);
263  color: inherit;
264  border-radius: 0 2px;
265  border: 1px solid var(--panel-separator-color);
266  margin: 0;
267  padding: 0;
268  height: 24px;
269}
270
271#editBMPanel_newFolderButton {
272  appearance: none;
273  -moz-box-flex: 1;
274  -moz-context-properties: fill, fill-opacity;
275  fill: currentColor;
276  fill-opacity: 0.8;
277  border: none;
278  padding: 0 9px;
279  margin: 0;
280  min-height: 24px;
281  height: 24px;
282  color: inherit;
283  list-style-image: url("chrome://global/skin/icons/plus.svg");
284}
285
286#editBMPanel_newFolderButton:hover {
287  background-color: var(--arrowpanel-dimmed);
288}
289
290#editBMPanel_newFolderButton:hover:active {
291  background-color: var(--arrowpanel-dimmed-further);
292}
293
294#editBMPanel_newFolderButton:-moz-focusring {
295  box-shadow: var(--focus-ring-box-shadow);
296}
297
298#editBMPanel_newFolderButton .button-text {
299  -moz-box-flex: 1; /* push the button icon to the start side */
300  text-align: start;
301}
302
303/**** folder tree and tag selector ****/
304
305#editBMPanel_folderTree,
306#editBMPanel_tagsSelector {
307  appearance: none;
308  background-color: var(--arrowpanel-field-background);
309  color: inherit;
310  border-radius: 2px;
311  border: 1px solid var(--panel-separator-color);
312  margin: 0;
313}
314
315#editBMPanel_folderTree:-moz-focusring,
316#editBMPanel_tagsSelector:-moz-focusring {
317  border-color: -moz-mac-focusring;
318  box-shadow: var(--focus-ring-box-shadow);
319}
320
321#editBMPanel_folderTree > treechildren::-moz-tree-row(blur,selected),
322#editBMPanel_tagsSelector:not(:focus) > richlistitem[selected] {
323  background-color: var(--arrowpanel-dimmed);
324}
325
326#editBMPanel_folderTree > treechildren::-moz-tree-twisty(blur,selected),
327#editBMPanel_folderTree > treechildren::-moz-tree-image(blur,selected),
328#editBMPanel_folderTree > treechildren::-moz-tree-cell-text(blur,selected),
329#editBMPanel_tagsSelector:not(:focus) > richlistitem[selected] {
330  color: inherit;
331}
332
333#editBMPanel_folderTree {
334  border-bottom: none;
335  border-bottom-left-radius: 0;
336  border-bottom-right-radius: 0;
337  /* Implements editBookmarkPanel resizing on folderTree un-collapse. */
338  margin: 0 !important;
339  min-width: 27em;
340  position: relative;
341}
342
343/* ----- SIDEBAR ELEMENTS ----- */
344
345%include ../shared/sidebar.inc.css
346
347#browser {
348  --sidebar-border-color: hsla(240, 5%, 5%, .1);
349}
350
351#sidebar-box {
352  /* Default font size is 11px on mac, so this is 12px */
353  font-size: 1.0909rem;
354  --sidebar-background-color: -moz-mac-source-list;
355}
356
357/* Give the sidebar a vibrant appearance. Only do this when no lwtheme sidebar
358 * rules are in use. Vibrant appearance values only work if there is no
359 * background-color rendered behind the element. If the active theme has sidebar
360 * rules, we want to show the theme's background-color in the sidebar. */
361#sidebar-box:not([lwt-sidebar]) {
362  appearance: auto;
363  -moz-default-appearance: -moz-mac-source-list;
364  -moz-font-smoothing-background-color: -moz-mac-source-list;
365}
366
367/* ----- CONTENT ----- */
368
369.openintabs-menuitem {
370  list-style-image: none;
371}
372
373/* ::::: tabbrowser ::::: */
374
375#tabbrowser-tabbox {
376  margin: 0;
377}
378
379%include ../shared/tabs.inc.css
380
381.tab-label {
382  margin-block: 1px 0;
383}
384
385.tabbrowser-tab:not(:hover) > .tab-stack > .tab-content > .tab-icon-image:not([selected="true"], [multiselected]) {
386  opacity: .9;
387}
388
389/*
390 * Force the overlay to create a new stacking context so it always appears on
391 * top of the icon.
392 */
393.tab-icon-overlay {
394  opacity: 0.9999;
395}
396
397.tab-label-container:not([selected="true"], [multiselected]) {
398  opacity: .7;
399}
400
401.tabbrowser-tab {
402  font: message-box;
403  border: none;
404}
405.tabbrowser-tab[multiselected]:not(:-moz-lwtheme),
406.tabbrowser-tab[visuallyselected=true]:not(:-moz-lwtheme) {
407  /* overriding tabbox.css */
408  color: hsl(240, 5%, 5%);
409}
410
411.tabbrowser-tab[multiselected],
412.tabbrowser-tab[visuallyselected=true] {
413  /* overriding tabbox.css */
414  text-shadow: inherit;
415}
416
417#tabbrowser-tabs {
418  -moz-box-align: stretch;
419  padding-inline: 0;
420  margin-bottom: 0;
421  position: static;
422}
423
424/* Bookmark drag and drop styles */
425
426.bookmark-item[dragover-into="true"] {
427  background: Highlight !important;
428  color: HighlightText !important;
429}
430
431/* Translation */
432
433%include ../shared/translation/infobar.inc.css
434
435/* Status panel */
436
437#statuspanel-label {
438  margin: 0;
439  padding: 2px 4px;
440  background-color: #f9f9fa;
441  border: 1px none #ddd;
442  border-top-style: solid;
443  color: #444;
444  text-shadow: none;
445}
446
447@media (prefers-color-scheme: dark) {
448  #statuspanel-label {
449    background-color: hsl(240, 1%, 20%);
450    border-color: hsl(240, 1%, 40%);
451    color: rgb(249, 249, 250);
452  }
453}
454
455#statuspanel:not([mirror]) > #statuspanel-inner > #statuspanel-label:-moz-locale-dir(ltr),
456#statuspanel[mirror] > #statuspanel-inner > #statuspanel-label:-moz-locale-dir(rtl) {
457  border-right-style: solid;
458  border-top-right-radius: .3em;
459  margin-right: 1em;
460}
461
462#statuspanel:not([mirror]) > #statuspanel-inner > #statuspanel-label:-moz-locale-dir(rtl),
463#statuspanel[mirror] > #statuspanel-inner > #statuspanel-label:-moz-locale-dir(ltr) {
464  border-left-style: solid;
465  border-top-left-radius: .3em;
466  margin-left: 1em;
467}
468
469%include ../shared/fullscreen/warning.inc.css
470%include ../shared/ctrlTab.inc.css
471
472/* On mac, the popup notification contents are indented by default and so
473  the default closebutton margins from notification.css require adjustment */
474
475.click-to-play-plugins-notification-description-box > .popup-notification-closebutton {
476  margin-inline-end: -6px;
477  margin-top: -7px;
478}
479
480/* Customization mode */
481
482%include ../shared/customizableui/customizeMode.inc.css
483
484/* End customization mode */
485
486%include ../shared/UITour.inc.css
487
488#UITourTooltipDescription {
489  font-size: 1.18rem;
490  line-height: 2rem;
491}
492
493#UITourTooltipClose {
494  margin-inline-end: -10px;
495  margin-top: -14px;
496}
497
498.cui-widget-panelview[id^=PanelUI-webext-] {
499  border-radius: var(--arrowpanel-border-radius);
500}
501
502.webextension-popup-browser,
503.webextension-popup-stack {
504  border-radius: inherit;
505}
506