Commit | Line | Data |
---|---|---|
64897c3a RK |
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 file, | |
3 | * You can obtain one at http://mozilla.org/MPL/2.0/. */ | |
4 | ||
7327c957 RK |
5 | /* === BEGIN downloads.inc.css === */ |
6 | ||
64897c3a RK |
7 | /*** Panel and outer controls ***/ |
8 | ||
64897c3a RK |
9 | #downloadsPanel > .panel-arrowcontainer > .panel-arrowcontent { |
10 | padding: 0; | |
11 | } | |
12 | ||
13 | #downloadsListBox { | |
64897c3a RK |
14 | background-color: transparent; |
15 | padding: 4px; | |
16 | color: inherit; | |
17 | } | |
18 | ||
990cba4b RK |
19 | #downloadsPanel:not([hasdownloads]) > #downloadsListBox { |
20 | display: none; | |
21 | } | |
22 | ||
589b5528 RK |
23 | #downloadsPanel[hasdownloads] > #emptyDownloads { |
24 | display: none; | |
25 | } | |
26 | ||
27 | #emptyDownloads { | |
28 | padding: 10px 20px; | |
29 | max-width: 40ch; | |
30 | } | |
31 | ||
7327c957 RK |
32 | #downloadsSummary { |
33 | padding: 8px 38px 8px 12px; | |
64897c3a | 34 | cursor: pointer; |
7327c957 | 35 | -moz-user-focus: normal; |
64897c3a RK |
36 | } |
37 | ||
7327c957 RK |
38 | #downloadsSummary > .downloadTypeIcon { |
39 | list-style-image: url("chrome://browser/skin/downloads/download-summary.png"); | |
64897c3a RK |
40 | } |
41 | ||
7327c957 RK |
42 | #downloadsSummaryDescription { |
43 | color: #3333FF; | |
649b5d38 RK |
44 | } |
45 | ||
7327c957 RK |
46 | #downloadsHistory { |
47 | cursor: pointer; | |
48 | margin: 4px !important; | |
49 | color: #3333FF; | |
649b5d38 RK |
50 | } |
51 | ||
7327c957 | 52 | #downloadsHistory > .button-box { |
649b5d38 RK |
53 | } |
54 | ||
7327c957 | 55 | /*** List items and similar elements in the summary ***/ |
64897c3a | 56 | |
990cba4b | 57 | #downloadsSummary, |
64897c3a | 58 | richlistitem[type="download"] { |
7327c957 | 59 | height: var(--downloads-item-height); |
dae45075 | 60 | padding-inline-end: 0; |
990cba4b RK |
61 | color: inherit; |
62 | } | |
63 | ||
990cba4b | 64 | richlistitem[type="download"] { |
64897c3a | 65 | margin: 0; |
7327c957 RK |
66 | /*border-top: 1px solid var(--downloads-item-border-top-color);*/ |
67 | border-bottom: 1px solid var(--downloads-item-border-bottom-color); | |
64897c3a | 68 | background: transparent; |
fcfb76ce | 69 | padding: 8px; |
64897c3a RK |
70 | } |
71 | ||
72 | richlistitem[type="download"]:first-child { | |
73 | /* border-top: 1px solid transparent;*/ | |
74 | } | |
75 | ||
64897c3a | 76 | .downloadTypeIcon { |
dae45075 | 77 | margin-inline-end: 8px; |
64897c3a | 78 | /* Prevent flickering when changing states. */ |
a6757852 RK |
79 | height: 32px; |
80 | width: 32px; | |
64897c3a RK |
81 | } |
82 | ||
83 | .blockedIcon { | |
84 | list-style-image: url("chrome://global/skin/icons/alert-error.gif"); | |
85 | } | |
86 | ||
5968ec68 RK |
87 | /* We hold .downloadTarget, .downloadProgress and .downloadDetails inside of |
88 | a vbox with class .downloadContainer. We set the font-size of the entire | |
7327c957 | 89 | container to --downloads-item-font-size-factor because: |
5968ec68 RK |
90 | |
91 | 1) This is the size that we want .downloadDetails to be | |
92 | 2) The container's width is set by localizers by &downloadDetails.width;, | |
93 | which is a ch unit. Since this is the value that should control the | |
94 | panel width, we apply it to the outer container to constrain | |
95 | .downloadTarget and .downloadProgress. | |
96 | ||
97 | Finally, since we want .downloadTarget's font-size to be at 100% of the | |
98 | font-size of .downloadContainer's parent, we use calc to go from the | |
99 | smaller font-size back to the original font-size. | |
100 | */ | |
101 | #downloadsSummaryDetails, | |
102 | .downloadContainer { | |
7327c957 | 103 | font-size: calc(100% * var(--downloads-item-font-size-factor)); |
5968ec68 RK |
104 | } |
105 | ||
106 | #downloadsSummaryDescription, | |
64897c3a | 107 | .downloadTarget { |
7327c957 | 108 | margin-bottom: var(--downloads-item-target-margin-bottom); |
64897c3a RK |
109 | cursor: inherit; |
110 | } | |
111 | ||
5968ec68 | 112 | .downloadTarget { |
7327c957 | 113 | font-size: calc(100% / var(--downloads-item-font-size-factor)); |
5968ec68 RK |
114 | } |
115 | ||
116 | #downloadsSummaryDetails, | |
64897c3a | 117 | .downloadDetails { |
7327c957 RK |
118 | margin-top: var(--downloads-item-details-margin-top); |
119 | opacity: var(--downloads-item-details-opacity); | |
64897c3a RK |
120 | cursor: inherit; |
121 | } | |
122 | ||
123 | .downloadButton { | |
64897c3a RK |
124 | min-width: 0; |
125 | min-height: 0; | |
5968ec68 RK |
126 | margin: 3px; |
127 | /* border: none; */ | |
64897c3a RK |
128 | background: transparent; |
129 | padding: 5px; | |
130 | list-style-image: url("chrome://browser/skin/downloads/buttons.png"); | |
131 | } | |
132 | ||
133 | .downloadButton > .button-box { | |
134 | padding: 0; | |
135 | } | |
136 | ||
7327c957 RK |
137 | |
138 | /* === END downloads.inc.css === */ | |
139 | ||
140 | /*** Panel and outer controls ***/ | |
141 | ||
142 | #downloadsFooter { | |
143 | } | |
144 | ||
145 | #downloadsFooter:hover { | |
146 | } | |
147 | ||
148 | #downloadsFooter:hover:active { | |
149 | } | |
150 | ||
151 | #downloadsPanel[keyfocus] #downloadsSummary:focus, | |
152 | #downloadsPanel[keyfocus] #downloadsHistory:focus { | |
153 | outline: 1px #008484 dotted; | |
154 | outline-offset: -1px; | |
155 | } | |
156 | ||
157 | #downloadsPanel[keyfocus] #downloadsSummary:focus { | |
158 | outline-offset: -5px; | |
159 | } | |
160 | ||
161 | #downloadsHistory > .button-box { | |
162 | /* Hide the border so we don't display an inner focus ring. */ | |
163 | border: none; | |
164 | } | |
165 | ||
166 | /*** List items and similar elements in the summary ***/ | |
167 | ||
168 | :root { | |
169 | --downloads-item-height: 7em; | |
170 | /*--downloads-item-border-top-color: hsla(0,0%,100%,.3);*/ | |
171 | --downloads-item-border-bottom-color: #9C9CFF; | |
172 | --downloads-item-font-size-factor: 0.9; | |
173 | --downloads-item-target-margin-bottom: 6px; | |
174 | --downloads-item-details-margin-top: 0; | |
175 | --downloads-item-details-opacity: 0.6; | |
176 | } | |
177 | ||
178 | .downloadButton > .button-box { | |
179 | border: 1px solid transparent; | |
180 | } | |
181 | ||
5968ec68 RK |
182 | #downloadsPanel[keyfocus] .downloadButton:focus > .button-box { |
183 | border: 1px dotted #008484; | |
184 | } | |
185 | ||
7c1e433b RK |
186 | richlistitem[type="download"][verdict="PotentiallyUnwanted"] .blockedIcon { |
187 | list-style-image: url("chrome://global/skin/icons/warning.svg"); | |
188 | } | |
189 | ||
190 | richlistitem[type="download"][verdict="Uncommon"] .blockedIcon { | |
191 | list-style-image: url("chrome://global/skin/icons/information-32.png"); | |
192 | } | |
193 | ||
64897c3a RK |
194 | /*** Highlighted list items ***/ |
195 | ||
7327c957 RK |
196 | #downloadsListBox:-moz-focusring > richlistitem[type="download"][selected] { |
197 | outline: 1px #008484 dotted; | |
198 | outline-offset: -1px; | |
199 | /*-moz-outline-radius: 3px;*/ | |
200 | } | |
201 | ||
ed1a91c6 | 202 | /* #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"][exists]:hover { */ |
e75098eb | 203 | #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"]:hover { |
5968ec68 | 204 | border-radius: 3px; |
64897c3a RK |
205 | background-color: #794900; |
206 | color: #FFCF00; | |
207 | cursor: pointer; | |
208 | } | |
209 | ||
649b5d38 RK |
210 | #downloadsPanel:not([keyfocus]) > #downloadsListBox > richlistitem[type="download"][state="1"][exists]:hover:active { |
211 | } | |
212 | ||
64897c3a RK |
213 | /*** Button icons ***/ |
214 | ||
7c1e433b | 215 | .downloadButton.downloadIconCancel { |
fcfb76ce | 216 | -moz-image-region: rect(0px, 16px, 16px, 0px); |
64897c3a | 217 | } |
7c1e433b RK |
218 | richlistitem[type="download"]:hover > stack > .downloadButton.downloadIconCancel, |
219 | richlistitem[type="download"]:hover > stack > .downloadButton.downloadIconCancel:hover, | |
220 | richlistitem[type="download"]:hover > stack > .downloadButton.downloadIconCancel:active { | |
fcfb76ce | 221 | -moz-image-region: rect(0px, 32px, 16px, 16px); |
64897c3a RK |
222 | } |
223 | ||
7c1e433b | 224 | .downloadButton.downloadIconShow { |
fcfb76ce | 225 | -moz-image-region: rect(16px, 16px, 32px, 0px); |
64897c3a | 226 | } |
7c1e433b RK |
227 | richlistitem[type="download"]:hover > stack > .downloadButton.downloadIconShow, |
228 | richlistitem[type="download"]:hover > stack > .downloadButton.downloadIconShow:hover, | |
229 | richlistitem[type="download"]:hover > stack > .downloadButton.downloadIconShow:active { | |
fcfb76ce | 230 | -moz-image-region: rect(16px, 32px, 32px, 16px); |
64897c3a RK |
231 | } |
232 | ||
7c1e433b | 233 | .downloadButton.downloadIconRetry { |
fcfb76ce | 234 | -moz-image-region: rect(32px, 16px, 48px, 0px); |
64897c3a | 235 | } |
7c1e433b RK |
236 | richlistitem[type="download"]:hover > stack > .downloadButton.downloadIconRetry, |
237 | richlistitem[type="download"]:hover > stack > .downloadButton.downloadIconRetry:hover, | |
238 | richlistitem[type="download"]:hover > stack > .downloadButton.downloadIconRetry:active { | |
fcfb76ce | 239 | -moz-image-region: rect(32px, 32px, 48px, 16px); |
64897c3a | 240 | } |