Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (c) 2014 The Chromium Authors. All rights reserved. | 2 * Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 3 * Use of this source code is governed by a BSD-style license that can be | 3 * Use of this source code is governed by a BSD-style license that can be |
| 4 * found in the LICENSE file. | 4 * found in the LICENSE file. |
| 5 */ | 5 */ |
| 6 | 6 |
| 7 :host { | 7 :host { |
| 8 flex: none; | 8 flex: none; |
| 9 padding: 0 2px; | |
|
dgozman
2015/06/11 16:14:12
This may strike when two toolbars are near each ot
pfeldman
2015/06/11 16:38:07
That's probably fine for now?
| |
| 9 } | 10 } |
| 10 | 11 |
| 11 .toolbar-shadow { | 12 .toolbar-shadow { |
| 12 position: relative; | 13 position: relative; |
| 13 white-space: nowrap; | 14 white-space: nowrap; |
| 14 height: 24px; | 15 height: 26px; |
| 15 overflow: hidden; | 16 overflow: hidden; |
| 16 z-index: 12; | 17 z-index: 12; |
| 17 display: flex; | 18 display: flex; |
| 18 flex: none; | 19 flex: none; |
| 19 align-items: center; | 20 align-items: center; |
| 20 } | 21 } |
| 21 | 22 |
| 22 :host-context(.material) .toolbar-shadow { | |
| 23 height: 28px; | |
| 24 } | |
| 25 | |
| 26 .toolbar-shadow.vertical { | 23 .toolbar-shadow.vertical { |
| 27 flex-direction: column; | 24 flex-direction: column; |
| 28 height: auto; | 25 height: auto; |
| 29 width: 32px; | 26 width: 26px; |
| 30 } | 27 } |
| 31 | 28 |
| 32 .toolbar-shadow.floating { | 29 .toolbar-shadow.floating { |
| 33 flex-direction: column; | 30 flex-direction: column; |
| 34 height: auto; | 31 height: auto; |
| 35 background-color: white; | 32 background-color: white; |
| 36 border: 1px solid #ccc; | 33 border: 1px solid #ccc; |
| 37 margin-top: -1px; | 34 margin-top: -1px; |
| 38 width: 32px; | 35 width: 26px; |
| 39 } | 36 left: -2px; |
| 40 | |
| 41 .toolbar-shadow > div { | |
| 42 display: inline-flex; | |
| 43 overflow: visible; | |
| 44 margin: 0 2px; | |
| 45 } | 37 } |
| 46 | 38 |
| 47 .toolbar-item { | 39 .toolbar-item { |
| 48 position: relative; | 40 position: relative; |
| 49 display: flex; | 41 display: flex; |
| 50 border: 0 transparent none; | 42 border: 1px solid white; |
| 51 background-color: transparent; | 43 background-color: transparent; |
| 52 flex: none; | 44 flex: none; |
| 53 align-items: center; | 45 align-items: center; |
| 54 justify-content: center; | 46 justify-content: center; |
| 55 padding: 0; | 47 padding: 0; |
| 56 height: 24px; | 48 height: 26px; |
| 57 } | 49 border: none; |
|
dgozman
2015/06/11 16:14:12
Two "border" declarations in the same rule.
pfeldman
2015/06/11 16:38:07
Done.
| |
| 58 | |
| 59 :host-context(.material) .toolbar-item { | |
| 60 height: 28px; | |
| 61 } | 50 } |
| 62 | 51 |
| 63 .toolbar-text { | 52 .toolbar-text { |
| 64 white-space: nowrap; | 53 white-space: nowrap; |
| 65 overflow: hidden; | 54 overflow: hidden; |
| 66 margin-left: 6px; | 55 margin-left: 6px; |
| 67 -webkit-user-select: text; | 56 -webkit-user-select: text; |
| 68 } | 57 } |
| 69 | 58 |
| 70 .toolbar-item:active { | 59 .toolbar-item:active { |
| 71 position: relative; | 60 position: relative; |
| 72 z-index: 200; | 61 z-index: 200; |
| 73 } | 62 } |
| 74 | 63 |
| 75 .toolbar-item:hover .toolbar-button-text { | 64 .toolbar-item:hover .toolbar-button-text { |
| 76 opacity: 1; | 65 opacity: 1; |
| 77 } | 66 } |
| 78 | 67 |
| 79 .toolbar-item .toolbar-button-text { | 68 .toolbar-item .toolbar-button-text { |
| 80 font-weight: bold; | 69 font-weight: bold; |
| 81 color: rgba(0, 0, 0, 0.75); | 70 color: rgba(0, 0, 0, 0.75); |
| 82 opacity: 0.8; | 71 opacity: 0.8; |
| 83 } | 72 } |
| 84 | 73 |
| 85 .long-click-glyph { | 74 .long-click-glyph { |
| 86 background-color: rgba(0, 0, 0, 0.75); | 75 background-color: #595959; |
| 87 -webkit-mask-image: url(Images/toolbarButtonGlyphs.png); | 76 -webkit-mask-image: url(Images/toolbarButtonGlyphs.png); |
| 88 -webkit-mask-position: -288px -48px; | 77 -webkit-mask-position: -288px -48px; |
| 89 -webkit-mask-size: 352px 144px; | 78 -webkit-mask-size: 352px 144px; |
| 90 z-index: 1; | 79 z-index: 1; |
| 91 width: 32px; | 80 width: 32px; |
| 92 height: 24px; | 81 height: 26px; |
| 93 } | |
| 94 | |
| 95 .narrow .long-click-glyph { | |
|
dgozman
2015/06/11 16:14:12
Remove makeNarrow.
| |
| 96 top: -2px; | |
| 97 left: -7px; | |
| 98 } | |
| 99 | |
| 100 :host-context(.material) .long-click-glyph { | |
| 101 top: 2px; | |
| 102 } | 82 } |
| 103 | 83 |
| 104 @media (-webkit-min-device-pixel-ratio: 1.5) { | 84 @media (-webkit-min-device-pixel-ratio: 1.5) { |
| 105 .long-click-glyph { | 85 .long-click-glyph { |
| 106 -webkit-mask-image: url(Images/toolbarButtonGlyphs_2x.png); | 86 -webkit-mask-image: url(Images/toolbarButtonGlyphs_2x.png); |
| 107 } | 87 } |
| 108 } /* media */ | 88 } /* media */ |
| 109 | 89 |
| 110 .narrow button.toolbar-item { | 90 button.toolbar-item { |
| 111 width: 26px; | 91 width: 26px; |
| 112 } | 92 } |
| 113 | 93 |
| 114 .narrow button.toolbar-item .glyph { | 94 button.toolbar-item:enabled:hover, |
| 115 margin: 0 -3px; | |
| 116 } | |
| 117 | |
| 118 button.toolbar-item { | |
| 119 width: 30px; | |
| 120 } | |
| 121 | |
| 122 :host-context(.material) button.toolbar-item { | |
| 123 width: 32px; | |
| 124 } | |
| 125 | |
| 126 button.toolbar-item:hover, | |
| 127 .toolbar-item.checkbox:hover, | 95 .toolbar-item.checkbox:hover, |
|
dgozman
2015/06/11 16:14:12
Should this be checkbox:enabled?
pfeldman
2015/06/11 16:38:07
Input is even deeper there + we don't disable them
| |
| 128 .toolbar-counter:hover { | 96 .toolbar-counter:hover { |
| 129 background-color: rgba(110, 110, 110, 0.1); | 97 background-color: rgba(110, 110, 110, 0.1); |
| 98 transition: background-color 150ms cubic-bezier(0, 0, 0.2, 1); | |
| 130 } | 99 } |
| 131 | 100 |
| 132 button.toolbar-item.toggled-on .glyph { | 101 button.toolbar-item.toggled-on .glyph { |
| 133 background-color: rgb(66, 129, 235) !important; | 102 background-color: rgb(66, 129, 235) !important; |
| 134 } | 103 } |
| 135 | 104 |
| 136 button.toolbar-item:hover .glyph { | 105 button.toolbar-item:hover .glyph { |
| 137 opacity: 1; | 106 opacity: 1; |
| 138 } | 107 } |
| 139 | 108 |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 198 -webkit-appearance: none; | 167 -webkit-appearance: none; |
| 199 border: 0; | 168 border: 0; |
| 200 border-radius: 0; | 169 border-radius: 0; |
| 201 padding: 0 15px 0 5px; | 170 padding: 0 15px 0 5px; |
| 202 margin-right: -10px; | 171 margin-right: -10px; |
| 203 position: relative; | 172 position: relative; |
| 204 line-height: 22px; | 173 line-height: 22px; |
| 205 } | 174 } |
| 206 | 175 |
| 207 .toolbar-item.checkbox { | 176 .toolbar-item.checkbox { |
| 208 padding-right: 5px; | 177 padding: 0 5px 0 2px; |
| 209 } | 178 } |
| 210 | 179 |
| 211 .toolbar-item > .glyph { | 180 .toolbar-item > .glyph { |
| 212 -webkit-mask-image: url(Images/toolbarButtonGlyphs.png); | 181 -webkit-mask-image: url(Images/toolbarButtonGlyphs.png); |
| 213 -webkit-mask-size: 352px 144px; | 182 -webkit-mask-size: 352px 144px; |
| 214 opacity: 0.9; | 183 opacity: 0.9; |
| 215 background-color: #595959; | 184 background-color: #595959; |
| 216 z-index: 1; | 185 z-index: 1; |
| 217 width: 32px; | 186 width: 32px; |
| 218 height: 24px; | 187 height: 24px; |
| 219 } | 188 } |
| 220 | 189 |
| 221 :host-context(:not(.material)) .toolbar-item > .glyph { | 190 .toolbar-item > .glyph { |
| 222 position: relative; | 191 position: relative; |
| 223 left: -1px; | 192 left: -3px; |
| 224 } | 193 } |
| 225 | 194 |
| 195 .toolbar-item > .long-click-glyph { | |
| 196 left: -5px; | |
| 197 } | |
| 226 | 198 |
| 227 @media (-webkit-min-device-pixel-ratio: 1.5) { | 199 @media (-webkit-min-device-pixel-ratio: 1.5) { |
| 228 .toolbar-item > .glyph { | 200 .toolbar-item > .glyph { |
| 229 -webkit-mask-image: url(Images/toolbarButtonGlyphs_2x.png); | 201 -webkit-mask-image: url(Images/toolbarButtonGlyphs_2x.png); |
| 230 } | 202 } |
| 231 } /* media */ | 203 } /* media */ |
| 232 | 204 |
| 233 .toolbar-item.emulate-active { | 205 .toolbar-item.emulate-active { |
| 234 background-color: rgb(163,163,163); | 206 background-color: rgb(163,163,163); |
| 235 } | 207 } |
| 236 | 208 |
| 237 .toolbar-counter { | 209 .toolbar-counter { |
| 238 cursor: pointer; | 210 cursor: pointer; |
| 239 padding: 0 2px; | 211 padding: 0 2px; |
| 240 min-width: 30px; | 212 min-width: 26px; |
| 241 } | 213 } |
| 242 | 214 |
| 243 .toolbar-counter-item { | 215 .toolbar-counter-item { |
| 244 margin-left: 6px; | 216 margin-left: 6px; |
| 245 } | 217 } |
| 246 | 218 |
| 247 .toolbar-counter-item label { | 219 .toolbar-counter-item label { |
| 248 cursor: inherit; | 220 cursor: inherit; |
| 249 } | 221 } |
| 250 | 222 |
| 251 .toolbar-counter-item.toolbar-counter-item-first { | 223 .toolbar-counter-item.toolbar-counter-item-first { |
| 252 margin-left: 0; | 224 margin-left: 0; |
| 253 } | 225 } |
| 254 | 226 |
| 255 .toolbar-counter-item > div { | 227 .toolbar-counter-item > div { |
| 256 margin-right: 2px; | 228 margin-right: 2px; |
| 257 } | 229 } |
| 258 | 230 |
| 259 .toolbar-divider { | 231 .toolbar-divider { |
| 260 margin-left: 7px; | 232 background-color: #ccc; |
| 261 border-right: 1px solid hsla(0, 0%, 0%, 0.1); | 233 width: 1px; |
| 262 } | 234 margin: 2px 2px; |
| 263 | 235 height: 17px; |
| 264 :host-context(.material) .toolbar-divider { | |
| 265 height: 18px; | |
| 266 } | 236 } |
| 267 | 237 |
| 268 .toolbar-group-label { | 238 .toolbar-group-label { |
| 269 margin-left: 6px; | 239 margin-left: 5px; |
| 270 margin-right: 3px; | 240 margin-right: 3px; |
| 271 color: #888; | 241 color: #888; |
| 272 } | 242 } |
| 273 | 243 |
| 274 | |
| 275 /* Predefined items */ | 244 /* Predefined items */ |
| 276 | 245 |
| 277 .dock-toolbar-item.toggled-undocked .glyph { | 246 .dock-toolbar-item.toggled-undocked .glyph { |
| 278 -webkit-mask-position: 0 -48px; | 247 -webkit-mask-position: 0 -48px; |
| 279 } | 248 } |
| 280 | 249 |
| 281 .dock-toolbar-item.toggled-bottom .glyph { | 250 .dock-toolbar-item.toggled-bottom .glyph { |
| 282 -webkit-mask-position: -32px -24px; | 251 -webkit-mask-position: -32px -24px; |
| 283 } | 252 } |
| 284 | 253 |
| (...skipping 13 matching lines...) Expand all Loading... | |
| 298 -webkit-mask-position: -224px -24px; | 267 -webkit-mask-position: -224px -24px; |
| 299 } | 268 } |
| 300 | 269 |
| 301 .emulation-toolbar-item .glyph { | 270 .emulation-toolbar-item .glyph { |
| 302 -webkit-mask-position: -160px 0; | 271 -webkit-mask-position: -160px 0; |
| 303 } | 272 } |
| 304 | 273 |
| 305 .emulation-toolbar-item.warning::after { | 274 .emulation-toolbar-item.warning::after { |
| 306 background-image: url(Images/toolbarButtonGlyphs.png); | 275 background-image: url(Images/toolbarButtonGlyphs.png); |
| 307 background-size: 352px 144px; | 276 background-size: 352px 144px; |
| 308 width: 15px; | 277 width: 10px; |
| 309 height: 11px; | 278 height: 12px; |
| 310 content: ""; | 279 content: ""; |
| 311 position: relative; | 280 position: absolute; |
| 312 top: 4px; | 281 right: 3px; |
| 282 bottom: 2px; | |
| 313 background-position: -202px -107px; | 283 background-position: -202px -107px; |
| 314 z-index: 1; | 284 z-index: 1; |
| 315 } | 285 } |
| 316 | 286 |
| 317 @media (-webkit-min-device-pixel-ratio: 1.5) { | 287 @media (-webkit-min-device-pixel-ratio: 1.5) { |
| 318 .emulation-toolbar-item.warning::before { | 288 .emulation-toolbar-item.warning::before { |
| 319 background-image: url(Images/toolbarButtonGlyphs_2x.png); | 289 background-image: url(Images/toolbarButtonGlyphs_2x.png); |
| 320 } | 290 } |
| 321 } /* media */ | 291 } /* media */ |
| 322 | 292 |
| (...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 520 } | 490 } |
| 521 | 491 |
| 522 .playback-rate-button.toggled-on > .toolbar-button-text { | 492 .playback-rate-button.toggled-on > .toolbar-button-text { |
| 523 color: rgb(66, 129, 235); | 493 color: rgb(66, 129, 235); |
| 524 } | 494 } |
| 525 | 495 |
| 526 button.playback-rate-button { | 496 button.playback-rate-button { |
| 527 width: auto; | 497 width: auto; |
| 528 margin-right: 10px; | 498 margin-right: 10px; |
| 529 } | 499 } |
| OLD | NEW |