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.
9 <title>paper-icon-button
</title>
10 <meta name=
"viewport" content=
"width=device-width, minimum-scale=1.0, initial-scale=1, user-scalable=yes">
11 <script src=
"../webcomponentsjs/webcomponents.js"></script>
13 <link rel=
"import" href=
"../core-icons/core-icons.html">
14 <link rel=
"import" href=
"paper-icon-button.html">
16 <style shim-shadowdom
>
18 font-family: RobotoDraft, 'Helvetica Neue', Helvetica, Arial;
22 -webkit-user-select: none;
23 -moz-user-select: none;
24 -ms-user-select: none;
26 -webkit-tap-highlight-color: rgba(
0,
0,
0,
0);
27 -webkit-touch-callout: none;
40 vertical-align: middle;
43 paper-icon-button.hover:hover {
48 paper-icon-button.red {
52 paper-icon-button.blueRipple::shadow #ripple {
56 paper-icon-button.huge::shadow #icon {
61 /* core-selector paper-icon-button:not([active])::shadow core-icon {
65 paper-icon-button.custom {
72 <body unresolved
onclick=
"clickAction(event);">
78 <div>Icon buttons
</div>
80 <paper-icon-button icon=
"menu" title=
"menu"></paper-icon-button>
81 <paper-icon-button icon=
"arrow-back" title=
"arrow-back"></paper-icon-button>
82 <paper-icon-button icon=
"arrow-forward" title=
"arrow-forward"></paper-icon-button>
83 <paper-icon-button disabled
icon=
"clear" title=
"clear"></paper-icon-button>
93 <paper-icon-button class=
"hover" icon=
"favorite" title=
"with :hover style"></paper-icon-button>
94 <paper-icon-button class=
"red" icon=
"favorite" title=
"red icon"></paper-icon-button>
95 <paper-icon-button class=
"red blueRipple" icon=
"favorite" title=
"red icon, blue ripple"></paper-icon-button>
99 <paper-icon-button class=
"huge" icon=
"favorite" title=
"huge"></paper-icon-button>
107 <a href=
"https://www.polymer-project.org" target=
"_blank">
108 <paper-icon-button icon=
"polymer" title=
"polymer"></paper-icon-button>
115 <paper-icon-button focused icon="social:cake"></paper-icon-button>
116 <paper-icon-button focused icon="social:plus-one"></paper-icon-button>
120 <span>segmented</span>
121 <core-selector selected="1">
122 <paper-icon-button fill isToggle icon="maps:directionswalk"></paper-icon-button>
123 <paper-icon-button fill isToggle icon="maps:directions-bike"></paper-icon-button>
124 <paper-icon-button fill isToggle icon="maps:directions-transit"></paper-icon-button>
125 <paper-icon-button fill isToggle icon="maps:directions-car"></paper-icon-button>
131 <div>Custom icon src
</div>
133 <paper-icon-button class=
"custom" src=
"https://assets-cdn.github.com/images/modules/logos_page/Octocat.png" aria-label=
"octocat" title=
"octocat"></paper-icon-button>
140 function clickAction(e
) {
142 if (t
.localName
=== 'paper-icon-button') {
143 if (t
.hasAttribute('disabled')) {
144 console
.error('should not be able to click disabled button', t
);
146 console
.log('click', t
);