-
Notifications
You must be signed in to change notification settings - Fork 2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Eliminate the need to write
:host ::content
instead of just `::cont…
…ent`, while keeping the same processing under the hood
- Loading branch information
Showing
2 changed files
with
5 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d9f3dda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@nazar-pc i don't understand why styles is shared to global if i don't set them
:host
before::content
, only in a case of dynamically added content in elements. Or i have to fix it by addingstyle-scope name-of-element
.. but it'll be bad 😞 (i'm using 1.4.0).Example with comments and etc.. maybe i'm wrong and it's must work like now.. but it's currently very strange behavior.. http://plnkr.co/edit/FwIceGcTBhpwZaJLWhx7?p=preview (i'm used rawgit from master there's a link to source
view-source:https://rawgit.com/Polymer/polymer/master/src/lib/style-transformer.html
, not sure that its 1.4.0 but you can test it locally).Do i have to open issue for it? @azakus
d9f3dda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, please open an issue.
However, please put the styles of your elements into the template, and use
Polymer.dom(this).appendChild
when you file the issue.d9f3dda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@azakus I hope you mean
Polymer.dom(this).node.appendChild(newElement);
, becausePolymer.dom(this)
doesn't haveappendChild
method)Issue here: #3555
d9f3dda
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Commented on the other issue, but
Polymer.dom(this).appendChild
is correct. IfPolymer.dom(someNode)
doesn't have anappendChild
method, that would be a big problem.Polymer.dom(this).node === this
... So callingPolymer.dom(this).node.appendChild(newElement)
is the same as callingthis.appendChild
... which does not do the right thing.