Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* Copyright 2016 The Chromium Authors. All rights reserved. | 1 /* Copyright 2016 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 :host { | 5 :host { |
| 6 align-items: center; | 6 align-items: center; |
| 7 background: rgb(245, 245, 245); | 7 background: rgb(245, 245, 245); |
| 8 color: rgb(51, 51, 51); | 8 color: rgb(51, 51, 51); |
| 9 cursor: default; | 9 cursor: default; |
| 10 display: flex; | |
|
fukino
2016/02/02 06:24:20
I think this shouldn't be removed. If it is block,
ryoh
2016/02/02 08:15:49
We no longer use flex. Just a block.
I removed fle
| |
| 11 flex-direction: column; | 10 flex-direction: column; |
| 12 font-size: 10pt; | 11 font-size: 10pt; |
| 13 justify-content: space-around; | 12 justify-content: space-around; |
| 14 overflow: hidden; | 13 overflow: hidden; |
| 15 } | 14 } |
| 16 | 15 |
| 17 /* Track item. */ | 16 /* Track item. */ |
| 18 .track { | 17 .track { |
| 19 align-items: center; | 18 align-items: center; |
| 19 background-color: rgba(255, 255, 255, 0.9); | |
| 20 display: flex; | 20 display: flex; |
| 21 height: 48px; | 21 height: 48px; |
| 22 justify-content: space-between; | 22 justify-content: space-between; |
| 23 width: 100%; | 23 width: 100%; |
| 24 } | 24 } |
| 25 | 25 |
| 26 /* Track icon. */ | 26 :host[expanded] .track { |
| 27 bottom: 0px; | |
| 28 position: absolute; | |
| 29 } | |
| 30 | |
| 31 /* artwork icon(expanded) */ | |
| 27 .track .icon-wrapper { | 32 .track .icon-wrapper { |
| 28 flex: none; | 33 flex: none; |
| 29 height: 48px; | 34 height: 48px; |
| 30 width: 48px; | 35 width: 48px; |
| 31 } | 36 } |
| 32 | 37 |
| 33 .icon-wrapper .icon { | 38 :host[expanded] .icon { |
| 39 visibility: hidden; | |
| 40 } | |
| 41 | |
| 42 :host(:not([expanded])) .icon { | |
| 34 background-position: center; | 43 background-position: center; |
| 35 background-repeat: no-repeat; | 44 background-repeat: no-repeat; |
| 36 background-size: contain; | 45 background-size: contain; |
| 37 height: 48px; | 46 height: 48px; |
| 38 pointer-events: none; | 47 pointer-events: none; |
| 39 position: absolute; | 48 position: absolute; |
| 40 width: 48px; | 49 width: 48px; |
| 41 } | 50 } |
| 42 | 51 |
| 43 .icon-wrapper .icon-background { | 52 /* artwork icon(expanded) */ |
| 44 background: -webkit-image-set( | 53 |
| 45 url(../assets/100/playlist_now_playing.png) 1x, | 54 .track-wrapper { |
| 46 url(../assets/200/playlist_now_playing.png) 2x) | 55 background-color: rgb(32, 32, 34); |
| 47 center | 56 position: relative; |
| 48 no-repeat; | 57 } |
| 49 height: 48px; | 58 |
| 50 pointer-events: none; | 59 :host:not([artwork-available])[expanded] .track-wrapper { |
| 51 position: absolute; | 60 height: 320px; |
| 52 width: 48px; | 61 position: relative; |
| 62 width: 320px; | |
|
fukino
2016/02/02 06:24:20
The width of audio player is not necessarily 320px
ryoh
2016/02/02 08:15:49
Done.
| |
| 63 } | |
| 64 | |
| 65 .icon-expanded { | |
| 66 background-size: 0 0; | |
| 67 } | |
| 68 | |
| 69 :host:not([expanded]) .icon-unavailable-expanded { | |
| 70 background-size: 0 0; | |
| 71 } | |
| 72 | |
| 73 :host:not([artwork-available])[expanded] .icon-unavailable-expanded { | |
| 74 background-image: -webkit-image-set( | |
| 75 url(../assets/100/player_no_artwork.png) 1x, | |
|
fukino
2016/02/02 06:24:20
As player_no_artwork.png is big, could you reduce
ryoh
2016/02/02 08:15:49
Done.
| |
| 76 url(../assets/200/player_no_artwork.png) 2x); | |
| 77 background-position: center; | |
| 78 background-repeat: no-repeat; | |
| 79 height: calc(320px - 48px); | |
| 80 width: 320px; | |
| 81 } | |
| 82 | |
| 83 :host[artwork-available][expanded] .icon-expanded { | |
| 84 background-position: center; | |
| 85 background-repeat: no-repeat; | |
| 86 background-size: contain; | |
| 87 height: 320px; | |
| 88 width: 320px; | |
| 53 } | 89 } |
| 54 | 90 |
| 55 /* expand icon. */ | 91 /* expand icon. */ |
| 56 .track .expand { | 92 .track .expand { |
| 57 background-position: center; | 93 background-position: center; |
| 58 background-repeat: no-repeat; | 94 background-repeat: no-repeat; |
| 59 flex: none; | 95 flex: none; |
| 60 height: 48px; | 96 height: 48px; |
| 61 width: 48px; | 97 width: 48px; |
| 62 } | 98 } |
| 63 | 99 |
| 64 :host(:not([available])) > .track .expand { | 100 :host:not([expanded]) .track .expand { |
| 65 background-image: -webkit-image-set( | |
| 66 url(../assets/100/player_cover_open.png) 1x, | |
| 67 url(../assets/200/player_cover_open.png) 2x); | |
| 68 opacity: 0.1; | |
| 69 } | |
| 70 | |
| 71 :host([available]:not([expanded])) > .track .expand { | |
| 72 background-image: -webkit-image-set( | 101 background-image: -webkit-image-set( |
| 73 url(../assets/100/player_cover_open.png) 1x, | 102 url(../assets/100/player_cover_open.png) 1x, |
| 74 url(../assets/200/player_cover_open.png) 2x); | 103 url(../assets/200/player_cover_open.png) 2x); |
| 75 } | 104 } |
| 76 | 105 |
| 77 :host([available][expanded]) > .track .expand { | 106 :host[expanded] .track .expand { |
| 78 background-image: -webkit-image-set( | 107 background-image: -webkit-image-set( |
| 79 url(../assets/100/player_cover_close.png) 1x, | 108 url(../assets/100/player_cover_close.png) 1x, |
| 80 url(../assets/200/player_cover_close.png) 2x); | 109 url(../assets/200/player_cover_close.png) 2x); |
| 81 } | 110 } |
| 82 | 111 |
| 83 /* Track data. */ | 112 /* Track data. */ |
| 84 | 113 |
| 85 .track .data { | 114 .track .data { |
| 86 display: flex; | 115 display: flex; |
| 87 flex-direction: column; | 116 flex-direction: column; |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 101 .track .data .data-title { | 130 .track .data .data-title { |
| 102 color: rgb(51, 51, 51); | 131 color: rgb(51, 51, 51); |
| 103 font-size: 13px; | 132 font-size: 13px; |
| 104 font-weight: 500; | 133 font-weight: 500; |
| 105 } | 134 } |
| 106 | 135 |
| 107 .track .data .data-artist { | 136 .track .data .data-artist { |
| 108 color: rgb(100, 100, 100); | 137 color: rgb(100, 100, 100); |
| 109 font-size: 12px; | 138 font-size: 12px; |
| 110 } | 139 } |
| OLD | NEW |