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 /* all localizable skin settings shall live here */
7 @import url
("chrome://global/skin/design-system/tokens-platform.css");
8 @import url
("chrome://global/skin/design-system/text-and-typography.css");
10 @import url
("chrome://global/locale/intl.css");
11 @import url
("chrome://global/content/widgets.css");
13 @import url
("close-icon.css");
15 @namespace xul url
("http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul");
16 @namespace html url
("http://www.w3.org/1999/xhtml");
19 --default-focusring-width: 2px;
20 --default-focusring: var
(--default-focusring-width
) dotted
;
22 --arrowpanel-background: Field
;
23 --arrowpanel-color: FieldText
;
24 --arrowpanel-border-color: ThreeDShadow
;
25 --arrowpanel-border-radius: 8px;
26 --arrowpanel-padding: 16px;
28 --arrowpanel-dimmed: color-mix
(in srgb
, currentColor
17%, transparent
);
29 --arrowpanel-dimmed-further: color-mix
(in srgb
, currentColor
30%, transparent
);
31 --panel-separator-color: color-mix
(in srgb
, currentColor
25%, transparent
);
32 --panel-disabled-color: color-mix
(in srgb
, currentColor
40%, transparent
);
34 --popup-notification-body-width: calc
(31em - calc
(2 * var
(--arrowpanel-padding
)));
36 --toolbarbutton-icon-fill: currentColor
;
37 --toolbarbutton-disabled-opacity: 0.4;
39 --toolbar-field-background-color: Field
;
40 --toolbar-field-color: FieldText
;
41 --toolbar-field-border-color: ThreeDShadow
;
42 --toolbar-field-focus-background-color: Field
;
43 --toolbar-field-focus-color: FieldText
;
44 --toolbar-field-focus-border-color: color-mix
(in srgb
, var
(--focus-outline-color
) 50%, transparent
);
46 --toolbar-non-lwt-bgcolor: color-mix
(in srgb
, -moz-dialog
85%, white
);
47 --toolbar-non-lwt-textcolor: -moz-dialogtext
;
48 --toolbar-bgcolor: var
(--toolbar-non-lwt-bgcolor
);
49 --toolbar-color: var
(--toolbar-non-lwt-textcolor
);
52 --toolbar-bgcolor: rgba
(255,255,255,.4);
53 --toolbar-color: var
(--lwt-text-color
, inherit
);
56 /* This color scheme should match --toolbar-color. However, note that
57 * individual toolbars might override this (see ToolbarIconColor and the
58 * brighttext attribute). */
59 --toolbar-color-scheme: light dark
;
60 &[lwt-toolbar
="light"] {
61 --toolbar-color-scheme: light
;
63 &[lwt-toolbar
="dark"] {
64 --toolbar-color-scheme: dark
;
67 @media
(prefers-contrast
) {
68 /* Reduce the opacity of disabled toolbar buttons in order to increase
69 contrast with the enabled state. */
70 --toolbarbutton-disabled-opacity: 0.3;
72 --panel-separator-color: currentColor
;
73 --toolbar-field-focus-border-color: var
(--focus-outline-color
);
76 --panel-disabled-color: GrayText
;
80 background-color: -moz-Dialog
;
81 color: -moz-DialogText
;
89 :is
(menupopup
, panel
):where
([type
=arrow
]) {
90 --panel-background: var
(--arrowpanel-background
);
91 --panel-color: var
(--arrowpanel-color
);
92 --panel-border-color: var
(--arrowpanel-border-color
);
93 --panel-border-radius: var
(--arrowpanel-border-radius
);
94 --panel-padding: var
(--arrowpanel-padding
);
97 /* Lightweight theme roots */
101 &[lwt-popup
="light"] panel
{
105 &[lwt-popup
="dark"] panel
{
110 :root
[lwtheme-image
] {
111 text-shadow: 0 -0.5px 1.5px white
;
114 :root
[lwtheme-image
][lwtheme-brighttext
] {
115 text-shadow: 1px 1px 1.5px black
;
122 margin: 0 !important
;
143 html|
input:where
(:not
([type
=radio i
], [type
=checkbox i
], [type
=range i
])),
146 padding: var
(--space-small
);
147 border: 1px solid var
(--input-border-color
, ThreeDShadow
);
148 border-radius: var
(--border-radius-small
);
150 background-color: var
(--input-bgcolor
, Field
);
151 color: var
(--input-color
, FieldText
);
153 &:where
(:user-invalid
) {
154 border-color: var
(--color-error-outline
);
157 &:where
(:focus-visible
) {
158 outline: var
(--focus-outline
);
159 outline-offset: var
(--focus-outline-inset
);
163 /* adapted from toolkit/themes/shared/menulist-shared.css */
164 html|
select:where
(:not
([size
], [multiple
])) {
167 padding-inline-end: 32px; /* 2 * 10px padding + image's 12px width */
170 border-radius: var
(--border-radius-small
);
172 font-weight: var
(--font-weight-bold
);
174 color: var
(--button-color
, ButtonText
);
175 background-color: var
(--button-bgcolor
, ButtonFace
);
176 background-image: url
(chrome://global
/skin
/icons
/arrow-down-12
.svg
);
177 background-position: right
10px center
;
178 background-repeat: no-repeat
;
179 -moz-context-properties: fill
;
182 &:-moz-locale-dir
(rtl
) {
183 background-position-x: left
10px;
187 background-color: var
(--button-hover-bgcolor
, color-mix
(in srgb
, currentColor
10%, ButtonFace
));
191 background-color: var
(--button-active-bgcolor
, color-mix
(in srgb
, currentColor
20%, ButtonFace
));
195 outline: var
(--focus-outline
);
196 outline-offset: var
(--focus-outline-offset
);
201 font-weight: var
(--font-weight-bold
);
205 margin-inline-start: 23px;
220 /* Label/description formatting */
225 margin-block: 1px 2px;
226 margin-inline: 6px 5px;
233 xul|label
[disabled
="true"] {
239 word-wrap: break-word
;
240 /* We must specify a min-width, otherwise word-wrap:break-word doesn't work.
249 color: var
(--link-color
);
251 text-decoration: underline
;
254 outline: var
(--focus-outline
);
255 outline-offset: var
(--link-focus-outline-offset
);
261 /* Override properties set on buttons, to display the links without unwanted styling */
264 background-color: transparent
;
272 button
.text-link
.button-text
{
273 /* Cancel out the default internal margin */
277 /* Textbox context menu */
279 .textbox-contextmenu:-moz-locale-dir(rtl) {
283 /* Panel footer buttons */
286 margin: 8px 16px 16px;
292 border-radius: var
(--border-radius-small
);
293 color: var
(--button-color
, inherit
);
294 background-color: var
(--button-bgcolor
, color-mix
(in srgb
, currentColor
13%, transparent
));
296 min-height: var
(--size-item-large
);
299 margin-inline: 8px 0;
304 min-height: var
(--size-item-medium
);
305 font-size: var
(--font-size-small
);
314 outline: var
(--focus-outline
);
315 outline-offset: var
(--focus-outline-offset
);
320 background-color: var
(--button-hover-bgcolor
, color-mix
(in srgb
, currentColor
17%, transparent
));
323 background-color: var
(--button-active-bgcolor
, color-mix
(in srgb
, currentColor
30%, transparent
));
327 color: var
(--button-primary-color
);
328 background-color: var
(--button-primary-bgcolor
);
331 background-color: var
(--button-primary-hover-bgcolor
);
334 background-color: var
(--button-primary-active-bgcolor
);
339 &[type
=menu
] > .button-box
> .button-menu-dropmarker
{
342 content: url
("chrome://global/skin/icons/arrow-down-12.svg");
343 -moz-context-properties: fill
;
348 /* Autoscroll popup */
353 /* Resets the native styles in windows and macOS */
355 background-color: transparent
;
356 -moz-window-shadow: none
;
358 --autoscroll-background-image: url
("chrome://global/skin/icons/autoscroll.svg");
359 --panel-border-color: rgba
(0,0,0,.4);
361 --panel-background: rgba
(249,249,250,.8) no-repeat center var
(--autoscroll-background-image
);
362 --panel-shadow-margin: 4px;
363 /* Set pointer-events: none; so that mousemove events can be handled by AutoScrollChild.sys.mjs. */
364 pointer-events: none
;
367 .autoscroller::part(content) {
369 background-clip: padding-box
;
370 box-shadow: 0 0 var
(--panel-shadow-margin
) rgba
(0,0,0,.2);
375 .autoscroller[scrolldir="NS"] {
376 --autoscroll-background-image: url
("chrome://global/skin/icons/autoscroll-vertical.svg");
379 .autoscroller[scrolldir="EW"] {
380 --autoscroll-background-image: url
("chrome://global/skin/icons/autoscroll-horizontal.svg");
383 /* Combobox dropdown renderer */
384 #ContentSelectDropdown > menupopup
{
385 /* The menupopup itself should always be rendered LTR to ensure the scrollbar aligns with
386 * the dropdown arrow on the dropdown widget. If a menuitem is RTL, its style will be set accordingly */
390 #ContentSelectDropdown > menupopup::part
(arrowscrollbox-scrollbox
) {
391 scrollbar-width: var
(--content-select-scrollbar-width
, auto
);
394 #ContentSelectDropdown > menupopup
[customoptionstyling
="true"]::part
(arrowscrollbox
) {
395 /* When authors specify a custom background, we use background-image to specify the author-supplied color.
396 * In that case, we don't want stuff like custom appearance or custom
397 * backgrounds, so we make sure to apply it on top of the default background. */
398 background-image: var
(--content-select-background-image
, none
);
399 background-color: -moz-Combobox
;
402 /* Full width separator in select */
403 #ContentSelectDropdown menuseparator
{
407 /* Indent options in optgroups */
408 .contentSelectDropdown-ingroup .menu-iconic-text {
409 padding-inline-start: 2em;
413 color: var
(--text-color-deemphasized
);