OLD | NEW |
1 | 1 |
2 /** | 2 /** |
3 * The `iron-iconset-svg` element allows users to define their own icon sets | 3 * The `iron-iconset-svg` element allows users to define their own icon sets |
4 * that contain svg icons. The svg icon elements should be children of the | 4 * that contain svg icons. The svg icon elements should be children of the |
5 * `iron-iconset-svg` element. Multiple icons should be given distinct id's. | 5 * `iron-iconset-svg` element. Multiple icons should be given distinct id's. |
6 * | 6 * |
7 * Using svg elements to create icons has a few advantages over traditional | 7 * Using svg elements to create icons has a few advantages over traditional |
8 * bitmap graphics like jpg or png. Icons that use svg are vector based so the
y | 8 * bitmap graphics like jpg or png. Icons that use svg are vector based so the
y |
9 * are resolution independent and should look good on any device. They are | 9 * are resolution independent and should look good on any device. They are |
10 * stylable via css. Icons can be themed, colorized, and even animated. | 10 * stylable via css. Icons can be themed, colorized, and even animated. |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 // TODO(dfreedm): `pointer-events: none` works around https://crbug.com/
370136 | 176 // TODO(dfreedm): `pointer-events: none` works around https://crbug.com/
370136 |
177 // TODO(sjmiles): inline style may not be ideal, but avoids requiring a
shadow-root | 177 // TODO(sjmiles): inline style may not be ideal, but avoids requiring a
shadow-root |
178 svg.style.cssText = 'pointer-events: none; display: block; width: 100%;
height: 100%;'; | 178 svg.style.cssText = 'pointer-events: none; display: block; width: 100%;
height: 100%;'; |
179 svg.appendChild(sourceSvg.cloneNode(true)).removeAttribute('id'); | 179 svg.appendChild(sourceSvg.cloneNode(true)).removeAttribute('id'); |
180 return svg; | 180 return svg; |
181 } | 181 } |
182 return null; | 182 return null; |
183 } | 183 } |
184 | 184 |
185 }); | 185 }); |
OLD | NEW |