Created attachment 190076 [details] reduction With a construction like this, an @host rule is not applied. @media screen and (max-width: 800px) { @host { * { background: green; } } } See the attached reduction and resize the window > and < 800px width to observe results.
Currently CSSGrammar.y.in cannot parse @host in @media. So we need to modify CSSGrammar.y.in (maybe, adding host to block_valid_rule). However if we change the place of @host with @media's (I'm not sure whether this is a valid css code or not), i.e. @host { @media screen and (max-width: 800px) { * { background: green; } } } we need to change RuleSet.cpp (i.e. RuleSet::addChildRules).
Tab, can you chime in on what's valid syntax or not?
We are seeking clarification from the spec: <https://www.w3.org/Bugs/Public/show_bug.cgi?id=21242> Given a lawyerly reading of that, @host rules should not be parsed in a stylesheet at all because the 'host' production, though defined, is not used in the 'stylesheet' production.
@host isn't a thing anymore.