Skip to content
This repository has been archived by the owner on Sep 20, 2019. It is now read-only.

ShadowCSS: :host-context(...):host(...) doesn't work #16

Closed
PolymerCommunityBot opened this issue Nov 4, 2014 · 4 comments
Closed

ShadowCSS: :host-context(...):host(...) doesn't work #16

PolymerCommunityBot opened this issue Nov 4, 2014 · 4 comments

Comments

@PolymerCommunityBot
Copy link

Issue by frankiefu
Thursday Sep 11, 2014 at 22:27 GMT
Originally opened as https://github.com/Polymer/platform/issues/92


I have a rule like this:

:host-context(.foo):host(.bar) {...}

but it doesn't work under ShadowDOM polyfill. Works fine in native ShadowDOM.

jsbin: http://jsbin.com/nafasabitido/1/edit

@PolymerCommunityBot
Copy link
Author

Comment by frankiefu
Friday Sep 12, 2014 at 21:44 GMT


Workaround is to use polyfill-next-selector, e.g.

polyfill-next-selector { content: '.foo :host.bar, :host.foo.bar'; }

jsbin: http://jsbin.com/pamoqonoceju/1/edit

garlicnation added a commit that referenced this issue Mar 9, 2015
@garlicnation
Copy link
Contributor

Added to FAQs.

@lozandier
Copy link

Hey, it's sort of confusing how to actually adhere to this suggestion; based on how it's written in the FAQ it seems to create this thought: "So, the stuff within content will be replaced so other properties defined within polyfill-next-selector will make this selector work?

@indolering
Copy link

The JSBin example appears to be broken. Could you create a another one, preferably with an element styled in the traditional format and another with the polyfill-next-selector?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants