3 Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
4 This code may only be used under the BSD style license found at http://polymer.github.io/LICENSE.txt
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS.txt
6 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS.txt
7 Code distributed by Google as part of the polymer project is also
8 subject to an additional IP rights grant found at http://polymer.github.io/PATENTS.txt
14 <meta charset=
"utf-8">
15 <meta http-equiv=
"X-UA-Compatible" content=
"IE=edge,chrome=1">
16 <meta name=
"viewport" content=
"width=device-width, minimum-scale=1.0, initial-scale=1.0, user-scalable=yes">
18 <title>paper-dropdown-menu
</title>
20 <script src=
"../webcomponentsjs/webcomponents.js"></script>
22 <link href=
"../core-collapse/core-collapse.html" rel=
"import">
23 <link href=
"../core-menu/core-menu.html" rel=
"import">
24 <link href=
"../paper-dropdown/paper-dropdown.html" rel=
"import">
25 <link href=
"../paper-item/paper-item.html" rel=
"import">
27 <link href=
"paper-dropdown-menu.html" rel=
"import">
29 <style shim-shadowdom
>
31 font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
35 -webkit-tap-highlight-color: rgba(
0,
0,
0,
0);
36 -webkit-touch-callout: none;
48 html /deep/ paper-dropdown-menu {
49 box-sizing: border-box;
53 html /deep/ core-menu {
54 box-sizing: border-box;
61 text-overflow: ellipsis;
64 html /deep/ core-collapse {
65 border:
1px solid #ccc;
69 html /deep/ core-overlay {
70 border:
1px solid #ccc;
83 .dropdown.colored::shadow #ripple,
84 .dropdown.colored::shadow #background {
85 border:
1px solid #
0f9d58;
86 background-color: #b7e1cd;
94 <template is=
"auto-binding">
98 <div>Absolutely positioned dropdowns
</div>
100 <paper-dropdown-menu label=
"Your favorite pastry">
101 <paper-dropdown class=
"dropdown">
102 <core-menu class=
"menu">
103 <template repeat=
"{{pastries}}">
104 <paper-item>{{}}
</paper-item>
108 </paper-dropdown-menu>
112 <paper-dropdown-menu label=
"Disabled" disabled
>
113 <paper-dropdown class=
"dropdown">
114 <core-menu class=
"menu">
115 <paper-item>Should not see this
</paper-item>
118 </paper-dropdown-menu>
124 <div>Layered dropdowns
</div>
126 <button onclick=
"document.getElementById('overlay').toggle()">toggle core-overlay
</button>
128 <core-overlay id=
"overlay">
130 <paper-dropdown-menu label=
"Your favorite pastry">
131 <paper-dropdown layered
class=
"dropdown">
132 <core-menu class=
"menu">
133 <template repeat=
"{{pastries}}">
134 <paper-item>{{}}
</paper-item>
138 </paper-dropdown-menu>
142 <button onclick=
"document.getElementById('collapse').toggle()">toggle core-collapse
</button>
146 <core-collapse id=
"collapse">
148 <paper-dropdown-menu label=
"Your favorite pastry">
149 <paper-dropdown layered
class=
"dropdown">
150 <core-menu class=
"menu">
151 <template repeat=
"{{pastries}}">
152 <paper-item>{{}}
</paper-item>
156 </paper-dropdown-menu>
164 <div>Custom styling
</div>
166 <paper-dropdown-menu label=
"Constrained height">
167 <paper-dropdown class=
"dropdown constrained-height">
168 <core-menu class=
"menu">
169 <template repeat=
"{{pastries}}">
170 <paper-item>{{}}
</paper-item>
174 </paper-dropdown-menu>
178 <paper-dropdown-menu label=
"Colored">
179 <paper-dropdown class=
"dropdown colored">
180 <core-menu class=
"menu">
181 <template repeat=
"{{pastries}}">
182 <paper-item>{{}}
</paper-item>
186 </paper-dropdown-menu>
194 scope
= document
.querySelector('template[is=auto-binding]');