Closed mwinters-stuff closed 8 years ago
Can you try to make those changes to see if it get's better ?
In test-element.html
:
<style is="custom-style" include="app-theme"></style>
<style include="shared-styles">
:host {
display: block;
}
</style>
Also, just FYI (I don't think it has anything to do with the issue here) the imports are not in the right place: In every .html file, you should only import the elements that you are directly using in the file. I believe that to fix that you should follow those steps:
elements.html
import from index.html
to test-element.html
, and instead import test-element.html
elements.html
, remove the import for test-element.html
Then there is also the app.js
(and probaby routing.html
) that I think should be imported by test-element.html
and tweaked to use this element's scope instead of app
, but again, that's not strictly related to this styling issue.
hi, another issue not related with the style:
<template is="dom-bind" id="app">
<test-element></test-element>
<paper-toast id="toast">
</template>
The <paper-toast id="toast">
is not closed ;)
@vguillou No different.. Except the error "Could not find style data in module named app-theme" looks the same as the screen shot.. I also just used code direct from a fresh PSK just extracting the required code and generally left it as-is.. (not a representation of the actual web-app I am developing).
@felixzapata Woops - I was deleting from the paste irrelevant bits, must have forgot to delete the whole toast.. :)
I have figured it out - there is a mention in bold in the styling local dom document where it says the app theme is only for the main document - ie index.html.
Copying the styles from there to the shared-styles.html makes it work when the <style include="shared-styles"></style>
is in the element.
I like to keep the index fairly clean, and use a main element that encapsulates the "app", If I take the contents of the index.html and place them in an element - in this case "test-element.html" then the app theme does not get applied, I cant find a way to make it work.. Here are my files.
index.html (header removed)
elements.html
and test-element.html
The result is..