summaryrefslogtreecommitdiffstats
path: root/comm/mail/themes/shared/mail/variables.css
blob: f1443d1b3eda7ad7c6d6be12f8c039d0f001264f (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
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
/* 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://messenger/skin/layout.css");

/* Default variables */

:host,
:root {
  --transition-duration: 120ms;
  --transition-timing: ease;
  --arrowpanel-background: var(--layout-background-1);
  --arrowpanel-color: var(--layout-color-1);
  --arrowpanel-border-color: var(--layout-border-1);
  --lwt-additional-images: none;
  --lwt-background-alignment: right top;
  --lwt-background-tiling: no-repeat;
  --toolbar-bgcolor: var(--toolbar-non-lwt-bgcolor);
  --toolbar-color: var(--toolbar-non-lwt-textcolor);
  --panelui-subview-transition-duration: 150ms;
  --autocomplete-popup-highlight-background: var(--selected-item-color);
  --autocomplete-popup-highlight-color: var(--selected-item-text-color);
  --button-background-color: var(--layout-background-3);
  --button-hover-text-color: inherit;
  --button-hover-background-color: var(--layout-background-2);
  --button-active-background-color: var(--layout-background-4);
  --button-border-color: var(--layout-border-1);
  --button-border-radius: 3px;
  --button-border-size: 1px;
  --button-text-color: var(--layout-color-1);
  --button-margin: 6px;
  --button-padding: 6px;
  --button-primary-background-color: var(--color-blue-60);
  --button-primary-hover-background-color: color-mix(in srgb, var(--color-blue-50) 50%, var(--color-blue-60));
  --button-primary-active-background-color: var(--color-blue-70);
  --button-primary-text-color: var(--color-white);
  --button-primary-border-color: var(--color-blue-80);
  --button-destructive-background-color: var(--color-red-60);
  --button-destructive-hover-background-color: color-mix(in srgb, var(--color-red-50) 50%, var(--color-red-60));
  --button-destructive-active-background-color: var(--color-red-70);
  --button-destructive-text-color: var(--color-white);
  --button-destructive-border-color: var(--color-red-80);
  --button-link-text-color: var(--color-blue-60);
  --button-link-active-text-color: var(--color-blue-70);
  --button-pressed-shadow: inset 0 1px 3px color-mix(in srgb, var(--color-gray-90) 30%, transparent);
  --button-pressed-indicator-background-color: var(--color-blue-50);
  --button-pressed-indicator-border-color: var(--color-blue-60);
  --button-pressed-indicator-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
  --button-pressed-indicator-padding: 6px;
  --checkbox-border-color: var(--toolbar-field-border-color);
  --checkbox-unchecked-bgcolor: var(--toolbar-field-background-color);
  --checkbox-unchecked-hover-bgcolor: color-mix(in srgb, AccentColor 4%, var(--checkbox-unchecked-bgcolor));
  --checkbox-unchecked-active-bgcolor: var(--button-active-background-color);
  --checkbox-checked-border-color: transparent;
  --checkbox-checked-color: var(--button-primary-color);
  --checkbox-checked-bgcolor: var(--selected-item-color);
  --checkbox-checked-hover-bgcolor: color-mix(in srgb, black 10%, var(--selected-item-color));
  --checkbox-checked-active-bgcolor: color-mix(in srgb, black 20%, var(--selected-item-color));
  --focus-outline-color: var(--toolbar-field-focus-border-color);
  --focus-outline-offset: 2px;
  --focus-outline: 2px solid var(--focus-outline-color);
  --input-border-color: color-mix(in srgb, currentColor 41%, transparent);
  --new-folder-color: var(--color-blue-60);
  --lwt-header-image: none;
  --search-field-placeholder: color-mix(in srgb, currentColor 50%, transparent);
  --selected-item-color: var(--color-blue-60);
  --selected-item-text-color: var(--color-white);
  --splitter-color: var(--sidebar-border-color, var(--layout-border-0));
  --sidebar-border-color: var(--layout-border-0);

  --tab-min-height: 33px;
  --lwt-tabs-border-color: var(--sidebar-border-color);
  --tabs-tabbar-border-size: 1px;
  --toolbar-button-hover-background-color: color-mix(in srgb, currentColor 10%, transparent);
  --toolbar-button-hover-border-color: color-mix(in srgb, currentColor 30%, transparent);
  --toolbar-button-hover-checked-color: color-mix(in srgb, currentColor 20%, transparent);
  --toolbar-button-active-background-color: color-mix(in srgb, currentColor 20%, transparent);
  --toolbar-button-active-border-color: color-mix(in srgb, currentColor 40%, transparent);
  --toolbarbutton-icon-fill-opacity: .85;
  --toolbarbutton-hover-background: var(--lwt-toolbarbutton-hover-background,
                                        rgba(0, 0, 0, .05));
  --toolbarbutton-hover-bordercolor: var(--lwt-toolbarbutton-hover-background,
                                         rgba(0, 0, 0, .25));
  --toolbarbutton-header-bordercolor: var(--lwt-toolbarbutton-hover-background,
                                         rgba(0, 0, 0, .25));
  --toolbarbutton-hover-boxshadow: none;
  --toolbarbutton-active-background: var(--lwt-toolbarbutton-active-background,
                                         rgba(0, 0, 0, .1));
  --toolbarbutton-active-bordercolor: var(--lwt-toolbarbutton-active-background,
                                          rgba(0, 0, 0, .3));
  --toolbarbutton-default-active-boxshadow: rgba(0, 0, 0, .1) inset, 0 0 1px rgba(0, 0, 0, .3);
  --toolbarbutton-active-boxshadow: 0 1px 1px var(--lwt-toolbarbutton-active-background,
                                                  var(--toolbarbutton-default-active-boxshadow)) inset;
  --toolbarbutton-checked-background: var(--lwt-toolbarbutton-hover-background,
                                                    rgba(200, 200, 200, .5));
  --toolbarbutton-icon-fill-attention: var(--lwt-toolbarbutton-icon-fill-attention, #0a84ff);
  --toolbarseparator-color: color-mix(in srgb, currentColor 20%, transparent);
  --toolbar-field-color: var(--layout-color-1);
  --toolbar-field-background-color: var(--layout-background-1);
  --toolbar-field-border-color: var(--layout-border-1);
  --toolbar-field-focus-border-color: AccentColor;
  --toolbar-field-highlight: var(--selected-item-color);
  --toolbar-field-highlight-color: var(--selected-item-text-color);
  --item-focus-selected-border-color: #0060df;
  --default: #4f526d;
  --primary: #0a84ff;
  --select-focus-text-color: var(--selected-item-text-color);
  --select-focus-background-color: var(--selected-item-color);
  /* Wrapper for toolkit variables */
  --button-primary-bgcolor: var(--button-primary-background-color);
  --button-primary-hover-bgcolor: var(--button-primary-hover-background-color);
  --button-primary-active-bgcolor: var(--button-primary-active-background-color);
  --button-primary-color: var(--button-primary-text-color);
}

/* LW-themes enabled */

:root:-moz-lwtheme {
  color: var(--lwt-text-color);
  --button-background: #d2d2d3;
  --button-background-hover: #c2c2c3;
  --button-background-active: #b2b2b3;
  --panel-separator-color: hsla(210, 4%, 10%, 0.14);
  --toolbar-color: var(--lwt-text-color, inherit);
  --toolbar-bgcolor: rgba(255, 255, 255, .4);
  --toolbar-field-border-color: hsla(240, 5%, 5%, 0.25);
  --toolbarbutton-icon-fill-opacity: 1;
  --autocomplete-popup-url-color: hsl(210, 77%, 47%);
}

:root[lwt-tree] {
  --select-focus-background-color: var(--sidebar-highlight-background-color, var(--selected-item-color));
  --select-focus-text-color: var(--sidebar-highlight-text-color,
                                 var(--sidebar-text-color));
  --new-focused-folder-color: var(--sidebar-highlight-text-color, var(--sidebar-text-color));
  --row-grouped-header-bg-color: hsla(0, 0%, 50%, 0.15);
  --row-grouped-header-bg-color-selected: var(--sidebar-highlight-background-color,
                                              hsla(0, 0%, 80%, 0.6));
}

/* Dark themes enabled */

:root[lwt-tree-brighttext] {
  --default: #dcdcdc;
  --primary: #45b1ff;
  --item-focus-selected-border-color: #bebebf;
  --row-grouped-header-bg-color-selected: var(--sidebar-highlight-background-color,
                                              rgba(249, 249, 250, 0.3));
  --button-sidebar-bottom-hover-color: var(--color-blue-40);
}

:root[lwt-popup-brighttext] {
  --autocomplete-popup-url-color: #0a84ff;
  --panel-separator-color: rgba(249, 249, 250, 0.1);
}

@media (prefers-color-scheme: dark) {
  :root {
    --button-background-color: var(--layout-background-3);
    --button-hover-background-color: var(--layout-background-4);
    --button-border-color: var(--layout-border-2);
    --button-active-background-color: var(--layout-background-2);
    --button-primary-border-color: var(--color-blue-50);
    --button-destructive-border-color: var(--color-red-50);
    --button-link-text-color: var(--color-blue-40);
    --button-link-active-text-color: var(--color-blue-50);
    --button-pressed-shadow: inset 0 1px 3px color-mix(in srgb, var(--color-black) 50%, transparent);
    --button-pressed-indicator-background-color: var(--color-blue-30);
    --button-pressed-indicator-border-color: var(--color-blue-40);
    --button-pressed-indicator-shadow: 0 1px 0 rgba(0, 0, 0, 0.25);
    --lwt-accent-color: rgb(24, 24, 26);
    --new-folder-color: var(--color-blue-40);
    --autocomplete-popup-highlight-background: #0060df;
    --selected-item-color: var(--color-blue-50);
    --toolbarbutton-hover-background: var(--lwt-toolbarbutton-hover-background,
                                          rgba(255, 255, 255, .25));
    --toolbarbutton-hover-bordercolor: var(--lwt-toolbarbutton-hover-background,
                                           rgba(255, 255, 255, .5));
    --toolbarbutton-header-bordercolor: var(--lwt-toolbarbutton-hover-background,
                                            rgba(255, 255, 255, .25));
    --toolbarbutton-active-background: var(--lwt-toolbarbutton-active-background,
                                           rgba(255, 255, 255, .4));
    --toolbarbutton-active-bordercolor: var(--lwt-toolbarbutton-active-background,
                                            rgba(255, 255, 255, .7));
    --toolbarbutton-active-boxshadow: none;
    --toolbarbutton-checked-background: rgba(0, 0, 0, .25);
    --toolbarbutton-icon-fill-attention: var(--lwt-toolbarbutton-icon-fill-attention, #45a1ff);
  }

  :root:not([lwt-tree]):-moz-lwtheme {
    --button-background-color: var(--layout-background-3);
    --button-hover-background-color: var(--layout-background-4);
    --button-active-background-color: var(--layout-background-2);
    --button-link-text-color: var(--color-blue-40);
    --button-link-active-text-color: var(--color-blue-50);
    --arrowpanel-border-color: #52525e;
    --chrome-content-separator-color: #52525e;
    --item-focus-selected-border-color: #bebebf;
    --default: #dcdcdc;
    --primary: var(--color-blue-40);
  }

  /* Overwrite the toolkit default theme. */
  :root[lwt-default-theme-in-dark-mode] {
    --lwt-selected-tab-background-color: var(--color-gray-70) !important;
    --lwt-tab-line-color: var(--color-blue-50) !important;
    --sidebar-background-color: var(--layout-background-1) !important;
    --sidebar-highlight-background-color: var(--color-blue-50);
    --sidebar-border-color: var(--layout-border-0) !important;
    --toolbar-field-border-color: var(--color-gray-50) !important;
    --button-link-text-color: var(--color-blue-40);
    --button-link-active-text-color: var(--color-blue-50);
  }
}

/* Special High contrast setting */

@media (prefers-contrast) {
  :root:not(:-moz-lwtheme) {
    --button-color: ButtonText;
    --button-background-color: ButtonFace;
    --button-border-color: ButtonText;
    --button-hover-text-color: SelectedItemText;
    --button-hover-background-color: SelectedItem;
    --button-active-background-color: SelectedItem;
    --button-primary-background-color: SelectedItem;
    --button-primary-hover-background-color: SelectedItem;
    --button-primary-active-background-color: SelectedItem;
    --button-primary-text-color: SelectedItemText;
    --button-primary-border-color: SelectedItem;
    --button-primary-hover-border-color: -moz-DialogText;
    --button-link-text-color: LinkText;
    --button-link-active-text-color: ActiveText;
    --button-pressed-shadow: none;
    --button-pressed-indicator-background-color: SelectedItem;
    --button-pressed-indicator-border-color: SelectedItem;
    --search-field-placeholder: GrayText;
    --selected-item-color: SelectedItem;
    --selected-item-text-color: SelectedItemText;
    --toolbar-button-hover-background-color: SelectedItem;
    --toolbar-button-hover-border-color: SelectedItem;
    --toolbar-button-hover-checked-color: SelectedItem;
    --toolbar-button-active-background-color: SelectedItem;
    --toolbar-button-active-border-color: SelectedItemText;
    --toolbar-field-background-color: Field;
    --toolbar-field-color: FieldText;
    --toolbar-field-border-color: ThreeDShadow;
  }
}

@media not (prefers-contrast) {
  :root:not(:-moz-lwtheme) {
    --buttons-secondary-bgcolor: rgb(240, 240, 244);
    --buttons-secondary-hover-bgcolor: rgb(224, 224, 230);
    --buttons-secondary-active-bgcolor: rgb(207, 207, 216);
    --buttons-secondary-color: rgb(21, 20, 26);
    --arrowpanel-dimmed: color-mix(in srgb, currentColor 12%, transparent);
    --arrowpanel-dimmed-further: color-mix(in srgb, currentColor 20%, transparent);
    --arrowpanel-dimmed-even-further: color-mix(in srgb, currentColor 27%, transparent);
    --error-text-color: #c50042;
  }
}

/* DPI variations */

@media (min-resolution: 1.5dppx) {
  :root {
    --tabs-tabbar-border-size: 0.5px;
  }
}

@media (min-resolution: 3dppx) {
  :root {
    --tabs-tabbar-border-size: 0.33px;
  }
}

/* UI Density customization */

:root[uidensity="compact"] {
  --tab-min-height: 30px;
  --button-margin: 3px;
  --button-padding: 3px;
  --button-pressed-indicator-padding: 9px;
}

:root[uidensity="touch"] {
  --tab-min-height: 39px;
  --button-pressed-indicator-padding: 3px;
}