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; | 9 padding: 0 2px; |
| 10 } | 10 } |
| 11 | 11 |
| 12 .toolbar-shadow { | 12 .toolbar-shadow { |
| 13 position: relative; | 13 position: relative; |
| 14 white-space: nowrap; | 14 white-space: nowrap; |
| 15 height: 26px; | 15 height: 26px; |
| 16 contain: strict; | |
|
dgozman
2017/05/08 23:16:48
Does this break wrapping toolbars?
einbinder
2017/05/09 22:00:45
It did. done.
| |
| 16 overflow: hidden; | 17 overflow: hidden; |
| 17 z-index: 12; | 18 z-index: 12; |
| 18 display: flex; | 19 display: flex; |
| 19 flex: none; | 20 flex: none; |
| 20 align-items: center; | 21 align-items: center; |
| 21 } | 22 } |
| 22 | 23 |
| 23 .toolbar-shadow.wrappable { | 24 .toolbar-shadow.wrappable { |
| 24 flex-wrap: wrap; | 25 flex-wrap: wrap; |
| 25 overflow: visible; | 26 overflow: visible; |
| 26 } | 27 } |
| 27 | 28 |
| 28 .toolbar-shadow.wrappable-reverse { | 29 .toolbar-shadow.wrappable-reverse { |
| 29 flex-direction: row-reverse; | 30 flex-direction: row-reverse; |
| 30 } | 31 } |
| 31 | 32 |
| 32 .toolbar-shadow.toolbar-grow-vertical { | 33 .toolbar-shadow.toolbar-grow-vertical { |
| 33 height: initial; | 34 height: initial; |
| 34 } | 35 } |
| 35 | 36 |
| 36 .toolbar-shadow.vertical { | 37 .toolbar-shadow.vertical { |
| 37 flex-direction: column; | 38 flex-direction: column; |
| 38 height: auto; | 39 height: auto; |
| 40 contain: none; | |
| 39 align-items: flex-start; | 41 align-items: flex-start; |
| 40 } | 42 } |
| 41 | 43 |
| 42 .toolbar-item { | 44 .toolbar-item { |
| 43 position: relative; | 45 position: relative; |
| 44 display: flex; | 46 display: flex; |
| 45 background-color: transparent; | 47 background-color: transparent; |
| 46 flex: none; | 48 flex: none; |
| 47 align-items: center; | 49 align-items: center; |
| 48 justify-content: center; | 50 justify-content: center; |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 203 border: 0; | 205 border: 0; |
| 204 border-radius: 0; | 206 border-radius: 0; |
| 205 padding: 0 13px 0 5px; | 207 padding: 0 13px 0 5px; |
| 206 margin-right: -10px; | 208 margin-right: -10px; |
| 207 position: relative; | 209 position: relative; |
| 208 height: 22px; | 210 height: 22px; |
| 209 margin-top: 2px; | 211 margin-top: 2px; |
| 210 margin-bottom: 2px; | 212 margin-bottom: 2px; |
| 211 } | 213 } |
| 212 | 214 |
| 215 .console-context { | |
|
dgozman
2017/05/08 23:16:49
This does not deserve to be in toolbar.css
einbinder
2017/05/09 22:00:45
Where can this go? Should I inject a stylesheet in
dgozman
2017/05/09 23:11:12
Wrap your custom element with shadow root. See Dev
einbinder
2017/05/11 00:07:03
Done.
| |
| 216 height: 26px; | |
| 217 text-align: left; | |
| 218 } | |
| 219 | |
| 220 .console-context[data-keyboard-focus="true"]:focus::before { | |
| 221 content: ""; | |
| 222 position: absolute; | |
| 223 top:2px; | |
| 224 left:2px; | |
| 225 right:2px; | |
| 226 bottom:2px; | |
| 227 background: rgba(0, 0, 0, 0.08); | |
| 228 } | |
| 213 select.toolbar-item[data-keyboard-focus="true"]:focus { | 229 select.toolbar-item[data-keyboard-focus="true"]:focus { |
| 214 background: rgba(0, 0, 0, 0.08); | 230 background: rgba(0, 0, 0, 0.08); |
| 215 border-radius: 2px; | 231 border-radius: 2px; |
| 216 } | 232 } |
| 217 | 233 |
| 218 select.toolbar-item[data-keyboard-focus="true"]:focus > * { | 234 select.toolbar-item[data-keyboard-focus="true"]:focus > * { |
| 219 background: white; | 235 background: white; |
| 220 } | 236 } |
| 221 | 237 |
| 222 /* Input */ | 238 /* Input */ |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 289 left: 2px; | 305 left: 2px; |
| 290 right: 2px; | 306 right: 2px; |
| 291 background-color: rgba(0, 0, 0, 0.08); | 307 background-color: rgba(0, 0, 0, 0.08); |
| 292 border-radius: 2px; | 308 border-radius: 2px; |
| 293 content: ""; | 309 content: ""; |
| 294 } | 310 } |
| 295 | 311 |
| 296 .toolbar-shadow.floating { | 312 .toolbar-shadow.floating { |
| 297 flex-direction: column; | 313 flex-direction: column; |
| 298 height: auto; | 314 height: auto; |
| 315 contain: none; | |
| 299 background-color: white; | 316 background-color: white; |
| 300 border: 1px solid #ccc; | 317 border: 1px solid #ccc; |
| 301 margin-top: -1px; | 318 margin-top: -1px; |
| 302 width: 28px; | 319 width: 28px; |
| 303 left: -2px; | 320 left: -2px; |
| 304 } | 321 } |
| 305 | 322 |
| 306 span.toolbar-select-container.toolbar-item.warning { | 323 .console-context.warning { |
| 307 background: #ffd7d7; | 324 background: #ffd7d7; |
| 308 padding: 0 5px 0 0; | |
| 309 margin-right: 1px; | |
| 310 } | 325 } |
| OLD | NEW |