summaryrefslogtreecommitdiffstats
path: root/browser/themes/shared/downloads/downloads.inc.css
blob: 2fc78cbf9c9fcaff252fca723069824a7c7c5dc4 (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
/* 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/. */

%filter substitution

%define keyfocus #downloadsPanel[keyfocus]
%define notKeyfocus #downloadsPanel:not([keyfocus])
%define item #downloadsListBox > richlistitem
%define itemFinished @item@[state="1"]
%define itemNotFinished @item@:not([state="1"])
%define itemFocused #downloadsListBox:focus > @item@[selected]

/*** Panel and outer controls ***/

#downloadsListBox {
  background: transparent;
  color: inherit;
  appearance: none;
  margin: 0;
}

#emptyDownloads {
  padding: 16px 16px;
  margin: 0;
  pointer-events: none;
}

@item@ > toolbarseparator {
  margin: 0;
  border: 0;
  min-width: 0;
  border-inline-start: 1px solid var(--panel-separator-color);
  appearance: none;
}

.downloadsPanelFooterButton:hover {
  outline: 1px solid var(--arrowpanel-dimmed);
}

.downloadsPanelFooterButton:hover:active,
.downloadsPanelFooterButton[open="true"] {
  outline: 1px solid var(--arrowpanel-dimmed-further);
}

@notKeyfocus@ .downloadsPanelFooterButton:-moz-focusring {
  outline: none;
}

#downloadsSummary {
  background: var(--arrowpanel-dimmed);
  border-top: 1px solid var(--panel-separator-color);
  /* Reserve the same space as the button and separator in download items. */
  padding-inline-end: 59px;
}

#downloadsHistory {
  padding-inline: 14px;
}

@item@ > toolbarseparator {
  margin: 10px 0;
}

@item@:hover > toolbarseparator {
  margin: 0;
}

#downloadsSummary {
  -moz-user-focus: normal;
}

#downloadsSummary > .downloadTypeIcon {
  list-style-image: url("chrome://browser/skin/downloads/download-summary.svg");
}

#downloadsSummaryDescription {
  color: -moz-nativehyperlinktext;
}

:root[lwt-popup-brighttext] #downloadsSummaryDescription {
  color: #75baff; /* --blue-30 */
}

/*** List items and similar elements in the summary ***/

#downloadsSummary,
@item@ {
  height: var(--downloads-item-height);
}

@item@ {
  border-bottom: 1px solid var(--panel-separator-color);
  background: transparent;
  color: inherit;
}

@item@:last-child {
  border-bottom: none;
}

.downloadTypeIcon {
  margin: 8px 13px;
  width: 32px;
  height: 32px;
}

.downloadBlockedBadge {
  margin: 0 5px;
  background: url("chrome://browser/skin/downloads/download-blocked.svg") top right / 16px no-repeat;
}

.downloadBlockedBadge:-moz-locale-dir(rtl) {
  background-position-x: left;
}

@item@[verdict="PotentiallyUnwanted"] .downloadBlockedBadge {
  background-image: url("chrome://browser/skin/warning.svg");
}

@item@[verdict="Uncommon"] .downloadBlockedBadge {
  background-image: url("chrome://browser/skin/info.svg");
}

.downloadContainer {
  margin-inline-end: 13px;
}

#downloadsSummaryDescription,
.downloadTarget {
  margin: 0;
}

#downloadsSummaryDetails,
.downloadDetails {
  font-size: calc(100% * var(--downloads-item-font-size-factor));
  opacity: var(--downloads-item-details-opacity);
  /* Use calc() to keep the height consistent with .downloadTarget, so that the
     progress bar can be vertically centered. */
  margin: 4px 0 calc(1em / var(--downloads-item-font-size-factor) - 1em);
}

/* When hovering the mouse pointer over the item, instead of the normal message
   we display a more detailed one. */
@item@:hover > .downloadMainArea > .downloadContainer > .downloadDetailsNormal,
@item@:not(:hover) > .downloadMainArea > .downloadContainer > .downloadDetailsHover {
  display: none;
}

/* When hovering the action button in particular, instead of the usual hover
   message we display the command associated with the button. */
@item@.downloadHoveringButton > .downloadMainArea > .downloadContainer > .downloadDetailsHover,
@item@:not(.downloadHoveringButton) > .downloadMainArea > .downloadContainer > .downloadDetailsButtonHover {
  display: none;
}

@item@[verdict] > toolbarseparator {
  visibility: hidden;
}

.downloadButton {
  appearance: none;
  min-width: 58px;
  margin: 0;
  border: none;
  background: transparent;
  padding: 0;
  color: inherit !important /* !important overrides button.css on Mac and Linux */;
}

.downloadButton > .button-box > .button-icon {
  width: 16px;
  height: 16px;
  margin: 1px;
  -moz-context-properties: fill;
  fill: currentColor;
}

.downloadButton > .button-box > .button-text {
  margin: 0 !important;
  padding: 0;
}

@itemFinished@[exists] .downloadMainArea:hover,
@item@:not([verdict]) > .downloadButton:hover,
@item@[verdict]:hover {
  background-color: var(--arrowpanel-dimmed);
}

@itemFinished@[exists] > .downloadMainArea:hover:active,
@item@:not([verdict]) > .downloadButton:hover:active,
@item@[verdict]:hover:active {
  background-color: var(--arrowpanel-dimmed-further);
}

@item@[verdict="Malware"]:hover,
@item@[verdict="Malware"]:hover:active {
  background-color: #aa1b08;
  color: white;
}

/*** Button icons ***/

.downloadIconCancel > .button-box > .button-icon {
  list-style-image: url("chrome://browser/skin/panel-icon-cancel.svg");
}

.downloadIconShow > .button-box > .button-icon {
  list-style-image: url("chrome://global/skin/icons/findFile.svg");
}

.downloadIconRetry > .button-box > .button-icon {
  list-style-image: url("chrome://browser/skin/panel-icon-retry.svg");
}

.downloadIconSubviewArrow > .button-box > .button-icon {
  list-style-image: url("chrome://global/skin/icons/arrow-left.svg");
}

.downloadIconSubviewArrow > .button-box > .button-icon:-moz-locale-dir(ltr) {
  transform: scaleX(-1);
}

/*** Blocked subview ***/

#downloadsPanel-blockedSubview > .panel-view-body-unscrollable {
  background-image: url("chrome://browser/skin/warning.svg");
  background-size: 32px 32px;
  background-position: 16px 16px;
  background-repeat: no-repeat;
}

#downloadsPanel-blockedSubview:-moz-locale-dir(rtl) {
  background-position: calc(100% - 16px) 16px;
}

#downloadsPanel-blockedSubview[verdict=Malware] > .panel-view-body-unscrollable {
  background-image: url("chrome://browser/skin/downloads/download-blocked.svg");
}

#downloadsPanel-blockedSubview-title {
  margin-block: 16px;
  font-size: calc(100% / var(--downloads-item-font-size-factor));
}

#downloadsPanel-blockedSubview-details1,
#downloadsPanel-blockedSubview-details2 {
  font-size: calc(100% * var(--downloads-item-font-size-factor));
  margin-bottom: 16px;
  opacity: var(--downloads-item-details-opacity);
}

#downloadsPanel-blockedSubview-title,
#downloadsPanel-blockedSubview-details1,
#downloadsPanel-blockedSubview-details2 {
  margin-inline: 64px 16px;
}

/*** Progressmeter ***/
%include progressmeter.inc.css