summaryrefslogtreecommitdiffstats
path: root/toolkit/themes/windows/global/richlistbox.css
blob: 7aff813299bf2f034b5b5b1f49a4ad69ce34e5bb (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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
/* 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 {
  margin: 2px 4px;
  background-color: Field;
  color: FieldText;
  border: 1px solid ThreeDShadow;
}

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 > richlistitem {
  border: 1px solid transparent;
}

richlistbox.theme-listbox > richlistitem[selected="true"] {
  background-color: -moz-cellhighlight;
  color: -moz-cellhighlighttext;
}

richlistbox.theme-listbox:focus > richlistitem[selected="true"] {
  background-color: SelectedItem;
  color: SelectedItemText;
}

richlistbox.theme-listbox > richlistitem > label {
  margin: 0;
  padding-block: 0 1px;
  padding-inline: 4px 0;
  white-space: nowrap;
}

@media (-moz-windows-default-theme) {
  richlistbox.theme-listbox > richlistitem {
    --listitem-selectedTextColor: rgb(0,0,0);
    --listitem-selectedColor: rgb(217,217,217);
    --listitem-selectedBorder: var(--listitem-selectedColor);
    --listitem-selectedBottomBorder: rgb(204,204,204);
    --listitem-selectedBackground: var(--listitem-selectedColor);
    --listitem-selectedImage: none;
    --listitem-selectedCurrentBorder: rgb(123,195,255);
    --listitem-selectedFocusColor: rgb(205,232,255);
    --listitem-selectedFocusBorder: var(--listitem-selectedFocusColor);
    --listitem-selectedFocusBottomBorder: rgb(165,214,255);
    --listitem-selectedFocusBackground: var(--listitem-selectedFocusColor);
    --listitem-selectedFocusImage: none;
    --listitem-selectedFocusCurrentBorder: var(--listitem-selectedFocusColor);
    --listitem-selectedFocusCurrentBottomBorder: var(--listitem-selectedFocusBottomBorder);
    --listitem-selectedFocusCurrentBackground: var(--listitem-selectedFocusColor);

    color: FieldText;
    margin-inline: 1px;
    padding-block: 1px;
    border-width: 1px;
    background-repeat: no-repeat;
    background-size: 100% 100%;
  }

  richlistbox.theme-listbox > richlistitem[selected="true"] {
    border-top-color: var(--listitem-selectedBorder);
    border-inline-color: var(--listitem-selectedBorder);
    border-bottom-color: var(--listitem-selectedBottomBorder);
    background-image: var(--listitem-selectedImage);
    background-color: var(--listitem-selectedBackground);
    color: var(--listitem-selectedTextColor);
  }

  richlistbox.theme-listbox:focus > richlistitem[selected="true"] {
    border-top-color: var(--listitem-selectedFocusBorder);
    border-inline-color: var(--listitem-selectedFocusBorder);
    border-bottom-color: var(--listitem-selectedFocusBottomBorder);
    background-image: var(--listitem-selectedFocusImage);
    background-color: var(--listitem-selectedFocusBackground);
    color: var(--listitem-selectedTextColor);
  }

  richlistbox.theme-listbox:focus > richlistitem[current="true"] {
    border-color: var(--listitem-selectedCurrentBorder);
    outline: none;
  }

  richlistbox.theme-listbox:focus > richlistitem[selected="true"][current="true"] {
    border-top-color: var(--listitem-selectedFocusCurrentBorder);
    border-inline-color: var(--listitem-selectedFocusCurrentBorder);
    border-bottom-color: var(--listitem-selectedFocusCurrentBottomBorder);
    background-color: var(--listitem-selectedFocusCurrentBackground);
    outline: none;
  }

  @media (-moz-platform: windows-win7) {
    richlistbox.theme-listbox > richlistitem {
      --listitem-selectedBottomBorder: var(--listitem-selectedColor);
      --listitem-selectedBackground: rgba(190,190,190,.15);
      --listitem-selectedImage: linear-gradient(rgba(190,190,190,.1), rgba(190,190,190,.4));
      --listitem-selectedCurrentBorder: rgb(125,162,206);
      --listitem-selectedFocusColor: rgb(132,172,221);
      --listitem-selectedFocusBottomBorder: var(--listitem-selectedFocusColor);
      --listitem-selectedFocusBackground: rgba(131,183,249,.02);
      --listitem-selectedFocusImage: linear-gradient(rgba(131,183,249,.16), rgba(131,183,249,.375));
      --listitem-selectedFocusCurrentBackground: rgba(131,183,249,.15);

      border-radius: 3px;
      box-shadow: inset 0 0 0 1px rgba(255,255,255,.4), inset 0 -1px 0 1px rgba(255,255,255,.2);
    }
  }

  @media (-moz-platform: windows-win8) {
    richlistbox.theme-listbox > richlistitem {
      --listitem-selectedBottomBorder: var(--listitem-selectedColor);
      --listitem-selectedBackground: rgba(190,190,190,.15);
      --listitem-selectedImage: linear-gradient(rgba(190,190,190,.4), rgba(190,190,190,.4));
      --listitem-selectedCurrentBorder: rgb(125,162,206);
      --listitem-selectedFocusColor: rgb(132,172,221);
      --listitem-selectedFocusBottomBorder: var(--listitem-selectedFocusColor);
      --listitem-selectedFocusBackground: rgba(131,183,249,.02);
      --listitem-selectedFocusImage: linear-gradient(rgba(131,183,249,.375), rgba(131,183,249,.375));
      --listitem-selectedFocusCurrentBackground: rgba(131,183,249,.15);
    }
  }
}

listheader {
  color: -moz-DialogText;
}