-
Notifications
You must be signed in to change notification settings - Fork 93
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
element-styles/paper-material.html needs a unique dom-module id #130
Comments
Neither of those elements uses Does this sound ok? |
OK, I removed the |
Actually, I'm going to re-open this because it needs to be fixed. The |
@notwaldorf If I may ask, please, what is it about |
Since you also asked me on twitter, here's that answer here: the anti-pattern was |
@notwaldorf Just to confirm, would this be also considered a anti pattern? It seems this is just webcomponent that is styled with no JS. Where the same thing can be done without a webcomponent using https://github.com/PolymerElements/iron-overlay-behavior/blob/master/demo/simple-overlay.js |
In 2.0-preview the standard
<paper-material>
will not be visible if you include a<paper-button>
or<paper-card>
in your component.The reason is that element-styles/paper-material.html has a component in it with the definition
<dom-module id="paper-material">
which is the exact definition that is in paper-material/paper-material.html.The change to element-styles was added in the 1.2 tag and is used in the 2.0-preview branch and 2.0-preview branch versions of paper-card and paper-button (and maybe others?)
To repeat the issue, create a new polymer-2-starter-kit application. Modify bower.json to include paper-material and paper-button. Open my-view.html and add a
<paper-material>
with some text in it. Run the app and you will properly see the paper-material on my-view1.Edit my-view1.html and import paper-button. Add a paper-button under the paper-material. Run the app and you will see the button but no longer see the paper-material or its content.
The exact same issue exists for element-styles/paper-item.html
The text was updated successfully, but these errors were encountered: