robrez / poly-theme-builder

Build themes for your polymer app!
MIT License
14 stars 2 forks source link

Enhancement: usages of property #6

Open robrez opened 9 years ago

robrez commented 9 years ago

For a given property, it would be nice if you could find its usages..

For example, --default-primary-color is the default value for the following:

ghost commented 9 years ago

That's something I have always wanted with crazy CSS. Thank you for making this component; really helped.

To implement this aspect will need reflection. Do you think the component model in polymer can support this being done client side ? I was thinking of doing the same server side.

Really curious about this because I have a few ideas for pokymer, that requires this type of reflection.

robrez commented 9 years ago

@gedw99 - thanks for the feedback. I plan on handling it all client-side.

Fortunately a polymer instance has a big map of all of the custom-properties and their current values. This makes it pretty easy to, for a given property, loop through the map entries and determine which entries use that property's value.

You should check out hydrolysis A static analysis tool for polymer components.