[Bug 17590] [Shadow]: Consider specifying semantics for @host in <style scoped>

https://www.w3.org/Bugs/Public/show_bug.cgi?id=17590

--- Comment #1 from Dimitri Glazkov <dglazkov@chromium.org> 2012-06-25 16:20:53 UTC ---
(In reply to comment #0)
> What is the meaning of
> 
> <style scoped>
> @host { ... }
> </style>
> 
> in a shadow tree?

Right now, it's not mentioned that "scoped" affects anything, so I assumed that
it's clear that @host only affects the shadow host, regardless of the value.

> 
> It would be useful to lift the scoping of the rules to content distributed into
> the scope, for example:
> 
> <div id="news">
>   <div class="breaking">Zombie Apocalypse Upon Us</div>
>   <div class="human-interest">Kitten Saved from Tree</div>
> </div>
> 
> Assuming #news has this Shadow DOM:
> 
> <div>
>   <style scoped>
>     @host { div:before { content: "!!!"; } }

This is not the way @host is spec'd now. You can't put selectors inside. You
can only put properties:

@host { color: red; }

> As it is, it is unclear what the interpretation of @host in <style scoped>
> should be, for example this:

Does my explanation make it more clear?

To style contents, distributed to insertion points, you have only one method:
/select/ reference combinator.

-- 
Configure bugmail: https://www.w3.org/Bugs/Public/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

Received on Monday, 25 June 2012 16:20:56 UTC