This repository was archived by the owner on Mar 13, 2018. It is now read-only.
Added a scoping around the avatar#12
Open
silentHoo wants to merge 1 commit into
Open
Conversation
…core-drag-drop> element in different other components and style them for each component based on a deep or shadow pseudo selector. This was not possible before this patch, because the global namespace was used with document.body.appendChild(avatar). Now the avatar is append to the components shadow dom. I think that's much cleaner.
Author
|
Nobody commenting? |
|
Thanks for your pull request. It looks like this may be your first contribution to a Google open source project, in which case you'll need to sign a Contributor License Agreement (CLA) at https://cla.developers.google.com/. If you've already signed a CLA, it's possible we don't have your GitHub username or you're using a different email address. Check the information on your CLA or see this help article on setting the email on your git commits. Once you've done that, please reply here to let us know. If you signed the CLA as a corporation, please let us know the company's name. |
This file contains hidden or 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
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This make it possible to use the
<core-drag-drop>element in different other components and style them for each component based on a deep or shadow pseudo selector. This was not possible before this patch, because the global namespace was used withdocument.body.appendChild(avatar). Now the avatar is appended to the components shadow dom. I think that's much cleaner.For example, before this you could style the avatar in the following way:
The problem here is that all
core-drag-avatars are equally styled.Now you can use it in this way (when you want to style it globally):
Or you can use it in sub-components that make use of
<core-drag-drop>: