Home | History | Annotate | Download | only in elements
      1 <!--
      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
      4   -- found in the LICENSE file.
      5   -->
      6 
      7 <polymer-element name="kb-altkey" attributes="char" on-pointerover="{{over}}"
      8     on-pointerout="{{out}}" on-pointerup="{{up}}">
      9   <template>
     10     <style>
     11       :host {
     12         -webkit-box-flex: 1;
     13         background-position: center center;
     14         background-repeat: no-repeat;
     15         background-size: contain;
     16         display: -webkit-box;
     17         position: relative;
     18       }
     19 
     20       :host(.active) {
     21         background-color: #dddddd
     22       }
     23 
     24       :host(:first-child) {
     25         border-top-left-radius: 2px;
     26         border-bottom-left-radius: 2px;
     27       }
     28 
     29       :host(:not(:first-child)) .key{
     30         border-left: solid 2px #dddddd;
     31       }
     32 
     33       :host(:last-child) {
     34         border-top-right-radius: 2px;
     35         border-bottom-right-radius: 2px;
     36       }
     37 
     38       :host .key {
     39         bottom: 0;
     40         color: #666666;
     41         font-family: roboto-bold;
     42         font-weight: 100;
     43         height: 1.2em;
     44         left: 0;
     45         margin: auto;
     46         position: absolute;
     47         right: 0;
     48         top: 0;
     49         text-align: center;
     50       }
     51     </style>
     52     <div class="key">
     53       <content></content>
     54     </div>
     55   </template>
     56 </polymer-element>
     57