Skip to content

Trying to use :host-context and :host together in the same rule doesn't work. #14349

@Ecafracs

Description

@Ecafracs

I'm submitting a ... (check one with "x")

[x] bug report => search github for a similar issue or PR before submitting
[ ] feature request
[ ] support request => Please do not submit support request here, instead see https://github.com/angular/angular/blob/master/CONTRIBUTING.md#question

Current behavior

Writing a CSS rule in a component style sheet that uses both :host-context and and :host doesn't work:

:host-context(.parentClass) :host(.hostClass) .someClass {
// not applied
}

Expected behavior

The above rule should work.

Minimal reproduction of the problem with instructions

http://embed.plnkr.co/puGWYrVlpu1Tim1b2xuA/

What is the motivation / use case for changing the behavior?

Trying to write a rule that uses both host-context and host.

Please tell us about your environment:

OS X, blah blah blah, pretty sure this doesn't matter.

  • Angular version: 2.0.X

2.4.5

  • Browser: [all | Chrome XX | Firefox XX | IE XX | Safari XX | Mobile Chrome XX | Android X.X Web Browser | iOS XX Safari | iOS XX UIWebView | iOS XX WKWebView ]

Chrome, Safari

  • Language: [all | TypeScript X.X | ES6/7 | ES5]

  • Node (for AoT issues): node --version =

Metadata

Metadata

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions