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

Side by Side Diff: chrome/browser/resources/ntp4/new_tab.css

Issue 12038090: Layout the NTP footer with flexboxes. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: move separator out of webstore link Created 7 years, 10 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
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/new_tab.html » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 /* Copyright (c) 2012 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 4
5 html { 5 html {
6 /* It's necessary to put this here instead of in body in order to get the 6 /* It's necessary to put this here instead of in body in order to get the
7 background-size of 100% to work properly */ 7 background-size of 100% to work properly */
8 height: 100%; 8 height: 100%;
9 overflow: hidden; 9 overflow: hidden;
10 } 10 }
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 } 173 }
174 174
175 /* TODO(estade): remove this border hack and replace with a webkit-gradient 175 /* TODO(estade): remove this border hack and replace with a webkit-gradient
176 * border-image on #footer once WebKit supports border-image-slice. 176 * border-image on #footer once WebKit supports border-image-slice.
177 * See https://bugs.webkit.org/show_bug.cgi?id=20127 */ 177 * See https://bugs.webkit.org/show_bug.cgi?id=20127 */
178 #footer-border { 178 #footer-border {
179 height: 1px; 179 height: 1px;
180 } 180 }
181 181
182 #footer-content { 182 #footer-content {
183 -webkit-box-align: center; 183 -webkit-align-items: center;
184 display: -webkit-box; 184 -webkit-justify-content: space-between;
185 display: -webkit-flex;
185 height: 49px; 186 height: 49px;
186 } 187 }
187 188
188 #footer-content > * { 189 #footer-content > * {
189 margin: 0 9px; 190 margin: 0 9px;
190 } 191 }
191 192
192 #logo-img { 193 #logo-img {
193 display: inline-block; 194 display: inline-block;
194 margin-top: 4px; 195 margin-top: 4px;
(...skipping 183 matching lines...) Expand 10 before | Expand all | Expand 10 after
378 margin: 0; 379 margin: 0;
379 max-width: 150px; 380 max-width: 150px;
380 min-width: 90px; 381 min-width: 90px;
381 outline: none; 382 outline: none;
382 padding: 0; 383 padding: 0;
383 position: absolute; 384 position: absolute;
384 top: 0; 385 top: 0;
385 z-index: 5; 386 z-index: 5;
386 } 387 }
387 388
389 /* Footer buttons. ************************************************************/
390
388 #chrome-web-store-link { 391 #chrome-web-store-link {
392 -webkit-order: 3;
389 -webkit-padding-end: 12px; 393 -webkit-padding-end: 12px;
390 /* Match transition delay of recently closed button. */ 394 /* Match transition delay of recently closed button. */
391 -webkit-transition-delay: 100ms; 395 -webkit-transition-delay: 100ms;
392 color: inherit; 396 color: inherit;
393 cursor: pointer; 397 cursor: pointer;
394 display: inline-block; 398 display: inline-block;
395 margin: 0; 399 margin: 0;
396 text-decoration: none; 400 text-decoration: none;
397 white-space: nowrap; 401 white-space: nowrap;
398 } 402 }
399 403
400 #chrome-web-store-title { 404 #chrome-web-store-title {
401 -webkit-padding-end: 36px; 405 -webkit-padding-end: 36px;
402 -webkit-padding-start: 15px; 406 -webkit-padding-start: 15px;
403 background: url('chrome://theme/IDR_WEBSTORE_ICON_24') right 50% no-repeat; 407 background: url('chrome://theme/IDR_WEBSTORE_ICON_24') right 50% no-repeat;
404 display: inline-block; 408 display: inline-block;
405 line-height: 49px; 409 line-height: 49px;
406 } 410 }
407 411
412 #footer-menu-container .invisible {
413 -webkit-order: -1;
414 visibility: hidden;
415 }
416
408 #chrome-web-store-link:hover { 417 #chrome-web-store-link:hover {
409 color: #666; 418 color: #666;
410 } 419 }
411 420
412 html[dir='rtl'] #chrome-web-store-title { 421 html[dir='rtl'] #chrome-web-store-title {
413 background-position-x: left; 422 background-position-x: left;
414 } 423 }
415 424
416 #vertical-separator { 425 #vertical-separator {
426 -webkit-order: -1;
417 background-color: rgb(178, 178, 178); 427 background-color: rgb(178, 178, 178);
418 display: none; 428 display: inline-block;
419 height: 20px; 429 height: 20px;
420 margin: 0; 430 margin: 0;
421 vertical-align: middle; 431 vertical-align: middle;
432 visibility: hidden;
422 width: 1px; 433 width: 1px;
423 } 434 }
424 435
425 /* Show the separator only if one of the menus is visible. */ 436 /* Show the separator only if one of the menus is visible. */
426 .footer-menu-button:not([hidden]) ~ #vertical-separator { 437 .footer-menu-button:not(.invisible) ~ #chrome-web-store-link:not(.invisible)
427 display: block; 438 ~ #vertical-separator {
439 -webkit-order: 2;
Evan Stade 2013/02/06 22:09:14 I think the order should always remain the same, o
dconnelly 2013/02/06 23:09:24 I don't understand--this just selects the separato
Evan Stade 2013/02/06 23:15:43 my question is why it moves when it is invisible.
440 visibility: visible;
428 } 441 }
429 442
430 /* In trash mode, hide the menus and web store link. */ 443 /* In trash mode, hide the menus and web store link. */
431 #footer.showing-trash-mode #chrome-web-store-link,
432 #footer.showing-trash-mode .menu-container { 444 #footer.showing-trash-mode .menu-container {
433 -webkit-transition-delay: 0; 445 -webkit-transition-delay: 0;
434 opacity: 0; 446 opacity: 0;
435 visibility: hidden; 447 visibility: hidden;
436 } 448 }
437 449
438 #footer .menu-container { 450 #footer .menu-container {
439 -webkit-box-align: center; 451 -webkit-align-items: center;
452 -webkit-flex-direction: row;
453 -webkit-justify-content: flex-end;
440 /* Put menus in a box so the order can easily be swapped. */ 454 /* Put menus in a box so the order can easily be swapped. */
441 display: -webkit-box; 455 display: -webkit-flex;
442 height: 100%; 456 height: 100%;
443 margin: 0; 457 margin: 0;
444 } 458 }
445 459
460 #recently-closed-menu-button:not(.invisible) {
461 -webkit-order: 1;
462 }
463
464 #other-sessions-menu-button:not(.invisible) {
465 -webkit-order: 0;
466 }
467
446 .other-sessions-promo-message { 468 .other-sessions-promo-message {
447 display: none; 469 display: none;
448 padding: 0; 470 padding: 0;
449 } 471 }
450 472
451 .other-sessions-promo-message:only-child { 473 .other-sessions-promo-message:only-child {
452 display: block; 474 display: block;
453 } 475 }
454 476
455 .other-sessions-promo-message p { 477 .other-sessions-promo-message p {
456 margin: 0; 478 margin: 0;
457 } 479 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/resources/ntp4/new_tab.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698