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-menu-button
</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-menu-button.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 {
51 background-color: #eee;
53 border:
1px solid #ccc;
60 text-overflow: ellipsis;
63 html /deep/ core-collapse {
64 border:
1px solid #ccc;
78 border:
1px solid #
0f9d58;
79 background-color: #b7e1cd;
87 <template is=
"auto-binding">
91 <div>Absolutely positioned menu buttons
</div>
94 <core-icon-button icon=
"menu"></core-icon-button>
95 <core-dropdown class=
"dropdown">
97 <template repeat=
"{{pastries}}">
98 <core-item>{{}}
</core-item>
104 <core-menu-button disabled
>
105 <core-icon-button icon=
"menu"></core-icon-button>
106 <core-dropdown class=
"dropdown">
108 <core-item>Should not see this
</core-item>
114 <core-icon-button icon=
"add"><span style=
"vertical-align:middle;">add
</span></core-icon-button>
115 <core-dropdown class=
"dropdown">
117 <template repeat=
"{{pastries}}">
118 <core-item>{{}}
</core-item>
128 <div>Layered menu buttons
</div>
130 <button onclick=
"document.getElementById('collapse').toggle()">toggle core-collapse
</button>
134 <core-collapse id=
"collapse">
137 <core-icon-button icon=
"menu"></core-icon-button>
138 <core-dropdown layered
class=
"dropdown">
140 <template repeat=
"{{pastries}}">
141 <core-item>{{}}
</core-item>
153 <div>Custom styling
</div>
155 <core-menu-button label=
"Constrained height">
156 <core-icon-button icon=
"menu"></core-icon-button>
157 <core-dropdown class=
"dropdown constrained-height">
159 <template repeat=
"{{pastries}}">
160 <core-item>{{}}
</core-item>
166 <core-menu-button label=
"Colored">
167 <core-icon-button icon=
"menu" class=
"colored"></core-icon-button>
168 <core-dropdown class=
"dropdown colored">
170 <template repeat=
"{{pastries}}">
171 <core-item>{{}}
</core-item>
183 scope
= document
.querySelector('template[is=auto-binding]');