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

Please address replacements for :host-context in "Styling local DOM" #1170

Closed
jyasskin opened this issue Jun 9, 2015 · 4 comments
Closed
Labels

Comments

@jyasskin
Copy link

jyasskin commented Jun 9, 2015

https://github.com/Polymer/polymer/blob/master/src/lib/style-transformer.html#L39 says :host-context is "NOT SUPPORTED", but https://www.polymer-project.org/1.0/docs/devguide/styling.html just ignores it.

It's possible to replace it with global style rules like * /deep/ .contextclass the-element::shadow more selectors, but you've said you're trying to move away from /deep/ and ::shadow, so that's probably not the replacement you have in mind.

@ebidel
Copy link
Contributor

ebidel commented Jun 9, 2015

Hmm, host-context is a feature of native SD. @sorvell will host-context be supported eventually?

@arthurevans
Copy link

Note: testing out a new issue label for "dunno, let's ask the engineer."

@ericatha
Copy link

Any idea if this will be supported or not? I think it's the last missing piece in my migration from 0.5 to 1.0 and I don't want to rewrite a ton of styles if it will be added soon.

Also, since it isn't mentioned and kind of related...
in the following code:

:host([dark]), :host-context([dark]) {..styles..}

:host([dark]) will not be styled if :host-context([dark]) is set, but seems to work if host-context is preceded with :host, like so...

:host([dark]), :host:host-context([dark]) {..styles..}

@arthurevans
Copy link

This has been fixed in core, doesn't need a doc fix.

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

No branches or pull requests

4 participants