Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / third_party / polymer / v1_0 / components-chromium / iron-icon / iron-icon.html
blobcbcb47d1160c989e64cda3a6b65579cc851e84be
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.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
9 --><html><head><link rel="import" href="../polymer/polymer.html">
10 <link rel="import" href="../iron-meta/iron-meta.html">
11 <link rel="import" href="../iron-flex-layout/iron-flex-layout.html">
13 <!--
15 The `iron-icon` element displays an icon. By default an icon renders as a 24px square.
17 Example using src:
19 <iron-icon src="star.png"></iron-icon>
21 Example setting size to 32px x 32px:
23 <iron-icon class="big" src="big_star.png"></iron-icon>
25 <style is="custom-style">
26 .big {
27 --iron-icon-height: 32px;
28 --iron-icon-width: 32px;
30 </style>
32 The iron elements include several sets of icons.
33 To use the default set of icons, import `iron-icons.html` and use the `icon` attribute to specify an icon:
35 <link rel="import" href="/components/iron-icons/iron-icons.html">
37 <iron-icon icon="menu"></iron-icon>
39 To use a different built-in set of icons, import the specific `iron-icons/<iconset>-icons.html`, and
40 specify the icon as `<iconset>:<icon>`. For example, to use a communication icon, you would
41 use:
43 <link rel="import" href="/components/iron-icons/communication-icons.html">
45 <iron-icon icon="communication:email"></iron-icon>
47 You can also create custom icon sets of bitmap or SVG icons.
49 Example of using an icon named `cherry` from a custom iconset with the ID `fruit`:
51 <iron-icon icon="fruit:cherry"></iron-icon>
53 See [iron-iconset](#iron-iconset) and [iron-iconset-svg](#iron-iconset-svg) for more information about
54 how to create a custom iconset.
56 See [iron-icons](https://elements.polymer-project.org/elements/iron-icons?view=demo:demo/index.html) for the default set of icons.
59 ### Styling
61 The following custom properties are available for styling:
63 Custom property | Description | Default
64 ----------------|-------------|----------
65 `--iron-icon-width` | Width of the icon | `24px`
66 `--iron-icon-height` | Height of the icon | `24px`
68 @group Iron Elements
69 @element iron-icon
70 @demo demo/index.html
71 @hero hero.svg
72 @homepage polymer.github.io
73 -->
75 </head><body><dom-module id="iron-icon">
77 <style>
78 :host {
79 @apply(--layout-inline);
80 @apply(--layout-center-center);
81 position: relative;
83 vertical-align: middle;
85 fill: currentcolor;
87 width: var(--iron-icon-width, 24px);
88 height: var(--iron-icon-height, 24px);
90 </style>
92 <template>
93 </template>
95 </dom-module>
96 <script src="iron-icon-extracted.js"></script></body></html>