This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.
Rule applicability algorithm is complex and unintuitive. It also has mistakes: https://www.w3.org/Bugs/Public/show_bug.cgi?id=16317#c9 Instead, we should just enumerate constraints.
>There is not /select/ attribute on "shadow". Can you explain why we would need something like this? (possibly on a new bug :P) So only shadow reference combinator doesn't work for <shadow>? I'm thinking of something like: <x-A> <template> <style> content /select/ div.special { color: red; } </style> <content> </template> </x-a> <x-B extend="x-A"> <template> <style> shadow /select/ div.special { color: blue; } </style> <shadow> </template> </x-B> So, x-B cannot apply any styles to distributed nodes? If we depend on select attribute, we can add our own fake select attribute to <shadow>. (It doesn't work, but <shadow> can have select.> I'mean: <shadow id="x">... getElementById("x").setAttribute("select", ":first-child"); So, "select" should be used when solving /select/? Best regards, Takashi Sakamoto
(In reply to comment #1) > >There is not /select/ attribute on "shadow". Can you explain why we would need something like this? (possibly on a new bug :P) When I asked for a new bug, I didn't realize you were going to to reuse my other bug for this. I am starting to worry that I am mis-communicating something. I want to keep discussions on bugs focused and easily understood. That's why we have multiple bugs. One issue -- one bug. This bug is about refactoring the styles section to get rid of rule applicability algorithm. I can't figure out how the <shadow> discussion in your comment relates to it. I guess they are all related to styles. But then again, all bugs I've filed are related to Shadow DOM -- it doesn't mean we have just one bug for the whole spec :) > > So only shadow reference combinator doesn't work for <shadow>? I'm thinking > of something like: > > <x-A> > <template> > <style> > content /select/ div.special { color: red; } > </style> > <content> > </template> > </x-a> > > <x-B extend="x-A"> > <template> > <style> > shadow /select/ div.special { color: blue; } > </style> > <shadow> > </template> > </x-B> > > So, x-B cannot apply any styles to distributed nodes? > > If we depend on select attribute, we can add our own fake select attribute > to <shadow>. (It doesn't work, but <shadow> can have select.> > > I'mean: > > <shadow id="x">... > > getElementById("x").setAttribute("select", ":first-child"); > > So, "select" should be used when solving /select/? Not necessarily, I guess. However, I would avoid adding features to the spec until we have a good use case for it. I don't think there is one right now.
I'm sorry. I should file a new bug... Now I can find the reason why I feel a little odd about a select reference combinator. I filed a new bug, https://www.w3.org/Bugs/Public/show_bug.cgi?id=19684 (In reply to comment #2) > (In reply to comment #1) > > >There is not /select/ attribute on "shadow". Can you explain why we would need something like this? (possibly on a new bug :P) > > When I asked for a new bug, I didn't realize you were going to to reuse my > other bug for this. I am starting to worry that I am mis-communicating > something. I want to keep discussions on bugs focused and easily understood. > That's why we have multiple bugs. One issue -- one bug. This bug is about > refactoring the styles section to get rid of rule applicability algorithm. I > can't figure out how the <shadow> discussion in your comment relates to it. > I guess they are all related to styles. But then again, all bugs I've filed > are related to Shadow DOM -- it doesn't mean we have just one bug for the > whole spec :) > > > > So only shadow reference combinator doesn't work for <shadow>? I'm thinking > > of something like: > > > > <x-A> > > <template> > > <style> > > content /select/ div.special { color: red; } > > </style> > > <content> > > </template> > > </x-a> > > > > <x-B extend="x-A"> > > <template> > > <style> > > shadow /select/ div.special { color: blue; } > > </style> > > <shadow> > > </template> > > </x-B> > > > > So, x-B cannot apply any styles to distributed nodes? > > > > > If we depend on select attribute, we can add our own fake select attribute > > to <shadow>. (It doesn't work, but <shadow> can have select.> > > > > I'mean: > > > > <shadow id="x">... > > > > getElementById("x").setAttribute("select", ":first-child"); > > > > So, "select" should be used when solving /select/? > > Not necessarily, I guess. However, I would avoid adding features to the spec > until we have a good use case for it. I don't think there is one right now.
http://dvcs.w3.org/hg/webcomponents/rev/3647bf47a736