PolymerElements / iron-iconset-svg

Represents a source of icons expressed as a collection of inline SVGs
https://www.webcomponents.org/element/PolymerElements/iron-iconset-svg
37 stars 34 forks source link

Custom css properties inside svg of custom iconset #19

Closed mikaelharsjo closed 8 years ago

mikaelharsjo commented 8 years ago

Is this supported?

<iron-iconset-svg name="custom-icons" size="80">
  <svg>
    <style>
      .icon {
        fill: var(--paper-red-500);
     }
   </style>
  </svg>
</iron-iconset-svg>

It didn't work for me but it may be something with my setup.

notwaldorf commented 8 years ago

@mikaelharsjo I think this does not work. It's a little bit weird with how the <svg> element works, and where this stylesheet actually lives (which isn't where it's eventually getting used). I think your best bet is to not use custom properties inside the <svg> document, sorry :(

@sorvell in case he has any good ideas for this

mikaelharsjo commented 8 years ago

No worries, that's what I thought