Fix OOP <webview> resize and autosize.
[chromium-blink-merge.git] / third_party / polymer / v1_0 / components-chromium / paper-icon-button / paper-icon-button.html
blobade2172e1af3db6b135ec44a54f141be875fdf3c
1 <!--
2 @license
3 Copyright (c) 2015 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
5 The complete set of authors may be found at http://polymer.github.io/AUTHORS
6 The complete set of contributors may be found at http://polymer.github.io/CONTRIBUTORS
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
9 --><html><head><link rel="import" href="../polymer/polymer.html">
10 <link rel="import" href="../iron-icon/iron-icon.html">
11 <link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
12 <link rel="import" href="../paper-styles/default-theme.html">
13 <link rel="import" href="../paper-behaviors/paper-button-behavior.html">
14 <link rel="import" href="../paper-behaviors/paper-inky-focus-behavior.html">
15 <link rel="import" href="../paper-ripple/paper-ripple.html">
17 <!--
18 Material Design: <a href="http://www.google.com/design/spec/components/buttons.html">Buttons</a>
20 `paper-icon-button` is a button with an image placed at the center. When the user touches
21 the button, a ripple effect emanates from the center of the button.
23 `paper-icon-button` includes a default icon set. Use `icon` to specify which icon
24 from the icon set to use.
26 <paper-icon-button icon="menu"></paper-icon-button>
28 See [`iron-iconset`](#iron-iconset) for more information about
29 how to use a custom icon set.
31 Example:
33 <link href="path/to/iron-icons/iron-icons.html" rel="import">
35 <paper-icon-button icon="favorite"></paper-icon-button>
36 <paper-icon-button src="star.png"></paper-icon-button>
38 ###Styling
40 Style the button with CSS as you would a normal DOM element. If you are using the icons
41 provided by `iron-icons`, they will inherit the foreground color of the button.
43 /* make a red "favorite" button */
44 <paper-icon-button icon="favorite" style="color: red;"></paper-icon-button>
46 By default, the ripple is the same color as the foreground at 25% opacity. You may
47 customize the color using this selector:
49 /* make #my-button use a blue ripple instead of foreground color */
50 #my-button::shadow #ripple {
51 color: blue;
54 The opacity of the ripple is not customizable via CSS.
56 The following custom properties and mixins are available for styling:
58 Custom property | Description | Default
59 ----------------|-------------|----------
60 `--paper-icon-button-disabled-text` | The color of the disabled button | `--primary-text-color`
61 `--paper-icon-button-ink-color` | Selected/focus ripple color | `--default-primary-color`
62 `--paper-icon-button` | Mixin for a button | `{}`
63 `--paper-icon-button-disabled` | Mixin for a disabled button | `{}`
65 @group Paper Elements
66 @element paper-icon-button
67 @demo demo/index.html
68 -->
70 </head><body><dom-module id="paper-icon-button">
71 <style>
73 :host {
74 display: inline-block;
75 position: relative;
76 padding: 8px;
77 outline: none;
78 -webkit-tap-highlight-color: rgba(0,0,0,0);
79 -webkit-user-select: none;
80 -moz-user-select: none;
81 -ms-user-select: none;
82 user-select: none;
83 cursor: pointer;
84 z-index: 0;
86 @apply(--paper-icon-button);
89 :host #ink {
90 color: var(--paper-icon-button-ink-color, --primary-text-color);
91 opacity: 0.6;
94 :host([disabled]) {
95 color: var(--paper-icon-button-disabled-text, --disabled-text-color);
96 pointer-events: none;
97 cursor: auto;
98 @apply(--paper-icon-button-disabled);
100 </style>
101 <template>
102 <paper-ripple id="ink" class="circle" center=""></paper-ripple>
103 <iron-icon id="icon" src="[[src]]" icon="[[icon]]" alt$="[[alt]]"></iron-icon>
104 </template>
105 </dom-module>
106 <script src="paper-icon-button-extracted.js"></script></body></html>