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

Side by Side Diff: chrome/browser/resources/local_ntp/local_ntp.css

Issue 473583002: [Local NTP] Implementing Material Design styling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
OLDNEW
1 /* Copyright 2013 The Chromium Authors. All rights reserved. 1 /* Copyright 2013 The Chromium Authors. All rights reserved.
2 * Use of this source code is governed by a BSD-style license that can be 2 * Use of this source code is governed by a BSD-style license that can be
3 * found in the LICENSE file. */ 3 * found in the LICENSE file. */
4 @font-face {
5 font-family: 'Roboto2';
6 font-weight: 400;
7 src: local('Roboto'), local('Roboto2-Regular'),
8 url(roboto.woff2) format('woff2'), url(roboto.woff) format('woff');
9 }
10
4 body { 11 body {
5 background-attachment: fixed !important; 12 background-attachment: fixed !important;
6 background-color: white; 13 background-color: white;
7 cursor: default; 14 cursor: default;
8 font-family: arial, sans-serif; 15 font-family: arial, sans-serif;
9 font-size: small; 16 font-size: small;
10 margin: 0; 17 margin: 0;
11 overflow-x: hidden; 18 overflow-x: hidden;
12 } 19 }
13 20
14 #ntp-contents { 21 #ntp-contents {
15 text-align: -webkit-center; 22 text-align: -webkit-center;
16 } 23 }
17 24
18 .non-google-page #ntp-contents { 25 .non-google-page #ntp-contents {
19 position: absolute; 26 position: absolute;
20 top: -webkit-calc(50% - 155px); 27 top: calc(50% - 155px);
21 width: 100%; 28 width: 100%;
22 } 29 }
23 30
24 body.hide-fakebox-logo #logo, 31 body.hide-fakebox-logo #logo,
25 body.hide-fakebox-logo #fakebox { 32 body.hide-fakebox-logo #fakebox {
26 visibility: hidden; 33 visibility: hidden;
27 } 34 }
28 35
29 body.fakebox-disable #fakebox { 36 body.fakebox-disable #fakebox {
30 border-color: rgb(238, 238, 238); 37 border-color: rgb(238, 238, 238);
(...skipping 19 matching lines...) Expand all
50 } 57 }
51 58
52 #fakebox { 59 #fakebox {
53 /* Use GPU compositing if available. */ 60 /* Use GPU compositing if available. */
54 -webkit-transform: translate3d(0, 0, 0); 61 -webkit-transform: translate3d(0, 0, 0);
55 -webkit-transition: -webkit-transform 100ms linear, border-color 100ms linear; 62 -webkit-transition: -webkit-transform 100ms linear, border-color 100ms linear;
56 background-color: #fff; 63 background-color: #fff;
57 border: 1px solid rgb(185, 185, 185); 64 border: 1px solid rgb(185, 185, 185);
58 border-radius: 1px; 65 border-radius: 1px;
59 border-top-color: rgb(160, 160, 160); 66 border-top-color: rgb(160, 160, 160);
60 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
61 cursor: text; 67 cursor: text;
62 font-size: 18px; 68 font-size: 18px;
63 height: 36px; 69 height: 36px;
70 line-height: 36px;
64 max-width: 620px; 71 max-width: 620px;
65 position: relative; 72 position: relative;
66 /* #fakebox width (here and below) should be 2px less than #mv-tiles 73 /* #fakebox width (here and below) should be 2px less than #mv-tiles
67 to account for its border. */ 74 to account for its border. */
68 width: 298px; 75 width: 298px;
69 } 76 }
70 77
71 #fakebox:hover { 78 #fakebox:hover {
72 border: 1px solid rgb(169, 169, 169); 79 border: 1px solid rgb(169, 169, 169);
73 border-top-color: rgb(144, 144, 144); 80 border-top-color: rgb(144, 144, 144);
74 } 81 }
75 82
83 .classical #fakebox {
84 box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
85 }
86
76 body.fakebox-focused #fakebox { 87 body.fakebox-focused #fakebox {
77 border: 1px solid rgb(77, 144, 254); 88 border: 1px solid rgb(77, 144, 254);
78 } 89 }
79 90
80 #fakebox > input { 91 #fakebox > input {
81 bottom: 0; 92 bottom: 0;
82 box-sizing: border-box; 93 box-sizing: border-box;
83 left: 0; 94 left: 0;
84 margin: 0; 95 margin: 0;
85 opacity: 0; 96 opacity: 0;
86 padding-left: 8px; 97 padding-left: 8px;
87 position: absolute; 98 position: absolute;
88 top: 0; 99 top: 0;
89 width: 100%; 100 width: 100%;
90 } 101 }
91 102
92 body.rtl #fakebox > input { 103 body[dir=rtl] #fakebox > input {
93 padding-left: 0; 104 padding-left: 0;
94 padding-right: 8px; 105 padding-right: 8px;
95 right: 0; 106 right: 0;
96 } 107 }
97 108
109 #fakebox-text {
110 color: #bbb;
111 font-family: Roboto2, arial, sans-serif;
112 font-size: 16px;
113 height: 16px;
114 left: 9px;
115 margin-top: 1px;
116 position: absolute;
117 vertical-align: middle;
118 visibility: hidden;
119 }
120
121 body[dir=rtl] #fakebox-text {
122 left: auto;
123 right: 9px;
124 }
125
98 #cursor { 126 #cursor {
99 background: #333; 127 background: #333;
100 bottom: 5px; 128 bottom: 5px;
101 left: 9px; 129 left: 9px;
102 position: absolute; 130 position: absolute;
103 top: 5px; 131 top: 5px;
104 visibility: hidden; 132 visibility: hidden;
105 width: 1px; 133 width: 1px;
106 } 134 }
107 135
108 body.rtl #cursor { 136 body[dir=rtl] #cursor {
109 left: auto; 137 left: auto;
110 right: 9px; 138 right: 9px;
111 } 139 }
112 140
113 @-webkit-keyframes blink { 141 @-webkit-keyframes blink {
114 0% { 142 0% {
115 opacity: 1; 143 opacity: 1;
116 } 144 }
117 61.55% { 145 61.55% {
118 opacity: 0; 146 opacity: 0;
119 } 147 }
120 } 148 }
121 149
150 body.fakebox-drag-focused #fakebox-text,
151 body.fakebox-focused #fakebox-text {
152 visibility: inherit;
153 }
154
122 body.fakebox-drag-focused #cursor { 155 body.fakebox-drag-focused #cursor {
123 visibility: inherit; 156 visibility: inherit;
124 } 157 }
125 158
126 body.fakebox-focused #cursor { 159 body.fakebox-focused #cursor {
127 -webkit-animation: blink 1.3s step-end infinite; 160 -webkit-animation: blink 1.3s step-end infinite;
128 visibility: inherit; 161 visibility: inherit;
129 } 162 }
130 163
131 #most-visited { 164 #most-visited {
132 -webkit-user-select: none; 165 -webkit-user-select: none;
133 margin-top: 51px;
134 text-align: -webkit-center; 166 text-align: -webkit-center;
135 } 167 }
136 168
169 .classical #most-visited {
170 margin-top: 51px;
171 }
172
173 .md #most-visited {
174 margin-top: 50px;
175 }
176
137 #mv-tiles { 177 #mv-tiles {
178 margin: 0;
179 position: relative;
180 text-align: left;
181 }
182
183 body[dir=rtl] #mv-tiles {
184 text-align: right;
185 }
186
187 .classical #mv-tiles {
138 height: calc(2 * 138px); 188 height: calc(2 * 138px);
139 line-height: 138px; 189 line-height: 138px;
140 margin: 0; 190 }
141 position: relative; 191
192 .md #mv-tiles {
193 height: calc(2 * 126px);
194 line-height: 126px;
142 } 195 }
143 196
144 .mv-tile { 197 .mv-tile {
198 display: inline-block;
199 position: relative;
200 vertical-align: top;
201 }
202
203 .classical .mv-tile {
145 -webkit-transition-duration: 200ms; 204 -webkit-transition-duration: 200ms;
146 -webkit-transition-property: -webkit-transform, margin, opacity, width; 205 -webkit-transition-property: -webkit-transform, margin, opacity, width;
147 background: -webkit-linear-gradient(#f2f2f2, #e8e8e8); 206 background: -webkit-linear-gradient(#f2f2f2, #e8e8e8);
148 border: 1px solid transparent; 207 border: 1px solid transparent;
149 border-radius: 3px; 208 border-radius: 3px;
150 box-shadow: inset 0 2px 3px rgba(0, 0, 0, .09); 209 box-shadow: inset 0 2px 3px rgba(0, 0, 0, .09);
151 display: inline-block;
152 height: 83px; 210 height: 83px;
153 margin-left: 10px; 211 margin-left: 10px;
154 margin-right: 10px; /* Total horizontal margins add to TILE_MARGIN. */ 212 margin-right: 10px; /* Total horizontal margins add to TILE_MARGIN. */
155 position: relative;
156 vertical-align: top;
157 width: 138px; 213 width: 138px;
158 } 214 }
159 215
216 .md .mv-tile {
217 -webkit-transition-duration: 200ms;
218 -webkit-transition-property: -webkit-transform, outline-color, box-shadow,
219 margin, opacity, width;
220 background: #f2f2f2;
221 border-radius: 1px;
222 height: 114px;
223 margin-left: 6px;
224 margin-right: 6px;
225 width: 146px;
226 }
227
228 .md.dark .mv-tile {
229 background: #333;
230 }
231
232 .md .mv-page-ready:hover {
233 box-shadow: 0 2px 8px rgba(0,0,0,0.5);
234 }
235
236 .md.dark .mv-page-ready:hover,
237 .md.old-hover .mv-page-ready:hover {
238 box-shadow: none;
239 }
240
241 .mv-tile-inner {
242 visibility: hidden;
243 }
244
245 .mv-page-ready .mv-tile-inner {
246 visibility: visible;
247 }
248
160 /* Class applied to tiles to trigger the blacklist animation. */ 249 /* Class applied to tiles to trigger the blacklist animation. */
161 .mv-tile.mv-blacklist { 250 .mv-tile.mv-blacklist {
162 -webkit-transform: scale(0.5);
163 opacity: 0; 251 opacity: 0;
164 } 252 }
165 253
254 .classical .mv-tile.mv-blacklist {
255 -webkit-transform: scale(0.5);
256 }
257
258 .md .mv-tile.mv-blacklist {
259 -webkit-transform: scale(0, 0);
260 -webkit-transform-origin: 0 41px;
261 margin-left: 0;
262 margin-right: 0;
263 width: 0;
264 }
265
166 .mv-page-ready { 266 .mv-page-ready {
167 border: 1px solid #c0c0c0;
168 cursor: pointer; 267 cursor: pointer;
169 outline: none; 268 outline: none;
170 } 269 }
171 270
172 .mv-page-ready:hover, 271 .classical .mv-page-ready {
173 .mv-page-ready:focus { 272 border: 1px solid #c0c0c0;
174 border-color: #7f7f7f 273 }
274
275 .classical .mv-page-ready:hover,
276 .classical .mv-page-ready:focus {
277 border-color: #7f7f7f;
175 } 278 }
176 279
177 .mv-thumb, 280 .mv-thumb,
178 .mv-mask { 281 .mv-mask {
179 border: none; 282 border: none;
283 border-radius: 2px;
180 cursor: pointer; 284 cursor: pointer;
181 height: 83px; 285 height: 83px;
182 left: 0; 286 left: 0;
183 position: absolute; 287 position: absolute;
184 top: 0; 288 top: 0;
185 width: 138px; 289 width: 138px;
186 } 290 }
187 291
188 .mv-title { 292 .mv-title {
189 border: none; 293 border: none;
190 bottom: -28px; 294 bottom: -28px;
191 height: 18px; 295 height: 18px;
192 left: 0; 296 left: 0;
193 position: absolute; 297 position: absolute;
194 width: 140px; 298 width: 140px;
195 } 299 }
196 300
301 .md .mv-title {
302 bottom: auto;
303 height: 14px;
304 left: 28px;
305 top: 7px;
306 width: 112px;
307 }
308
309 body[dir=rtl] .md .mv-title {
310 left: auto;
311 right: 28px;
312 }
313
314 .md .mv-thumb,
315 .md .mv-thumb-fallback {
316 border-radius: 0;
317 height: 82px;
318 left: 4px;
319 top: 28px;
320 width: 138px;
321 }
322
323 body[dir=rtl] .md .mv-thumb,
324 body[dir=rtl] .md .mv-thumb-fallback {
325 left: auto;
326 right: 4px;
327 }
328
329 .md .mv-thumb-fallback {
330 background: #fff;
331 padding: none;
332 position: absolute;
333 }
334
335 .md.dark .mv-thumb-fallback {
336 background: #555;
337 }
338
339 .md .mv-thumb-fallback .dot {
340 background: #f2f2f2;
341 border-radius: 16px;
342 display: block;
343 height: 32px;
344 left: 50%;
345 margin-left: -16px;
346 margin-top: -16px;
347 position: absolute;
348 top: 50%;
349 width: 32px;
350 }
351
352 .md.dark .mv-thumb-fallback .dot {
353 background: #333;
354 }
355
197 .mv-mask { 356 .mv-mask {
198 opacity: 0.35; 357 background: transparent;
199 pointer-events: none; 358 pointer-events: none;
200 } 359 }
201 360
361 .classical .mv-mask {
362 box-shadow: inset 0 2px 3px rgba(0, 0, 0, 0.09);
363 }
364
365 .md .mv-mask {
366 border: 1px solid transparent;
367 border-radius: 2px;
368 height: 112px;
369 width: 144px;
370 }
371
372 .md.old-hover .mv-page-ready:hover .mv-mask {
373 border-color: #999;
374 }
375 .md.dark .mv-page-ready:hover .mv-mask,
376 .md.old-hover.dark .mv-page-ready:hover .mv-mask {
377 border-color: #888;
378 }
379
202 .mv-page:focus .mv-mask { 380 .mv-page:focus .mv-mask {
381 opacity: 0.35;
382 }
383
384 .classical .mv-page:focus .mv-mask {
203 -webkit-transition: background-color 100ms ease-in-out; 385 -webkit-transition: background-color 100ms ease-in-out;
204 background: -webkit-linear-gradient(rgba(255, 255, 255, 0), 386 background: -webkit-linear-gradient(rgba(255, 255, 255, 0),
205 rgba(255, 255, 255, 0) 80%, rgba(255, 255, 255, 0.9)); 387 rgba(255, 255, 255, 0) 80%, rgba(255, 255, 255, 0.9));
206 background-color: black; 388 background-color: black;
207 } 389 }
208 390
391 .md .mv-page:focus .mv-mask {
392 -webkit-transition: background-color 100ms ease-in-out;
393 background: rgba(0, 0, 0, 0.9);
394 border-color: rgba(0, 0, 0, 0.9);
395 }
396
209 .mv-x-hide .mv-x { 397 .mv-x-hide .mv-x {
210 display: none; 398 display: none;
211 } 399 }
212 400
213 /* An X button to blacklist a tile or hide the notification. */ 401 /* An X button to blacklist a tile or hide the notification. */
214 .mv-x { 402 .mv-x {
215 background: transparent url(images/close_2.png); 403 background-color: transparent;
404 background-image: url(images/close_2.png);
216 border: none; 405 border: none;
217 cursor: default; 406 cursor: default;
218 height: 16px; 407 height: 16px;
219 width: 16px; 408 width: 16px;
220 } 409 }
221 410
222 .mv-x:hover, 411 .mv-x:hover,
223 #mv-notice-x:focus { 412 #mv-notice-x:focus {
224 background: transparent url(images/close_2_hover.png); 413 background-image: url(images/close_2_hover.png);
225 } 414 }
226 415
227 .mv-x:active { 416 .mv-x:active {
228 background: transparent url(images/close_2_active.png); 417 background-image: url(images/close_2_active.png);
229 } 418 }
230 419
231 .mv-page .mv-x { 420 .mv-page .mv-x {
232 -webkit-transition: opacity 150ms; 421 -webkit-transition: opacity 150ms;
233 opacity: 0; 422 opacity: 0;
234 position: absolute; 423 position: absolute;
424 }
425
426 .classical .mv-page .mv-x {
235 right: 2px; 427 right: 2px;
236 top: 2px; 428 top: 2px;
237 } 429 }
238 430
239 body.rtl .mv-page .mv-x { 431 .md .mv-page .mv-x {
432 right: 4px;
433 top: 5px;
434 }
435
436 .md .mv-x {
437 background-color: rgba(187,187,187,0.8);
438 border-radius: 8px;
439 }
440
441 .md.dark .mv-x {
442 background-color: rgba(119,119,119,0.8);
443 }
444
445 body[dir=rtl] .classical .mv-page .mv-x {
240 left: 2px; 446 left: 2px;
241 right: auto; 447 right: auto;
242 } 448 }
243 449
450 body[dir=rtl] .md .mv-page .mv-x {
451 left: 4px;
452 right: auto;
453 }
454
244 .mv-page-ready:hover .mv-x { 455 .mv-page-ready:hover .mv-x {
245 -webkit-transition-delay: 500ms; 456 -webkit-transition-delay: 500ms;
246 opacity: 1; 457 opacity: 1;
247 } 458 }
248 459
249 .mv-page-ready .mv-x:hover { 460 .mv-page-ready .mv-x:hover {
250 -webkit-transition: none; 461 -webkit-transition: none;
251 } 462 }
252 463
253 .mv-favicon { 464 .mv-favicon {
254 background-size: 16px; 465 background-size: 16px;
255 bottom: -8px;
256 height: 16px; 466 height: 16px;
257 left: 61px;
258 pointer-events: none; 467 pointer-events: none;
259 position: absolute; 468 position: absolute;
260 width: 16px; 469 width: 16px;
261 } 470 }
262 471
472 .classical .mv-favicon {
473 bottom: -8px;
474 left: 61px;
475 }
476
477 .md .mv-favicon {
478 left: 6px;
479 top: 6px;
480 }
481
482 body[dir=rtl] .md .mv-favicon {
483 left: auto;
484 right: 6px;
485 top: 6px;
486 }
487
263 /* The notification shown when a tile is blacklisted. */ 488 /* The notification shown when a tile is blacklisted. */
264 #mv-notice { 489 #mv-notice {
265 font-size: 12px; 490 font-size: 12px;
266 font-weight: bold; 491 font-weight: bold;
267 opacity: 1; 492 opacity: 1;
268 padding: 10px 0; 493 padding: 10px 0;
269 } 494 }
270 495
271 #mv-notice span { 496 #mv-notice span {
272 cursor: default; 497 cursor: default;
273 } 498 }
274 499
275 /* Links in the notification. */ 500 /* Links in the notification. */
276 #mv-notice-links span { 501 #mv-notice-links span {
277 -webkit-margin-start: 6px; 502 -webkit-margin-start: 6px;
278 color: rgb(17, 85, 204); 503 color: rgb(17, 85, 204);
279 cursor: pointer; 504 cursor: pointer;
280 outline: none; 505 outline: none;
281 padding: 0 4px; 506 padding: 0 4px;
282 } 507 }
283 508
284 #mv-notice-links span:hover, 509 #mv-notice-links span:hover,
285 #mv-notice-links span:focus, 510 #mv-notice-links span:focus,
286 #recent-tabs:hover { 511 #recent-tabs:hover {
287 text-decoration: underline; 512 text-decoration: underline;
288 } 513 }
289 514
515 .dark #mv-msg {
516 color: #fff;
517 }
518
290 #mv-notice-links .mv-x { 519 #mv-notice-links .mv-x {
291 -webkit-margin-start: 8px; 520 -webkit-margin-start: 8px;
292 outline: none; 521 outline: none;
293 vertical-align: top; 522 vertical-align: top;
294 } 523 }
295 524
296 #mv-notice.mv-notice-delayed-hide { 525 #mv-notice.mv-notice-delayed-hide {
297 -webkit-transition-delay: 10s; 526 -webkit-transition-delay: 10s;
298 -webkit-transition-property: opacity; 527 -webkit-transition-property: opacity;
299 opacity: 0; 528 opacity: 0;
300 } 529 }
301 530
302 #mv-notice.mv-notice-hide { 531 #mv-notice.mv-notice-hide {
303 display: none; 532 display: none;
304 } 533 }
305 534
306 #attribution { 535 #attribution {
307 -webkit-user-select: none; 536 -webkit-user-select: none;
308 bottom: 0; 537 bottom: 0;
309 color: #fff; 538 color: #fff;
310 cursor: default; 539 cursor: default;
311 display: inline-block; 540 display: inline-block;
312 font-size: 13px; 541 font-size: 13px;
313 position: fixed; 542 position: fixed;
314 right: 8px; 543 right: 8px;
315 text-align: left; 544 text-align: left;
316 z-index: -1; 545 z-index: -1;
317 } 546 }
318 547
319 body.rtl #attribution { 548 body[dir=rtl] #attribution {
320 text-align: right; 549 text-align: right;
321 } 550 }
322 551
323 #recent-tabs { 552 #recent-tabs {
324 background: #fff; 553 background: #fff;
325 border: 1px solid #c0c0c0; 554 border: 1px solid #c0c0c0;
326 border-radius: 2px; 555 border-radius: 2px;
327 bottom: 0; 556 bottom: 0;
328 color: rgb(17, 85, 204); 557 color: rgb(17, 85, 204);
329 cursor: pointer; 558 cursor: pointer;
330 font-family: Arial; 559 font-family: Arial;
331 font-size: 14px; 560 font-size: 14px;
332 opacity: 0.9; 561 opacity: 0.9;
333 padding: 3px; 562 padding: 3px;
334 position: fixed; 563 position: fixed;
335 right: 8px; 564 right: 8px;
336 } 565 }
337 566
338 body.rtl #attribution,body.rtl #recent-tabs { 567 body[dir=rtl] #attribution,body[dir=rtl] #recent-tabs {
339 left: 8px; 568 left: 8px;
340 right: auto; 569 right: auto;
341 } 570 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698