- From: <bugzilla@jessica.w3.org>
- Date: Mon, 25 Jun 2012 05:32:18 +0000
- To: public-webapps-bugzilla@w3.org
https://www.w3.org/Bugs/Public/show_bug.cgi?id=17590
Summary: [Shadow]: Consider specifying semantics for @host in
<style scoped>
Product: WebAppsWG
Version: unspecified
Platform: PC
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: Component Model
AssignedTo: dglazkov@chromium.org
ReportedBy: dominicc@chromium.org
QAContact: public-webapps-bugzilla@w3.org
Blocks: 14978
What is the meaning of
<style scoped>
@host { ... }
</style>
in a shadow tree?
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: "!!!"; } }
</style>
<content select=".breaking"></content>
</div>
<div>
<style scoped>
@host { div:after { content: "- More at 11." } }
</style>
<content></content>
</div>
By lifting the scoping of the style to content distributed into the scope, we
would have this rendering:
!!!Zombie Apocalypse Upon Us
Kitten Saved from Tree - More at 11.
As it is, it is unclear what the interpretation of @host in <style scoped>
should be, for example this:
Zombie Apocalypse Upon Us
Kitten Saved from Tree
(ie nothing applied because the host is outside the scope) or this:
!!!Zombie Apocalypse Upon Us - More at 11.
!!!Kitten Saved - More at 11.
(ie applied to @host, but the scope is not lifted.)
Not lifting the scope means that the style author has to duplicate their
content selectors in the host rule, which will have affect specificity and
means changing a content selector will also require updating stylesheets.
By lifting the scoping over distributed content, then only the content selector
needs to change.
Full credit goes to Takashi Sakamoto for discovering this -- I am just scribe.
--
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 05:32:24 UTC