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

How do we define global theme elements? #47

Closed petearvanitis closed 8 years ago

petearvanitis commented 9 years ago

How/where do we define global theme elements when using either the Elements or Widget approach? I see how we can override --default-primary-color at the individual widget level, but not how to specify it globally for the entire application. Is there a way you could update the documentation to show this as an example?

petearvanitis commented 9 years ago

I was able to do this by injecting a static css sheet by calling Polymer.importHref("../../path/to/my/stylesheet") however this does have a couple limitations:

So adding a custom global-theme.html file and using Polymer.importHref to the demo and style notes in the readme.md would be sufficient to close this issue.

manolo commented 8 years ago

Yes, superdevmode does not monitor files out of the src/main/java folder, so one option is

       require('node-watch')(['src/main/webapp','src/main/resources'], function() {
         console.log(arguments);
         require('child_process').exec('mvn generate-sources');
      });
  <g:HTMLPanel>
     <style is="custom-style">
     </style>
  ....
  </g:HTMLPanel>