manolo / gwt-polymer-elements

Polymer Web Components for GWT. A collection of Material Design widgets for desktop and mobile.
Apache License 2.0
155 stars 49 forks source link

GSS webcomponent #80

Closed lilletech closed 8 years ago

lilletech commented 8 years ago

Hi everybody, I'm using webcomponents polymer via the library gwt-polymer-elements.

I'm using GSS to customize my application (custom composite) . But i'd like to override some css polymer attribute for 1 instance of webcomponent (on the fly, not for all instances ).

In my class css i need to edit attributes polymer. fe :

.iconResized{ --iron-icon-width: 80px !important; --iron-icon-height: 80px !important; --iron-icon-fill-color: red; }

The problem is that GSS compiler does'nt recognize the attributes --iron-icon-width ...

Is there any way to force declaring such attributes at compilation ?

Thanks

manolo commented 8 years ago

There is no way to make GSS support polymer syntax. You have either add <style> tags to your widget or to your index.html page.

lilletech commented 8 years ago

Finally i've developped a rest service that i call before app initialization that returns a json with a map of variables to initialize gss variables via an eval function in gss file. And i call a servlet with an import to generate polymer theme from a mapping of gss variables/polymer variables