summaryrefslogtreecommitdiffstats
path: root/toolkit/themes/windows/global/button.css
blob: e33f0d7faa0a4c1827014bf8f934f0b3a362301d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
/* 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-box {
  padding-block: 2px 3px;
  padding-inline: 4px 5px;
}

.button-text {
  margin: 0;
  text-align: center;
}

/* .......... focused state .......... */

button:-moz-focusring {
  outline: 1px dotted;
  outline-offset: -3px;
}

/* .......... default/hover/focused state .......... */

@media (-moz-windows-default-theme: 0) {
  @media (-moz-windows-compositor) {
    /* This is for high-contrast black and white themes on Windows 8 and later,
       where the native appearance renders a different background (which
       appears to be equivalent to the Highlight color) if the button is in the
       default, hovered or focused state. However, if these states overlap with
       the active, disabled, open or checked state, the appearance reverts back
       to the default background. */
    button:is([default="true"],:hover,:focus):not(:active,[disabled="true"],[open="true"],[checked="true"]) {
      color: HighlightText;
    }
  }
}

/* .......... disabled state .......... */

button[disabled="true"] {
  color: GrayText;
}

@media (-moz-windows-classic) {
  button[disabled="true"] {
    color: ThreeDShadow;
    text-shadow: 1px 1px ThreeDHighlight;
  }
}

/* ::::: menu buttons ::::: */

.button-menu-dropmarker {
  appearance: none;
  list-style-image: url("chrome://global/skin/icons/arrow-dropdown-12.svg");
  -moz-context-properties: fill;
  fill: currentColor;
  width: 12px;
  height: 12px;
}

/* ::::: 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/twisty-collapsed.svg");
  -moz-context-properties: fill;
  fill: currentColor;
  min-width: 0;
}

button[type="disclosure"][open="true"] {
  list-style-image: url("chrome://global/skin/icons/twisty-expanded.svg");
}