Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: chrome/browser/resources/md_downloads/item.html

Issue 2374473003: MD Downloads: remove most deprecated CSS imports (Closed)
Patch Set: 80 col wrap Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 <link rel="import" href="chrome://resources/html/action_link.html"> 1 <link rel="import" href="chrome://resources/html/action_link.html">
2 <link rel="import" href="chrome://resources/html/cr.html"> 2 <link rel="import" href="chrome://resources/html/cr.html">
3 <link rel="import" href="chrome://resources/html/polymer.html"> 3 <link rel="import" href="chrome://resources/html/polymer.html">
4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l"> 4 <link rel="import" href="chrome://resources/polymer/v1_0/iron-icon/iron-icon.htm l">
5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html"> 5 <link rel="import" href="chrome://resources/polymer/v1_0/paper-button/paper-butt on.html">
6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button-light.html"> 6 <link rel="import" href="chrome://resources/polymer/v1_0/paper-icon-button/paper -icon-button-light.html">
7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-progress/paper-pr ogress.html"> 7 <link rel="import" href="chrome://resources/polymer/v1_0/paper-progress/paper-pr ogress.html">
8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.htm l"> 8 <link rel="import" href="chrome://resources/polymer/v1_0/paper-styles/shadow.htm l">
9 <link rel="import" href="chrome://downloads/action_service.html"> 9 <link rel="import" href="chrome://downloads/action_service.html">
10 <link rel="import" href="chrome://downloads/constants.html"> 10 <link rel="import" href="chrome://downloads/constants.html">
11 <link rel="import" href="chrome://downloads/i18n_setup.html"> 11 <link rel="import" href="chrome://downloads/i18n_setup.html">
12 <link rel="import" href="chrome://downloads/icons.html"> 12 <link rel="import" href="chrome://downloads/icons.html">
13 13
14 <dom-module id="downloads-item"> 14 <dom-module id="downloads-item">
15 <template> 15 <template>
16 <style>
17 :host {
18 display: flex;
19 flex-direction: column;
20 }
21
22 [hidden] {
23 display: none !important;
24 }
25
26 paper-button {
27 font-weight: 500;
28 margin: 0;
29 min-width: auto;
30 }
31
32 #date {
33 color: rgb(104, 113, 116);
34 font-size: 100%;
35 font-weight: 500;
36 margin: 24px auto 10px;
37 width: var(--downloads-card-width);
38 }
39
40 #date:empty {
41 display: none;
42 }
43
44 #content {
45 background: white;
46 border-radius: 2px;
47 display: flex;
48 flex: none;
49 margin: 6px auto;
50 min-height: 103px;
51 position: relative;
52 width: var(--downloads-card-width);
53 }
54
55 #content.is-active {
56 @apply(--shadow-elevation-2dp);
Dan Beam 2016/09/27 01:25:22 I wasn't able to trick rietveld into adding multip
57 }
58
59 #content:not(.is-active) {
60 background: rgba(255, 255, 255, .6);
61 box-shadow: 0 2px 2px 0 rgba(0, 0, 0, .03),
62 0 1px 4px 0 rgba(0, 0, 0, .048),
63 0 3px 1px -2px rgba(0, 0, 0, .12);
64 }
65
66 #details {
67 -webkit-border-start: 1px #d8d8d8 solid;
68 -webkit-padding-end: 16px;
69 -webkit-padding-start: var(--downloads-card-margin);
70 display: flex;
71 flex: 1;
72 flex-direction: column;
73 min-width: 0; /* This allows #url to ellide correctly. */
74 padding-bottom: 12px;
75 padding-top: 16px;
76 }
77
78 #content:not(.is-active) #details {
79 color: rgba(186, 186, 186, .6);
80 }
81
82 #content:not(.is-active) #name {
83 text-decoration: line-through;
84 }
85
86 .icon-wrapper {
87 align-self: center;
88 flex: none;
89 justify-content: center;
90 margin: 0 24px;
91 }
92
93 .icon {
94 height: 32px;
95 width: 32px;
96 }
97
98 #content:-webkit-any(.show-progress, .dangerous) #file-icon-wrapper {
99 /* TODO(dbeam): animate from top-aligned to centered when items finish?
100 */
101 align-self: flex-start;
102 padding-top: 16px;
103 }
104
105 #content:not(.is-active) .icon {
106 -webkit-filter: grayscale(100%);
107 opacity: .5;
108 }
109
110 #danger-icon {
111 height: 32px;
112 width: 32px;
113 }
114
115 #danger-icon[icon='cr:warning'] {
116 color: rgb(255, 193, 7);
117 }
118
119 #danger-icon[icon='downloads:remove-circle'] {
120 color: rgb(244, 67, 54);
121 }
122
123 #name,
124 #file-link,
125 #url {
126 max-width: 100%;
127 }
128
129 #name,
130 #file-link {
131 font-weight: 500;
132 word-break: break-all;
133 }
134
135 #name {
136 -webkit-margin-end: 12px; /* Only really affects #tag. */
137 }
138
139 #pause-or-resume,
140 .is-active :-webkit-any(#name, #file-link, #show) {
141 color: rgb(51, 103, 214);
142 }
143
144 #tag {
145 color: #5a5a5a;
146 font-weight: 500;
147 }
148
149 #url {
150 color: inherit;
151 margin-top: 6px;
152 min-height: 0;
153 overflow: hidden;
154 text-decoration: none;
155 text-overflow: ellipsis;
156 white-space: nowrap;
157 }
158
159 .is-active #url {
160 color: #969696;
161 }
162
163 #progress,
164 #description:not(:empty),
165 .controls {
166 margin-top: 16px;
167 }
168
169 .is-active #description {
170 color: #616161;
171 }
172
173 .dangerous #description {
174 color: rgb(239, 108, 0);
175 }
176
177 #progress {
178 --paper-progress-active-color: rgb(54, 126, 237);
179 --paper-progress-container-color: rgb(223, 222, 223);
180 width: auto;
181 }
182
183 .controls {
184 -webkit-margin-start: -.57em;
185 }
186
187 #cancel,
188 #retry,
189 .keep,
190 .discard {
191 color: #5a5a5a;
192 }
193
194 #show {
195 margin: .7em .57em;
196 }
197
198 #controlled-by {
199 -webkit-margin-start: 8px;
200 }
201
202 #controlled-by,
203 #controlled-by a {
204 color: #5a5a5a;
205 }
206
207 .is-active #controlled-by {
208 color: #333;
209 }
210
211 .is-active #controlled-by a {
212 color: rgb(51, 103, 214);
213 }
214
215 #remove-wrapper {
216 align-self: flex-start;
217 margin: 0;
218 }
219
220 #remove {
221 color: #969696;
222 font-size: 16px;
223 height: 32px;
224 line-height: 17px; /* TODO(dbeam): why is this necesssary? */
225 width: 32px;
226 }
227
228 #incognito {
229 bottom: 20px;
230 content: -webkit-image-set(
231 url(chrome://downloads/1x/incognito_marker.png) 1x,
232 url(chrome://downloads/2x/incognito_marker.png) 2x);
233 position: absolute;
234 right: 10px;
235 }
236 </style>
237
16 <h3 id="date">[[computeDate_(data.hideDate, data.since_string, data.date_str ing)]]</h3> 238 <h3 id="date">[[computeDate_(data.hideDate, data.since_string, data.date_str ing)]]</h3>
17 239
18 <div id="content" on-dragstart="onDragStart_" 240 <div id="content" on-dragstart="onDragStart_"
19 class$="[[computeClass_(isActive_, isDangerous_, showProgress_)]]"> 241 class$="[[computeClass_(isActive_, isDangerous_, showProgress_)]]">
20 <div id="file-icon-wrapper" class="icon-wrapper"> 242 <div id="file-icon-wrapper" class="icon-wrapper">
21 <img class="icon" id="file-icon" alt="" hidden="[[isDangerous_]]"> 243 <img class="icon" id="file-icon" alt="" hidden="[[isDangerous_]]">
22 <iron-icon id="danger-icon" 244 <iron-icon id="danger-icon"
23 icon$="[[computeDangerIcon_(isDangerous_, data.danger_type)]]" 245 icon$="[[computeDangerIcon_(isDangerous_, data.danger_type)]]"
24 hidden="[[!isDangerous_]]"></iron-icon> 246 hidden="[[!isDangerous_]]"></iron-icon>
25 </div> 247 </div>
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
94 style$="[[computeRemoveStyle_(isDangerous_, showCancel_)]]" 316 style$="[[computeRemoveStyle_(isDangerous_, showCancel_)]]"
95 on-tap="onRemoveTap_">&#x2715;</button> 317 on-tap="onRemoveTap_">&#x2715;</button>
96 </div> 318 </div>
97 319
98 <div id="incognito" title="$i18n{inIncognito}" hidden="[[!data.otr]]"> 320 <div id="incognito" title="$i18n{inIncognito}" hidden="[[!data.otr]]">
99 </div> 321 </div>
100 </div> 322 </div>
101 323
102 </template> 324 </template>
103 <link rel="import" type="css" href="chrome://resources/css/action_link.css"> 325 <link rel="import" type="css" href="chrome://resources/css/action_link.css">
104 <link rel="import" type="css" href="chrome://downloads/shared_style.css">
105 <link rel="import" type="css" href="chrome://downloads/item.css">
106 <script src="chrome://downloads/item.js"></script> 326 <script src="chrome://downloads/item.js"></script>
107 </dom-module> 327 </dom-module>
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698