W3C home > Mailing lists > Public > public-webapps@w3.org > January to March 2015

RE: [Shadow] Q: Removable shadows (and an idea for lightweight shadows)?

From: Travis Leithead <travis.leithead@microsoft.com>
Date: Thu, 26 Mar 2015 19:44:55 +0000
To: Daniel Freedman <dfreedm@google.com>
CC: Justin Fagnani <justinfagnani@google.com>, "Dimitri Glazkov (dglazkov@google.com)" <dglazkov@google.com>, Arron Eicholz <arronei@microsoft.com>, "Anne van Kesteren (annevk@annevk.nl)" <annevk@annevk.nl>, Ryosuke Niwa <rniwa@apple.com>, WebApps WG <public-webapps@w3.org>
Message-ID: <BLUPR03MB389BD86EF879522A9B446F4F8080@BLUPR03MB389.namprd03.prod.outlook.com>
>From: Daniel Freedman [mailto:dfreedm@google.com] 
>How would you style these "shadow" children? Would the main document CSS styles affect these children?

I don’t know :-)

Let's assume that main document CSS styles wouldn't affect them, as that seems to be a fundamental requirement for shadowDOM.

So, then how to style them? Here's a few thoughts--but what do you think?

* Require scoped style elements. This is today's model. I don't like it much because of the developer ergonomics--it's not as natural as the way styles are applied to documents today with <link rel="stylesheet">

* provide new APIs to manage stylesheets for the shadow content. Maybe: element.importShadowStyleSheet(url), and then a corresponding element.shadowStyleSheets[] collection. This seems vaguely reminiscent of an imperative @import. Might be better to just add this capability [generally] to the styleSheets collection [1] come to think of it...

* other ideas?

[1] http://dev.w3.org/csswg/cssom/#stylesheetlist

 
Received on Thursday, 26 March 2015 19:45:24 UTC

This archive was generated by hypermail 2.3.1 : Friday, 27 October 2017 07:27:26 UTC