- From: Dimitri Glazkov <dglazkov@chromium.org>
- Date: Wed, 4 Sep 2013 11:19:33 -0700
- To: Alexey Kuzmin <alexey@alexeykuzmin.com>, Adam Barth <w3c@adambarth.com>, Brad Hill <bhill@paypal-inc.com>
- Cc: public-webapps <public-webapps@w3.org>
On Sun, Sep 1, 2013 at 9:42 AM, Alexey Kuzmin <alexey@alexeykuzmin.com> wrote: > Hello! > > As I understand current spec [1] there is only two ways to provide styles > for DOM elements in shadow trees: > 1) add styles to document and set apply-author-styles flag for shadow tree > or > 2) use inline styles for elements under the shadow root. > But both of them look not very useful for Custom Elements [2] creation. > > The first option clearly is not the best pick since the apply-author-styles > flag > will cause document styles to affect shadow tree elements > and it might lead to undesired results. > > The second one is more suitable but also has some disadvantages. > The main one is that CSP of the page might forbid inline styling, > styles will not be applied to shadow tree elements > and the whole custom element might become unusable. > > My question is – is there the way to avoid these issues with current spec? > And if not, will it make sense to allow link[rel=stylesheet] element > to be shadow root child? Could we maybe we relax CSP to allow <style> in shadow trees? :DG<
Received on Wednesday, 4 September 2013 18:19:59 UTC