Polymer elements added to third_party/polymer.
[chromium-blink-merge.git] / third_party / polymer / components / paper-focusable / demo.html
blob9fd58a2ad6a06f463c2a3a978249798b7bfc7ac2
1 <!doctype html>
2 <!--
3 Copyright 2013 The Polymer Authors. All rights reserved.
4 Use of this source code is governed by a BSD-style
5 license that can be found in the LICENSE file.
6 -->
7 <html>
8 <head>
10 <meta charset="utf-8">
11 <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
12 <meta name="viewport" content="width=device-width, initial-scale=1, user-scalable=no">
14 <title>paper-focusable</title>
16 <script src="../platform/platform.js"></script>
18 <link href="../font-roboto/roboto.html" rel="import">
19 <link href="paper-focusable.html" rel="import">
21 <style shim-shadowdom>
22 body {
23 font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
24 margin: 0;
25 padding: 24px;
26 -webkit-user-select: none;
27 -moz-user-select: none;
28 -ms-user-select: none;
29 user-select: none;
30 -webkit-tap-highlight-color: rgba(0,0,0,0);
31 -webkit-touch-callout: none;
32 -webkit-transform: translateZ(0);
33 transform: translateZ(0);
36 section {
37 padding: 20px 0;
39 width: 37em;
42 section > div {
43 padding: 14px 0;
45 font-size: 1.5em;
48 paper-focusable[active].focusable-active {
50 background: #9c27b0;
54 paper-focusable[active].focusable-toggle {
56 background: #9c27b0;
60 paper-focusable[pressed].focusable-pressed {
62 background: #ff80ab;
66 paper-focusable[focused].focusable-focused {
68 background: #ec407a;
72 paper-focusable[disabled].focusable-disabled {
74 opacity: 0.5;
79 </style>
80 </head>
81 <body unresolved>
83 <div class="main-descriptor">
85 The "paper-focused" item allows you to handle focusing on items.
87 </div>
89 <section>
91 <div>Focusable Item - active</div>
93 <paper-focusable class="focusable-active">
95 This paragraph shows a style with the "paper-focusable[active]" selector.
96 It functions much like using the "pressed" attribute.
97 </paper-focusable>
99 </section>
101 <section>
103 <div>Focusable Item - pressed</div>
105 <paper-focusable class="focusable-pressed">
107 This paragraph shows a style with the "paper-focusable[pressed]" selector.
108 It functions much like usin the "active" attribute.
110 </paper-focusable>
112 </section>
114 <section>
116 <div>Focusable Item - focused</div>
118 <paper-focusable class="focusable-focused">
120 This paragraph shows a style with the "paper-focusable[focused]" selector.
121 This will be active on items that are focused but not active or pressed.
123 </paper-focusable>
125 </section>
127 <section>
129 <div>Focusable Item - disabled</div>
131 <paper-focusable disabled class="focusable-disabled">
133 This paragraph shows a style with the "disabled" attribute.
134 The "paper-focusable" item with a "disabled" attribute cannot be selected,
135 and will prevent mouse actions.
137 </paper-focusable>
139 </section>
141 <section>
143 <div>Focusable Item - toggle</div>
145 <paper-focusable isToggle class="focusable-toggle">
147 This paragraph shows a style with the "isToggle" attribute.
148 The "paper-focusable" item with an "isToggle" toggles the active state on each tap.
150 </paper-focusable>
152 </section>
154 </body>
155 </html>