Re: [shadow-styling] Scoping at-rules like @font-face in scoped styled and shadow trees?

On Wed, Feb 26, 2014 at 3:41 PM, Cameron McCormack <cam@mcc.id.au> wrote:
> Tab Atkins Jr. wrote:
>>> For style=""
>>> attributes on elements within a style scope, you are right that you won't
>>> know what your scope element is (although in Gecko we do know that the
>>> element is in a style scope) and will have to traverse up to find it.
>>
>> While we're talking about style='', this seems fragile.  If this
>> allows arbitrary descendants to opt in, then it means that you can
>> accidentally co-opt it by inserting *another* scoped stylesheet
>> between the intended stylesheet and the element reffing the name.
>
> Sure, but then that's the same as co-opting uses of scoped() in a <style
> scoped> sheet if you insert another <style scoped> somewhere up the tree,
> isn't it?

Yes, but that's hopefully more intentional, and definitely less common
than just adding an unrelated <style scoped>.

Anyway, Cam and I talked this out in IRC, and agreed that Shadow DOM
at least should be able to work fine with "scoping to the shadow
root", and we can solve the more general problem of scoped stylesheets
later.

~TJ

Received on Wednesday, 5 March 2014 00:59:27 UTC