Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(70)

Side by Side Diff: third_party/polymer/v1_0/components-chromium/iron-iconset-svg/iron-iconset-svg-extracted.js

Issue 1351623008: MD Settings: Languages model for language pages (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@SingletonPrefs
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 /** 1
2 /**
2 * 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
3 * 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
4 * `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.
5 * 6 *
6 * 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
7 * 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
8 * 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
9 * stylable via css. Icons can be themed, colorized, and even animated. 10 * stylable via css. Icons can be themed, colorized, and even animated.
10 * 11 *
11 * Example: 12 * Example:
(...skipping 155 matching lines...) Expand 10 before | Expand all | Expand 10 after
167 svg.setAttribute('preserveAspectRatio', 'xMidYMid meet'); 168 svg.setAttribute('preserveAspectRatio', 'xMidYMid meet');
168 // TODO(dfreedm): `pointer-events: none` works around https://crbug.com/ 370136 169 // TODO(dfreedm): `pointer-events: none` works around https://crbug.com/ 370136
169 // TODO(sjmiles): inline style may not be ideal, but avoids requiring a shadow-root 170 // TODO(sjmiles): inline style may not be ideal, but avoids requiring a shadow-root
170 svg.style.cssText = 'pointer-events: none; display: block; width: 100%; height: 100%;'; 171 svg.style.cssText = 'pointer-events: none; display: block; width: 100%; height: 100%;';
171 svg.appendChild(sourceSvg.cloneNode(true)).removeAttribute('id'); 172 svg.appendChild(sourceSvg.cloneNode(true)).removeAttribute('id');
172 return svg; 173 return svg;
173 } 174 }
174 return null; 175 return null;
175 } 176 }
176 177
177 }); 178 });
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698