Re: [webcomponents]: Shadow trees styling issue

04.09.2013, 22:19, "Dimitri Glazkov" <dglazkov@chromium.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<


Have you had a chance to look into this issue?
Allowing <style> element in shadow trees would really help.



-- 
Alexey

Received on Wednesday, 2 October 2013 12:24:49 UTC