Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 <!-- | 1 <!-- |
| 2 -- Copyright 2013 The Chromium Authors. All rights reserved. | 2 -- Copyright 2013 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 <polymer-element name="kb-shift-key" attributes="lowerCaseKeysetId | 7 <polymer-element name="kb-shift-key" attributes="lowerCaseKeysetId |
| 8 upperCaseKeysetId" class="shift dark" char="Shift" on-pointerout="{{out}}" | 8 upperCaseKeysetId" class="shift dark" char="Shift" on-pointerout="{{out}}" |
| 9 extends="kb-key"> | 9 extends="kb-key"> |
| 10 <template> | 10 <template> |
| 11 <style> | 11 <style> |
| 12 :host() { | 12 .shift-light-wrapper { |
| 13 border-radius: 2px; | 13 bottom: 3px; |
| 14 border-style: solid; | 14 height: 10%; |
| 15 border-width: 1px 0; | 15 margin: 0; |
| 16 color: #ffffff; | 16 padding: 0; |
| 17 font-family: roboto-bold; | 17 position: absolute; |
| 18 font-weight: 300; | 18 width: 100%; |
| 19 } | 19 } |
| 20 | 20 |
| 21 :host(.active) { | 21 .shift-light { |
| 22 -webkit-box-shadow: inset 0 1px #969696, inset 0 -1px #6f6f6f; | 22 -webkit-box-shadow: inset 0 1px #101010, inset 0 -1px #444444; |
| 23 background-image: -webkit-linear-gradient(#8b8b8b, #7d7d7d); | 23 background-image: -webkit-linear-gradient(#101010, #000000); |
| 24 background-size: cover; | 24 border: solid; |
| 25 border-bottom-color: #5b5b5b; | 25 border-bottom-color: #1d1d1d; |
| 26 border-top-color: #a4a4a4; | 26 border-top-color: #2d2d2d; |
| 27 } | 27 border-width: 1px 0; |
| 28 | 28 height: 0.3em; |
| 29 :host() .key { | 29 margin: 0 auto; |
| 30 background-image: none; | 30 position: relative; |
| 31 background-position: center; | 31 width: 1.8em; |
| 32 background-repeat: no-repeat; | 32 } |
| 33 background-size: contain; | 33 </style> |
| 34 bottom: 0; | |
| 35 font-size: 70%; | |
| 36 height: 70%; | |
| 37 left: 0; | |
| 38 margin: auto; | |
| 39 position: absolute; | |
| 40 right: 0; | |
| 41 top: 0; | |
| 42 width: auto; | |
| 43 } | |
| 44 | |
| 45 :host() .shift-light-wrapper { | |
| 46 bottom: 3px; | |
| 47 height: 10%; | |
| 48 margin: 0; | |
| 49 padding: 0; | |
| 50 position: absolute; | |
| 51 width: 100%; | |
| 52 } | |
| 53 | |
| 54 :host() .shift-light { | |
| 55 -webkit-box-shadow: inset 0 1px #101010, inset 0 -1px #444444; | |
| 56 background-image: -webkit-linear-gradient(#101010, #000000); | |
| 57 border: solid; | |
| 58 border-bottom-color: #1d1d1d; | |
| 59 border-top-color: #2d2d2d; | |
| 60 border-width: 1px 0; | |
| 61 height: 0.3em; | |
| 62 margin: 0 auto; | |
| 63 position: relative; | |
| 64 width: 1.8em; | |
| 65 } | |
| 66 </style> | |
| 67 <div id="key" class="key"> </div> | |
| 68 <div class="shift-light-wrapper"> | 34 <div class="shift-light-wrapper"> |
| 69 <div class="shift-light"> </div> | 35 <div class="shift-light"> </div> |
| 70 </div> | 36 </div> |
| 37 <shadow></shadow> | |
|
rsadam
2014/03/28 19:00:15
<shadow> reuses the ancestors shadow-root, which m
| |
| 71 </template> | 38 </template> |
| 72 </polymer-element> | 39 </polymer-element> |
| OLD | NEW |