@@ -24,28 +24,11 @@ angular
24
24
* `md-icon` lets you consume an icon font by letting you reference specific icons in that font
25
25
* by name rather than character code.
26
26
*
27
- * ### SVG
28
- * For SVGs, the problem with using `<img>` or a CSS `background-image` is that you can't take
29
- * advantage of some SVG features, such as styling specific parts of the icon with CSS or SVG
30
- * animation.
31
- *
32
- * `md-icon` makes it easier to use SVG icons by *inlining* the SVG into an `<svg>` element in the
33
- * document. The most straightforward way of referencing an SVG icon is via URL, just like a
34
- * traditional `<img>`. `$mdIconProvider`, as a convenience, lets you _name_ an icon so you can
35
- * reference it by name instead of URL throughout your templates.
36
- *
37
- * Additionally, you may not want to make separate HTTP requests for every icon, so you can bundle
38
- * your SVG icons together and pre-load them with $mdIconProvider as an icon set. An icon set can
39
- * also be given a name, which acts as a namespace for individual icons, so you can reference them
40
- * like `"social:cake"`.
41
- *
42
- * When using SVGs, both external SVGs (via URLs) or sets of SVGs [from icon sets] can be
43
- * easily loaded and used. When using font-icons, developers must follow three (3) simple steps:
27
+ * When using font-icons, developers must follow three (3) simple steps:
44
28
*
45
29
* <ol>
46
30
* <li>Load the font library. e.g.<br/>
47
- * `<link href="https://fonts.googleapis.com/icon?family=Material+Icons"
48
- * rel="stylesheet">`
31
+ * `<link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet">`
49
32
* </li>
50
33
* <li>
51
34
* Use either (a) font-icon class names or (b) a fontset and a font ligature to render the font glyph by
@@ -63,26 +46,36 @@ angular
63
46
* </li>
64
47
* </ol>
65
48
*
66
- * Full details for these steps can be found:
49
+ * Full details for these steps can be found in the
50
+ * <a href="http://google.github.io/material-design-icons/#icon-font-for-the-web" target="_blank">
51
+ * Material Design Icon font for the web docs</a>.
67
52
*
68
- * <ul>
69
- * <li>http://google.github.io/material-design-icons/</li>
70
- * <li>http://google.github.io/material-design-icons/#icon-font-for-the-web</li>
71
- * </ul>
53
+ * You can browse and search the Material Design icon style <code>.material-icons</code>
54
+ * in the <a href="https://material.io/tools/icons/" target="_blank">Material Design Icons tool</a>.
72
55
*
73
- * The Material Design icon style <code>.material-icons</code> and the icon font references are published in
74
- * Material Design Icons:
56
+ * ### SVG
57
+ * For SVGs, the problem with using `<img>` or a CSS `background-image` is that you can't take
58
+ * advantage of some SVG features, such as styling specific parts of the icon with CSS or SVG
59
+ * animation.
75
60
*
76
- * <ul>
77
- * <li>https://design.google.com/icons/</li>
78
- * <li>https://design.google.com/icons/#ic_accessibility</li>
79
- * </ul>
61
+ * `md-icon` makes it easier to use SVG icons by *inlining* the SVG into an `<svg>` element in the
62
+ * document. The most straightforward way of referencing an SVG icon is via URL, just like a
63
+ * traditional `<img>`. `$mdIconProvider`, as a convenience, lets you _name_ an icon so you can
64
+ * reference it by name instead of URL throughout your templates.
65
+ *
66
+ * Additionally, you may not want to make separate HTTP requests for every icon, so you can bundle
67
+ * your SVG icons together and pre-load them with `$mdIconProvider` as an icon set. An icon set can
68
+ * also be given a name, which acts as a namespace for individual icons, so you can reference them
69
+ * like `"social:cake"`.
70
+ *
71
+ * When using SVGs, both external SVGs (via URLs) or sets of SVGs (from icon sets) can be
72
+ * easily loaded and used.
80
73
*
81
74
* ### Localization
82
75
*
83
- * Because an `md-icon` element's text content is not intended to be translated, it is recommended to declare the text
84
- * content for an `md-icon` element in its start tag. Instead of using the HTML text content, consider using `ng-bind`
85
- * with a scope variable or literal string.
76
+ * Because an `md-icon` element's text content is not intended to be translated, it is recommended
77
+ * to declare the text content for an `md-icon` element in its start tag. Instead of using the HTML
78
+ * text content, consider using `ng-bind` with a scope variable or literal string.
86
79
*
87
80
* Examples:
88
81
*
@@ -91,20 +84,25 @@ angular
91
84
* <li>`<md-icon ng-bind="'menu'"></md-icon>`
92
85
* </ul>
93
86
*
94
- * <h2 id="material_design_icons">Material Design Icons</h2>
95
- * Using the Material Design Icon-Selector , developers can easily and quickly search for a Material Design font-icon and
96
- * determine its textual name and character reference code. Click on any icon to see the slide-up information
97
- * panel with details regarding a SVG download or information on the font- icon usage .
87
+ * <h2 id="material_design_icons">Material Design Icons tool </h2>
88
+ * Using the Material Design Icons tool , developers can easily and quickly search for a specific
89
+ * open source Material Design icon. The search is in the top left. Below search, you can select
90
+ * from the new icon themes or filter by icon category .
98
91
*
99
- * <a href="https://material.io/tools/icons/?icon=accessibility&style=baseline " target="_blank" style="border-bottom:none;">
100
- * <img src="https://cloud .githubusercontent.com/assets/210413/7902490/fe8dd14c-0780-11e5-98fb-c821cc6475e6 .png"
101
- * aria-label="Material Design Icon-Selector " style="max-width:75%;padding-left:10 %">
92
+ * <a href="https://material.io/tools/icons/" target="_blank" style="border-bottom:none;">
93
+ * <img src="https://user-images .githubusercontent.com/3506071/41942584-ef0695d0-796d-11e8-9436-44f25023a111 .png"
94
+ * aria-label="Material Design Icons tool " style="max-width:95 %">
102
95
* </a>
103
96
*
104
- * <span class="image_caption">
105
- * Click on the image above to link to the
106
- * <a href="https://design.google.com/icons/#ic_accessibility" target="_blank">Material Design Icon-Selector</a>.
107
- * </span>
97
+ * <div class="md-caption" style="text-align: center; margin-bottom: 24px">
98
+ * Click on the image above to open the
99
+ * <a href="https://material.io/tools/icons/" target="_blank">Material Design Icons tool</a>.
100
+ * </div>
101
+ *
102
+ * Click on any icon, then click on the "Selected Icon" chevron to see the slide-up
103
+ * information panel with details regarding a SVG download and information on the font-icon's
104
+ * textual name. This panel also allows you to select a black on transparent or white on transparent
105
+ * icon and to change the icon size. These settings only affect the downloaded icons.
108
106
*
109
107
* @param {string } md-font-icon String name of CSS icon associated with the font-face will be used
110
108
* to render the icon. Requires the fonts and the named CSS styles to be preloaded.
@@ -128,34 +126,35 @@ angular
128
126
* When using SVGs:
129
127
* <hljs lang="html">
130
128
*
131
- * <!-- Icon ID; may contain optional icon set prefix; icons must registered using $mdIconProvider -->
132
- * <md-icon md-svg-icon="social:android" aria-label="android " ></md-icon>
129
+ *<!-- Icon ID; may contain optional icon set prefix.
130
+ * Icons must be registered using $mdIconProvider. -->
131
+ *<md-icon md-svg-icon="social:android" aria-label="android " ></md-icon>
133
132
*
134
- * <!-- Icon urls; may be preloaded in templateCache -->
135
- * <md-icon md-svg-src="/android.svg" aria-label="android " ></md-icon>
136
- * <md-icon md-svg-src="{{ getAndroid() }}" aria-label="android " ></md-icon>
133
+ *<!-- Icon urls; may be preloaded in templateCache -->
134
+ *<md-icon md-svg-src="/android.svg" aria-label="android " ></md-icon>
135
+ *<md-icon md-svg-src="{{ getAndroid() }}" aria-label="android " ></md-icon>
137
136
*
138
137
* </hljs>
139
138
*
140
139
* Use the <code>$mdIconProvider</code> to configure your application with
141
- * svg iconsets .
140
+ * SVG icon sets .
142
141
*
143
142
* <hljs lang="js">
144
- * angular.module('appSvgIconSets', ['ngMaterial'])
145
- * .controller('DemoCtrl', function($scope) {})
146
- * .config(function($mdIconProvider) {
147
- * $mdIconProvider
148
- * .iconSet('social', 'img/icons/sets/social-icons.svg', 24)
149
- * .defaultIconSet('img/icons/sets/core-icons.svg', 24);
150
- * });
143
+ * angular.module('appSvgIconSets', ['ngMaterial'])
144
+ * .controller('DemoCtrl', function($scope) {})
145
+ * .config(function($mdIconProvider) {
146
+ * $mdIconProvider
147
+ * .iconSet('social', 'img/icons/sets/social-icons.svg', 24)
148
+ * .defaultIconSet('img/icons/sets/core-icons.svg', 24);
149
+ * });
151
150
* </hljs>
152
151
*
153
152
*
154
153
* When using Font Icons with classnames:
155
154
* <hljs lang="html">
156
155
*
157
- * <md-icon md-font-icon="android" aria-label="android" ></md-icon>
158
- * <md-icon class="icon_home" aria-label="Home" ></md-icon>
156
+ * <md-icon md-font-icon="android" aria-label="android" ></md-icon>
157
+ * <md-icon class="icon_home" aria-label="Home"></md-icon>
159
158
*
160
159
* </hljs>
161
160
*
0 commit comments