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>core-dropdown-menu
</title>
20 <script src=
"../webcomponentsjs/webcomponents.js"></script>
22 <link href=
"../core-collapse/core-collapse.html" rel=
"import">
23 <link href=
"../core-dropdown/core-dropdown.html" rel=
"import">
24 <link href=
"../core-icons/core-icons.html" rel=
"import">
25 <link href=
"../core-icon-button/core-icon-button.html" rel=
"import">
26 <link href=
"../core-item/core-item.html" rel=
"import">
27 <link href=
"../core-menu/core-menu.html" rel=
"import">
29 <link href=
"core-dropdown-menu.html" rel=
"import">
31 <style shim-shadowdom
>
33 font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
37 -webkit-tap-highlight-color: rgba(
0,
0,
0,
0);
38 -webkit-touch-callout: none;
50 html /deep/ core-dropdown-menu {
51 box-sizing: border-box;
55 html /deep/ core-dropdown {
56 box-sizing: border-box;
58 background-color: #eee;
60 border:
1px solid #ccc;
67 text-overflow: ellipsis;
70 html /deep/ core-collapse {
71 border:
1px solid #ccc;
80 border:
1px solid #
0f9d58;
81 background-color: #b7e1cd;
90 <template is=
"auto-binding">
94 <div>Absolutely positioned dropdowns
</div>
96 <core-dropdown-menu label=
"Your favorite pastry">
97 <core-dropdown class=
"dropdown">
99 <template repeat=
"{{pastries}}">
100 <core-item>{{}}
</core-item>
104 </core-dropdown-menu>
108 <core-dropdown-menu label=
"Disabled" disabled
>
109 <core-dropdown class=
"dropdown">
111 <core-item>Should not see this
</core-item>
114 </core-dropdown-menu>
120 <div>Layered dropdowns
</div>
122 <button onclick=
"document.getElementById('collapse').toggle()">toggle core-collapse
</button>
126 <core-collapse id=
"collapse">
128 <core-dropdown-menu label=
"Your favorite pastry">
129 <core-dropdown layered
class=
"dropdown">
131 <template repeat=
"{{pastries}}">
132 <core-item>{{}}
</core-item>
136 </core-dropdown-menu>
144 <div>Custom styling
</div>
146 <core-dropdown-menu label=
"Constrained height">
147 <core-dropdown class=
"dropdown constrained-height">
149 <template repeat=
"{{pastries}}">
150 <core-item>{{}}
</core-item>
154 </core-dropdown-menu>
158 <core-dropdown-menu label=
"Colored">
159 <core-dropdown class=
"dropdown colored">
161 <template repeat=
"{{pastries}}">
162 <core-item>{{}}
</core-item>
166 </core-dropdown-menu>
174 scope
= document
.querySelector('template[is=auto-binding]');