Index: third_party/polymer/components/core-iconset-svg/demo.html |
diff --git a/third_party/polymer/components/core-iconset-svg/demo.html b/third_party/polymer/components/core-iconset-svg/demo.html |
index 82ea67ab5db9cc5c5a1df299c83c55b918762929..5995cd6fb93ab36a09b82edc65271b6fafa44a9a 100644 |
--- a/third_party/polymer/components/core-iconset-svg/demo.html |
+++ b/third_party/polymer/components/core-iconset-svg/demo.html |
@@ -11,52 +11,56 @@ subject to an additional IP rights grant found at http://polymer.github.io/PATEN |
<html> |
<head> |
- <title>core-iconset</title> |
- |
+ <title>core-iconset-svg</title> |
<script src="../platform/platform.js"></script> |
- <link rel="import" href="core-iconset.html"> |
- <link rel="import" href="../core-icon/core-icon.html"> |
- |
-</head> |
-<body unresolved> |
- |
- <!-- Register an icon set; you can do this anywhere, including an HTMLImport! --> |
- <core-iconset id="my-icons" src="my-icons.png" width="96" iconSize="24" |
- icons="location place starta stopb bus car train walk"> |
- </core-iconset> |
- |
- <core-iconset id="my-icons-big" src="my-icons-big.png" width="192" iconSize="48" |
- icons="location place starta stopb bus car train walk"> |
- </core-iconset> |
- |
- <!-- Now create a bunch of icons using our iconset --> |
- <core-icon icon="my-icons:location"></core-icon> |
- <core-icon icon="my-icons:place"></core-icon> |
- <core-icon icon="my-icons:starta"></core-icon> |
- <core-icon icon="my-icons:stopb"></core-icon> |
- <core-icon icon="my-icons:bus"></core-icon> |
- <core-icon icon="my-icons:car"></core-icon> |
- <core-icon icon="my-icons:train"></core-icon> |
- <core-icon icon="my-icons:walk"></core-icon> |
- <br> |
- <!-- icons may also be specified by index --> |
- <style> |
+ <link rel="import" href="svg-sample-icons.html"> |
+ <style shim-shadowdom> |
.embiggen core-icon { |
- width: 48px; |
- height: 48px; |
+ height: 128px; |
+ width: 128px; |
+ } |
+ |
+ core-icon:nth-of-type(1) { |
+ fill: orange; |
+ } |
+ |
+ core-icon:nth-of-type(2) { |
+ fill: green; |
+ stroke: orange; |
+ } |
+ |
+ core-icon:nth-of-type(3) { |
+ fill: navy; |
+ } |
+ |
+ core-icon { |
+ transition: all 0.5s; |
+ -webkit-transition: all 0.5s; |
+ } |
+ |
+ core-icon:hover { |
+ -webkit-filter: drop-shadow( 2px 2px 2px #333 ); |
+ filter: drop-shadow( 2px 2px 2px #333 ); |
} |
</style> |
+</head> |
+<body unresolved> |
- <div class="embiggen"> |
- <core-icon icon="my-icons-big:0"></core-icon> |
- <core-icon icon="my-icons-big:1"></core-icon> |
- <core-icon icon="my-icons-big:2"></core-icon> |
- <core-icon icon="my-icons-big:3"></core-icon> |
- <core-icon icon="my-icons-big:4"></core-icon> |
- <core-icon icon="my-icons-big:5"></core-icon> |
- <core-icon icon="my-icons-big:6"></core-icon> |
- <core-icon icon="my-icons-big:7"></core-icon> |
- </div> |
- |
- </body> |
+ <template is="auto-binding"> |
+ <div class="embiggen"> |
+ <template repeat="{{icon in icons}}"> |
+ <core-icon icon="{{icon}}"></core-icon> |
+ </template> |
+ </div> |
+ <core-meta id="meta" type="iconset"></core-meta> |
+ </template> |
+ <script> |
+ addEventListener('template-bound', function(e) { |
+ var template = e.target; |
+ var setName = 'svg-sample-icons'; |
+ var icons = template.$.meta.byId(setName).iconNames; |
+ template.icons = icons.map(function(ic){ return setName + ':' +ic }); |
+ }); |
+ </script> |
+</body> |
</html> |