atoy40 / meteor-polymer-music

A test project about Meteor and Polymer integration components
MIT License
15 stars 4 forks source link

Use of Polymer themes #3

Open carlosbkm opened 9 years ago

carlosbkm commented 9 years ago

Hi,

Thanks a lot for your great work with meteor-elements. I'm taking your code meteor-polymer-music as a base for creating a Polymer Starter Kit style project. However, I would like to use Polymer theming and I tried to do it tis way:

  1. Added an app-theme.html file under the components folder.
  2. Added after all the other imports in the main app file (music-app.html)

Unfortunately that doesn't work. Do you know a way of using polymer themes as those in https://polymerthemes.com/ ?

Thanks in advance.

atoy40 commented 9 years ago

Hello,

I suppose the theme file contains a style "custom" tag. A first idea : are you sure your browser hasn't cached music-app.html ? because meteor set the expire to never for public files. To "fix" it, when developing, I open the chrome dev tool, and check "disable cache" in the the network tab.

Anthony.

carlosbkm commented 9 years ago

Hi Anthony,

I checked "disable cache" in Chrome as you recommended, unfortunately it seems that the issue has nothing to do with that. The thing is, when I hardcode the style directly in the music-app.html file just after "dom-module" tag like this:

captura de pantalla 2015-07-07 a las 13 52 33

Then is taking the styles properly and I can see the application look as intended:

captura de pantalla 2015-07-07 a las 13 54 45

However, if I link the file as it should be, instead of hardcoding the style :

captura de pantalla 2015-07-07 a las 13 51 01

Then the styles are not correctly propagated down in the DOM hierarchy, and for example the menu is not taking the styles. Just to make sure, the code in app-theme.html is the same I hardcoded in the working example:

captura de pantalla 2015-07-07 a las 13 53 48