diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-07 09:22:09 +0000 |
commit | 43a97878ce14b72f0981164f87f2e35e14151312 (patch) | |
tree | 620249daf56c0258faa40cbdcf9cfba06de2a846 /toolkit/themes/linux/global | |
parent | Initial commit. (diff) | |
download | firefox-43a97878ce14b72f0981164f87f2e35e14151312.tar.xz firefox-43a97878ce14b72f0981164f87f2e35e14151312.zip |
Adding upstream version 110.0.1.upstream/110.0.1upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'toolkit/themes/linux/global')
22 files changed, 1113 insertions, 0 deletions
diff --git a/toolkit/themes/linux/global/autocomplete.css b/toolkit/themes/linux/global/autocomplete.css new file mode 100644 index 0000000000..e0556acff9 --- /dev/null +++ b/toolkit/themes/linux/global/autocomplete.css @@ -0,0 +1,88 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* ===== autocomplete.css ================================================= + == Styles used by the autocomplete widget. + ======================================================================= */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +/* ::::: autocomplete ::::: */ + +html|input[nomatch="true"][highlightnonmatches="true"] { + color: red; +} + +/* ::::: autocomplete popups ::::: */ + +panel[type="autocomplete-richlistbox"] { + --panel-color: FieldText; + --panel-background: Field; +} + +/* ::::: richlistbox autocomplete ::::: */ + +.autocomplete-richlistbox { + appearance: none; + margin: 1px; + background-color: transparent; +} + +.autocomplete-richlistitem[selected] { + background-color: SelectedItem; + color: SelectedItemText; +} + +.ac-type-icon { + display: none; + width: 16px; + height: 16px; + max-width: 16px; + max-height: 16px; + margin-inline-start: 6px; + margin-inline-end: 6px; +} + +.ac-site-icon { + display: none; + width: 16px; + height: 16px; + max-width: 16px; + max-height: 16px; + margin-inline-start: 6px; + margin-inline-end: 8px; + list-style-image: url("chrome://global/skin/icons/defaultFavicon.svg"); + -moz-context-properties: fill; + fill: currentColor; +} + +.ac-title { + margin-inline-start: 0; + margin-inline-end: 6px; +} + +.ac-separator { + display: none; + margin-inline-start: 0; + margin-inline-end: 6px; +} + +.ac-url { + display: none; +} + +/* Better align the URL with the title. */ +.ac-separator, +.ac-url { + margin-bottom: -2px; +} + +.ac-title-text, +.ac-separator-text, +.ac-url-text, +.ac-text-overflow-container { + padding: 0 !important; + margin: 0 !important; +} diff --git a/toolkit/themes/linux/global/button.css b/toolkit/themes/linux/global/button.css new file mode 100644 index 0000000000..1793a2da26 --- /dev/null +++ b/toolkit/themes/linux/global/button.css @@ -0,0 +1,75 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* ===== button.css ===================================================== + == Styles used by the XUL button element. + ======================================================================= */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +/* :::::::::: button :::::::::: */ + +button { + margin: 1px 5px 2px; + min-width: 6.3em; + color: ButtonText; + text-shadow: none; +} + +.button-text { + margin: 0; + margin-inline-start: 2px; + text-align: center; +} + +/* .......... hover state .......... */ + +button:where(:hover:not([checked="true"])) { + color: -moz-buttonhovertext; +} + +/* .......... active state .......... */ + +button:where(:hover:active, [open="true"]) { + color: -moz-buttonactivetext; +} + +/* .......... disabled state .......... */ + +button:where([disabled="true"]) { + color: GrayText; +} + +/* .......... focused state .......... */ + +button:where(:focus-visible) { + outline: auto; +} + +/* ::::: menu buttons ::::: */ + +.button-menu-dropmarker { + appearance: auto; + -moz-default-appearance: toolbarbutton-dropdown; +} + +/* ::::: plain buttons ::::: */ + +button.plain { + margin: 0 !important; + padding: 0 !important; +} + +button[type="disclosure"] { + margin: 0; + appearance: none; + list-style-image: url("chrome://global/skin/icons/arrow-right-12.svg"); + -moz-context-properties: fill; + fill: currentColor; + min-width: 0; +} + +button[type="disclosure"][open="true"] { + list-style-image: url("chrome://global/skin/icons/arrow-down-12.svg"); +} diff --git a/toolkit/themes/linux/global/dropmarker.css b/toolkit/themes/linux/global/dropmarker.css new file mode 100644 index 0000000000..4a18f8f6e1 --- /dev/null +++ b/toolkit/themes/linux/global/dropmarker.css @@ -0,0 +1,11 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +:host { + appearance: auto; + -moz-default-appearance: -moz-menulist-arrow-button; + /* Cut off inheritance for dropmarkers within other widgets where + -moz-image-region might be set for the primary icon. */ + -moz-image-region: auto; +} diff --git a/toolkit/themes/linux/global/global.css b/toolkit/themes/linux/global/global.css new file mode 100644 index 0000000000..39826f0a7c --- /dev/null +++ b/toolkit/themes/linux/global/global.css @@ -0,0 +1,122 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* ===== global.css ===================================================== + == Styles that apply everywhere. + ======================================================================= */ + +@import url("chrome://global/skin/global-shared.css"); + +@namespace xul url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +@media (-moz-menubar-drag) { + xul|toolbar[type="menubar"] { + -moz-window-dragging: drag; + } +} + +:root { + background-color: -moz-Dialog; + color: -moz-DialogText; + font: message-box; +} + +/* ::::: Alert icons :::::*/ + +.message-icon { + list-style-image: url("moz-icon://stock/gtk-dialog-info?size=dialog"); +} + +.alert-dialog #infoIcon, +.alert-icon { + list-style-image: url("moz-icon://stock/gtk-dialog-warning?size=dialog"); +} + +.error-icon { + list-style-image: url("moz-icon://stock/gtk-dialog-error?size=dialog"); +} + +.question-icon { + list-style-image: url("moz-icon://stock/gtk-dialog-question?size=dialog"); +} + +.authentication-icon { + list-style-image: url("chrome://global/skin/icons/Authentication.png"); +} + +/* XXX(ntim): [mode="text"] is only used by comm-central */ + +xul|toolbar[mode="text"] .toolbarbutton-text { + padding: 0 !important; + margin: 3px 5px !important; +} + +/* ::::: Print preview ::::: */ + +.print-preview-navigate-button { + min-width: 1.9em; +} + +.print-preview-navigate-button > .toolbarbutton-icon { + display: none; +} + +#print-preview-portrait-button { + list-style-image: url("moz-icon://stock/gtk-orientation-portrait?size=button"); +} + +#print-preview-landscape-button { + list-style-image: url("moz-icon://stock/gtk-orientation-landscape?size=button"); +} + +#print-preview-portrait-button > .toolbarbutton-icon, +#print-preview-landscape-button > .toolbarbutton-icon { + margin-inline-end: 2px; +} + +html|*#print-preview-pageNumber { + /* 3 chars + (3px border + 1px padding) on both sides */ + width: calc(8px + 3ch); + margin: 0 4px; +} + +/* Separators */ + +xul|separator:not([orient="vertical"]) { + height: 1.5em; +} +xul|separator[orient="vertical"] { + width: 1.5em; +} + +xul|separator.thin:not([orient="vertical"]) { + height: 0.5em; +} +xul|separator.thin[orient="vertical"] { + width: 0.5em; +} + +xul|separator.groove:not([orient="vertical"]) { + border-top: 1px solid ThreeDShadow; + border-bottom: 1px solid ThreeDHighlight; + height: 0; + margin-block: 0.4em; +} +xul|separator.groove[orient="vertical"] { + border-left: 1px solid ThreeDShadow; + border-right: 1px solid ThreeDHighlight; + width: 0; + margin-inline: 0.4em; +} + +/* Other margins */ + +html|input { + margin: 2px 4px; +} + +xul|notification > xul|hbox > xul|button { + margin-block: 0; +} diff --git a/toolkit/themes/linux/global/icons/Authentication.png b/toolkit/themes/linux/global/icons/Authentication.png Binary files differnew file mode 100644 index 0000000000..6fbd24b91e --- /dev/null +++ b/toolkit/themes/linux/global/icons/Authentication.png diff --git a/toolkit/themes/linux/global/icons/errorGhosted-64.png b/toolkit/themes/linux/global/icons/errorGhosted-64.png Binary files differnew file mode 100644 index 0000000000..5ef152a960 --- /dev/null +++ b/toolkit/themes/linux/global/icons/errorGhosted-64.png diff --git a/toolkit/themes/linux/global/icons/informationGhosted-64.png b/toolkit/themes/linux/global/icons/informationGhosted-64.png Binary files differnew file mode 100644 index 0000000000..edd5b4187f --- /dev/null +++ b/toolkit/themes/linux/global/icons/informationGhosted-64.png diff --git a/toolkit/themes/linux/global/icons/questionGhosted-64.png b/toolkit/themes/linux/global/icons/questionGhosted-64.png Binary files differnew file mode 100644 index 0000000000..568e4d88f9 --- /dev/null +++ b/toolkit/themes/linux/global/icons/questionGhosted-64.png diff --git a/toolkit/themes/linux/global/icons/warningGhosted-64.png b/toolkit/themes/linux/global/icons/warningGhosted-64.png Binary files differnew file mode 100644 index 0000000000..92680780d1 --- /dev/null +++ b/toolkit/themes/linux/global/icons/warningGhosted-64.png diff --git a/toolkit/themes/linux/global/in-content/common.css b/toolkit/themes/linux/global/in-content/common.css new file mode 100644 index 0000000000..7032648dec --- /dev/null +++ b/toolkit/themes/linux/global/in-content/common.css @@ -0,0 +1,42 @@ +/* - This Source Code Form is subject to the terms of the Mozilla Public + - License, v. 2.0. If a copy of the MPL was not distributed with this file, + - You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@import url("chrome://global/skin/in-content/common-shared.css"); + +@namespace html "http://www.w3.org/1999/xhtml"; +@namespace xul "http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; + +@media (prefers-color-scheme: dark) { + /* Don't apply scrollbar-color since it removes the native scrollbar style on Linux */ + :root { + scrollbar-color: initial; + } +} + +xul|tab[visuallyselected] { + /* Override styles for tab[selected] from + toolkit/themes/linux/global/tabbox.css */ + margin-bottom: 0; +} + +/* Overriding appearance also avoids incorrect selection background color with + light text. */ +xul|menulist::part(label-box), +xul|*.radio-label-box, +xul|*.checkbox-label-box { + appearance: none; +} + +xul|button[type="menu"] > xul|*.button-box > xul|*.button-menu-dropmarker { + appearance: none !important; +} + +xul|menulist { + font-size: inherit; +} + +html|button { + /* XUL button min-width */ + min-width: 6.3em; +} diff --git a/toolkit/themes/linux/global/jar.mn b/toolkit/themes/linux/global/jar.mn new file mode 100644 index 0000000000..6b42c0d37f --- /dev/null +++ b/toolkit/themes/linux/global/jar.mn @@ -0,0 +1,25 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +#include ../../shared/desktop-non-mac.jar.inc.mn + +toolkit.jar: + skin/classic/global/autocomplete.css + skin/classic/global/button.css + skin/classic/global/dropmarker.css + skin/classic/global/global.css + skin/classic/global/menu.css + skin/classic/global/menulist.css + skin/classic/global/popup.css + skin/classic/global/radio.css + skin/classic/global/richlistbox.css + skin/classic/global/search-textbox.css + skin/classic/global/splitter.css + skin/classic/global/tabbox.css + skin/classic/global/toolbar.css + skin/classic/global/toolbarbutton.css + + skin/classic/global/icons/Authentication.png (icons/Authentication.png) + + skin/classic/global/in-content/common.css (in-content/common.css) diff --git a/toolkit/themes/linux/global/menu.css b/toolkit/themes/linux/global/menu.css new file mode 100644 index 0000000000..786fea5dc7 --- /dev/null +++ b/toolkit/themes/linux/global/menu.css @@ -0,0 +1,179 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@import url("chrome://global/skin/menu-scrolling.css"); + +/* ===== menu.css ======================================================= + == Styles used by XUL menu-related elements. + ======================================================================= */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +/* ::::: menu/menuitem ::::: */ + +menupopup, +menubar { + font: menu; +} + +menu, +menuitem, +menucaption { + appearance: auto; + -moz-default-appearance: menuitem; + -moz-box-align: center; + padding: 4px 6px; + max-width: 42em; + list-style-image: none; + -moz-image-region: auto; + + /* Specify our background to avoid triggering reflows on hover. This is an + * optimization, as backgrounds don't disable theming on XUL elements, but + * also papers over bug 1653832. */ + background-color: initial; +} + +menu:where([_moz-menuactive="true"]), +menuitem:where([_moz-menuactive="true"]) { + color: -moz-menuhovertext; + background-color: -moz-menuhover; +} + +menuitem[customoptionstyling="true"], +menucaption[customoptionstyling="true"] { + appearance: none; +} + +menu:where([disabled="true"]), +menuitem:where([disabled="true"]), +menucaption:where([disabled="true"]) { + color: GrayText; +} + +menubar > menu { + padding: .3em .4em; +} + +menubar:-moz-lwtheme > menu { + appearance: none; + text-shadow: none; +} + +menubar:-moz-lwtheme > menu:not([open]) { + text-shadow: inherit; +} + +menubar > menu:not([open], [disabled="true"]) { + color: inherit; +} + +menubar > menu[open] { + color: -moz-menubarhovertext; + background-color: -moz-menuhover; +} + +menuitem[default="true"], +menuitem.spell-suggestion, +menucaption { + font-weight: bold; +} + +/* ::::: menu/menuitems in menulist popups ::::: */ + +menulist > menupopup { + font: inherit; +} + +menulist > menupopup > :is(menuitem, menucaption, menu) { + max-width: none; +} + +/* ..... internal content .... */ + +.menu-text, +.menu-iconic-left, +.menu-iconic-text { + margin-top: 0 !important; + margin-bottom: 0 !important; + margin-inline-start: 0 !important; + margin-inline-end: 2px !important; +} + +.menu-text { + /* This is (18 + the size of end-padding on .menu-iconic-left)px */ + margin-inline-start: 21px !important; +} + +.menu-accel, +.menu-iconic-accel { + margin-top: 0 !important; + margin-bottom: 0 !important; + margin-inline-start: 7px !important; +} + +.menu-accel-container { + -moz-box-pack: end; +} + +.menu-iconic-left { + min-width: 16px; + /* We can only hardcode this, to make the default GTK icon<->label spacing */ + padding-inline-end: 3px !important; +} + +.menu-iconic-icon { + width: 16px; + height: 16px; +} + +.menu-right { + margin-top: 0; + margin-bottom: 0; + margin-inline-start: 6px; + margin-inline-end: 0; + width: 1ex; + height: 1ex; + /* These next two rules are needed to prevent inheritance and thus ugliness */ + list-style-image: none; + -moz-image-region: auto; + appearance: auto; + -moz-default-appearance: menuarrow; +} + +.menubar-left { + margin-top: 0; + margin-bottom: 0; + margin-inline-start: 0; + margin-inline-end: 2px; +} + +.menubar-text { + margin: 0 1px !important; +} + + +menulist > menupopup > :is(menuitem, menucaption, menu) > .menu-iconic-left { + display: none; +} + +/* ::::: checkbox menuitem ::::: */ + +menuitem:is([type="checkbox"], [checked="true"]) { + appearance: auto !important; + -moz-default-appearance: checkmenuitem !important; +} + +/* ::::: radio menuitem ::::: */ + +menuitem[type="radio"] { + appearance: auto !important; + -moz-default-appearance: radiomenuitem !important; +} + +/* ::::: menuseparator ::::: */ + +menuseparator { + appearance: auto; + -moz-default-appearance: menuseparator; +} diff --git a/toolkit/themes/linux/global/menulist.css b/toolkit/themes/linux/global/menulist.css new file mode 100644 index 0000000000..fbaa50b9c3 --- /dev/null +++ b/toolkit/themes/linux/global/menulist.css @@ -0,0 +1,49 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@import url("chrome://global/skin/menulist-shared.css"); + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +label { + margin: 1px 3px; +} + +:host([native]) { + appearance: auto; + -moz-default-appearance: menulist; + margin: 2px 4px; + color: -moz-DialogText; + font: menu; + text-shadow: none; +} + +:host([native]:not([disabled="true"]):hover) { + color: -moz-buttonhovertext; +} + +:host([native]:not([disabled="true"]):hover:active), +:host([native]:not([disabled="true"])[open="true"]) { + color: -moz-buttonactivetext; +} + +:host([native][disabled="true"]) { + color: GrayText; +} + +/* Label box */ + +#label-box[native] { + appearance: auto; + -moz-default-appearance: menulist-text; + -moz-box-align: center; + -moz-box-pack: center; + color: inherit; +} + +/* Dropmarker */ + +dropmarker[native] { + display: none; +} diff --git a/toolkit/themes/linux/global/moz.build b/toolkit/themes/linux/global/moz.build new file mode 100644 index 0000000000..d988c0ff9b --- /dev/null +++ b/toolkit/themes/linux/global/moz.build @@ -0,0 +1,7 @@ +# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*- +# vim: set filetype=python: +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +JAR_MANIFESTS += ["jar.mn"] diff --git a/toolkit/themes/linux/global/popup.css b/toolkit/themes/linux/global/popup.css new file mode 100644 index 0000000000..ba63abca1e --- /dev/null +++ b/toolkit/themes/linux/global/popup.css @@ -0,0 +1,73 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +/* ::::: menupopup ::::: */ + +menupopup, +panel { + min-width: 1px; + --panel-padding-block: max(env(-moz-gtk-csd-menu-radius) - 1px, 0px); + --panel-padding: var(--panel-padding-block) 0; + --panel-color: MenuText; + --panel-background: Menu; + --panel-border-radius: env(-moz-gtk-csd-menu-radius); + --panel-border-color: ThreeDShadow; + --panel-width: initial; + --panel-shadow: 0 0 var(--panel-shadow-margin) hsla(0,0%,0%,.2); + /* To account for the box-shadow below */ + --panel-shadow-margin: 4px; + margin: calc(-1 * var(--panel-shadow-margin)); + -moz-window-input-region-margin: var(--panel-shadow-margin); +} + +menupopup > menu > menupopup { + /* Vertically align nested menupopups: the shadow plus the top padding */ + margin-top: calc(-1 * (var(--panel-shadow-margin) + var(--panel-padding-block))); +} + +/* ::::: arrow panel ::::: */ + +:is(panel, menupopup)[type="arrow"] { + border: none; + background-color: transparent; +} + +:is(panel, menupopup)::part(content) { + display: -moz-box; + -moz-box-flex: 1; + padding: var(--panel-padding); + color: var(--panel-color); + background: var(--panel-background); + border-radius: var(--panel-border-radius); + border: 1px solid var(--panel-border-color); + width: var(--panel-width); + min-width: 0; + min-height: 0; + + box-shadow: var(--panel-shadow); + margin: var(--panel-shadow-margin); +} + +:is(panel, menupopup)[orient=vertical]::part(content) { + -moz-box-orient: vertical; +} + +panel[type="arrow"].panel-no-padding::part(content) { + padding: 0; + overflow: hidden; /* Don't let panel content overflow the border */ +} + +/* rules for popups associated with menulists */ + +menulist > menupopup { + padding: 0; + min-width: 0; +} + +menupopup[customoptionstyling="true"] { + appearance: none; +} diff --git a/toolkit/themes/linux/global/radio.css b/toolkit/themes/linux/global/radio.css new file mode 100644 index 0000000000..2da8b45877 --- /dev/null +++ b/toolkit/themes/linux/global/radio.css @@ -0,0 +1,51 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* ===== radio.css =================================================== + == Styles used by the XUL radio element. + ======================================================================= */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +/* ::::: radio ::::: */ + +radio { + appearance: auto; + -moz-default-appearance: radio-container; + -moz-box-align: center; + margin: 2px 4px; +} + +.radio-check { + appearance: auto; + -moz-default-appearance: radio; + margin: 2px; +} + +.radio-label-box { + appearance: auto; + -moz-default-appearance: radio-label; +} + +.radio-icon[src] { + margin-inline-end: 2px; +} + +.radio-label { + margin: 0; +} + +/* ..... focused state ..... */ + +radiogroup:focus-visible > radio[focused="true"] > .radio-label-box { + /* Native theming should take care of this but it appears to be broken with + some Gtk themes. Bug 1312169. */ + outline: var(--focus-outline); +} + +/* ..... disabled state ..... */ + +radio[disabled="true"] { + color: GrayText; +} diff --git a/toolkit/themes/linux/global/richlistbox.css b/toolkit/themes/linux/global/richlistbox.css new file mode 100644 index 0000000000..358643c28e --- /dev/null +++ b/toolkit/themes/linux/global/richlistbox.css @@ -0,0 +1,58 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +richlistbox { + appearance: auto; + -moz-default-appearance: listbox; + margin: 2px 4px; + background-color: Field; + color: FieldText; +} + +richlistbox[disabled="true"] { + color: GrayText; +} + +richlistitem[selected="true"] { + background-color: -moz-cellhighlight; + color: -moz-cellhighlighttext; +} + +richlistbox:where(:focus) > richlistitem[selected="true"] { + background-color: SelectedItem; + color: SelectedItemText; +} + +richlistbox[seltype="multiple"]:focus > richlistitem[current="true"], +richlistbox.theme-listbox:focus > richlistitem[current="true"] { + outline: var(--default-focusring); + outline-color: SelectedItem; + outline-offset: calc(-1 * var(--default-focusring-width)); +} + +richlistbox[seltype="multiple"]:focus > richlistitem[current="true"][selected="true"], +richlistbox.theme-listbox:focus > richlistitem[current="true"][selected="true"] { + outline-color: #F3D982; /* TODO: find a suitable system color */ +} + +richlistbox.theme-listbox:not(:focus) > richlistitem[selected="true"] { + background-color: -moz-cellhighlight; + color: -moz-cellhighlighttext; +} + +richlistbox.theme-listbox > richlistitem > label { + margin: 0px; + padding-top: 0px; + padding-bottom: 1px; + padding-inline-start: 4px; + padding-inline-end: 0px; + white-space: nowrap; +} + +listheader { + background-color: -moz-Dialog; + color: -moz-DialogText; +} diff --git a/toolkit/themes/linux/global/search-textbox.css b/toolkit/themes/linux/global/search-textbox.css new file mode 100644 index 0000000000..ae69745468 --- /dev/null +++ b/toolkit/themes/linux/global/search-textbox.css @@ -0,0 +1,73 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); +@namespace html url("http://www.w3.org/1999/xhtml"); + +/* ::::: search textbox ::::: */ + +:host { + appearance: auto; + -moz-default-appearance: textfield; + cursor: text; + margin: 2px 4px; /* matches <input> global.css margin */ + padding: 2px 2px 3px; + padding-inline-start: 4px; + background-color: Field; + color: FieldText; +} + +html|input { + border: none; + padding: 0 1px; + background-color: transparent; + outline: none; + color: inherit; + font: inherit; + text-shadow: inherit; + box-sizing: border-box; + -moz-box-flex: 1; + min-width: 0; + text-align: inherit; +} + +/* ..... readonly state ..... */ + +:host([readonly="true"]) { + background-color: -moz-Dialog; + color: -moz-DialogText; +} + +/* ..... disabled state ..... */ + +:host([disabled="true"]) { + cursor: default; + background-color: -moz-Dialog; + color: GrayText; +} + +/* ::::: icons ::::: */ + +:host(:not([searchbutton])) > .textbox-search-sign { + list-style-image: url(chrome://global/skin/icons/search-textbox.svg); + margin-inline-end: 5px; +} + +:host([searchbutton]) .textbox-search-icon { + list-style-image: url(chrome://global/skin/icons/search-textbox.svg); +} + +.textbox-search-clear { + list-style-image: url(resource://content-accessible/searchfield-cancel.svg); +} + +:host([searchbutton]) .textbox-search-icon:not([disabled]), +.textbox-search-clear:not([disabled]) { + cursor: pointer; +} + +/* Don't leave extra blank space with long placeholders (see bug 1385902) */ +:host(:not([searchbutton])) > .textbox-search-icons:not([selectedIndex="1"]) { + display: none; +} diff --git a/toolkit/themes/linux/global/splitter.css b/toolkit/themes/linux/global/splitter.css new file mode 100644 index 0000000000..312e72272d --- /dev/null +++ b/toolkit/themes/linux/global/splitter.css @@ -0,0 +1,53 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* ===== splitter.css =================================================== + == Styles used by the XUL splitter element. + ======================================================================= */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +/* ::::: splitter (vertical) ::::: */ + +splitter { + appearance: auto; + -moz-default-appearance: splitter; + -moz-box-align: center; + -moz-box-pack: center; + cursor: ew-resize; +} + +splitter[state="collapsed"][collapse="before"], +splitter[state="collapsed"][substate="before"], +splitter[state="collapsed"][collapse="after"]:-moz-locale-dir(rtl), +splitter[state="collapsed"][substate="after"]:-moz-locale-dir(rtl) { + cursor: e-resize; +} + +splitter[state="collapsed"][collapse="after"], +splitter[state="collapsed"][substate="after"], +splitter[state="collapsed"][collapse="before"]:-moz-locale-dir(rtl), +splitter[state="collapsed"][substate="before"]:-moz-locale-dir(rtl) { + cursor: w-resize; +} + +/* ::::: splitter (horizontal) ::::: */ + +splitter[orient="vertical"] { + cursor: ns-resize; +} + +splitter[orient="vertical"][state="collapsed"][collapse="before"], +splitter[orient="vertical"][state="collapsed"][substate="before"] { + cursor: s-resize; +} + +splitter[orient="vertical"][state="collapsed"][collapse="after"], +splitter[orient="vertical"][state="collapsed"][substate="after"] { + cursor: n-resize; +} + +splitter[disabled="true"] { + cursor: default !important; +} diff --git a/toolkit/themes/linux/global/tabbox.css b/toolkit/themes/linux/global/tabbox.css new file mode 100644 index 0000000000..75fe7bdbf7 --- /dev/null +++ b/toolkit/themes/linux/global/tabbox.css @@ -0,0 +1,53 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* ===== tabbox.css ================================================= + == Styles used by XUL tab-related elements. + ======================================================================= */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + + +/* ::::: tabs ::::: */ + +tabs { + position: relative; + z-index: 0; +} + +/* ::::: tabpanels ::::: */ + +tabpanels { + appearance: auto; + -moz-default-appearance: tabpanels; + padding: 8px; + color: -moz-DialogText; +} + +/* ::::: tab ::::: */ + +tab { + position: relative; + appearance: auto; + -moz-default-appearance: tab; + margin-top: 2px; + padding: 3px 4px; + color: -moz-DialogText; +} + +tab:where([visuallyselected="true"]) { + z-index: 1; + margin-top: 0; + margin-bottom: -2px; + padding-top: 4px; + padding-bottom: 6px; +} + +tab:where(:not(:first-of-type)) { + margin-inline-start: -2px; +} + +.tab-text { + margin: 0 !important; +} diff --git a/toolkit/themes/linux/global/toolbar.css b/toolkit/themes/linux/global/toolbar.css new file mode 100644 index 0000000000..94988f7acf --- /dev/null +++ b/toolkit/themes/linux/global/toolbar.css @@ -0,0 +1,66 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* ===== toolbar.css ==================================================== + == Styles used by XUL toolbar-related elements. + ======================================================================= */ + +@namespace url("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"); + +toolbox { + appearance: auto; + -moz-default-appearance: toolbox; +} + +toolbar { + appearance: auto; + -moz-default-appearance: toolbar; + min-width: 1px; + min-height: 20px; + padding: 2px 0; +} + +toolbar[type="menubar"] { + appearance: auto; + -moz-default-appearance: menubar; + color: -moz-menubartext; + min-width: 1px; + min-height: 20px; + padding: 1px 0; +} + +toolbar:-moz-lwtheme { + appearance: none; + color: inherit; +} + +toolbarseparator { + appearance: auto; + -moz-default-appearance: separator; + margin: 0; + min-width: 2px; +} + +toolbarspacer { + width: 15px; +} + +toolbarpaletteitem { + cursor: grab; +} + +/* Drag and drop feedback */ + +toolbarpaletteitem[place="toolbar"] { + margin-inline: -2px; + border-inline: 2px solid transparent; +} + +toolbarpaletteitem[dragover="left"] { + border-left-color: #000000; +} + +toolbarpaletteitem[dragover="right"] { + border-right-color: #000000; +} diff --git a/toolkit/themes/linux/global/toolbarbutton.css b/toolkit/themes/linux/global/toolbarbutton.css new file mode 100644 index 0000000000..c269b356f0 --- /dev/null +++ b/toolkit/themes/linux/global/toolbarbutton.css @@ -0,0 +1,88 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +/* ===== toolbarbutton.css ===================================================== + == Styles used by the XUL button element. + ======================================================================= */ + +/* ::::: toolbarbutton ::::: */ + +toolbarbutton { + appearance: auto; + -moz-default-appearance: toolbarbutton; + margin: 0; + padding: 3px; +} + +:root[lwtheme-image] toolbarbutton { + text-shadow: none; +} + +.toolbarbutton-text { + margin: 0; +} + +toolbarbutton:where([checked="true"]) { + color: ButtonText; +} + +toolbarbutton:where(:hover) { + color: -moz-buttonhovertext; +} + +toolbarbutton:where(:hover:active:not([disabled="true"])), +toolbarbutton:where([open="true"]) { + color: ButtonText; +} + +toolbarbutton:where([disabled="true"]) { + color: GrayText; +} + +toolbarbutton:-moz-lwtheme:not(:hover, [checked="true"], [open="true"], [disabled="true"]) { + text-shadow: inherit; +} + +/* ::::: toolbarbutton menu ::::: */ + +.toolbarbutton-menu-dropmarker { + appearance: auto; + -moz-default-appearance: toolbarbutton-dropdown; +} + +.toolbarbutton-combined-buttons-dropmarker { + appearance: none; + list-style-image: url("chrome://global/skin/icons/arrow-down-12.svg"); + -moz-context-properties: fill; + fill: currentColor; + width: auto; +} + +/* ::::: toolbarbutton badged ::::: */ +.toolbarbutton-badge-stack > .toolbarbutton-icon[label]:not([label=""]) { + margin-inline-end: 0; +} + +.toolbarbutton-badge { + box-sizing: border-box; + overflow: hidden; + white-space: nowrap; + background-color: #d90000; + font-size: 10px; + padding: 0 2px 1px; + color: #fff; + text-shadow: none; + border-radius: 2px; + box-shadow: 0 1px 0 hsla(0, 100%, 100%, .2) inset, + 0 -1px 0 hsla(0, 0%, 0%, .1) inset, + 0 1px 0 hsla(206, 50%, 10%, .2); + margin: -5px 0 0 !important; + margin-inline-end: -4px !important; + min-width: 14px; + max-width: 20px; + line-height: 10px; + text-align: center; + align-self: start; + justify-self: end; +} |