Re: How should viewTarget work?

(comments follow)

On 18 February 2015 at 04:43, Chris Lilley <chris@w3.org> wrote:
>
> We should fix this by explicitly defining that :target applies to the
> elements wholly contained within the specified view.
>

"elements wholly contained within the specified view" is something quite
different from what I was suggesting, and would require extra computation
on the part of the browser.  I was only focusing on elements that the
author had specifically identified via the viewTarget attribute.


> >  Secondary question: would the
> > `:target` pseudoclass still apply to the view element itself?
>
> By default it would (as you found) but I think that while fully
> defining that element behaviour we should exclude it from being
> directly applied to the element itself.
>

The problem with excluding it is backwards compatibility and general
intuitiveness.  Although it's buggy in some browsers, it is
possible currently to use view:target with CSS sibling selectors to apply
target styles.  Furthermore, I think authors will just expect that view
elements will work the same as any other element as far as CSS
pseudoclasses go.

Thanks for the feedback,
AmeliaBR

Received on Wednesday, 18 February 2015 14:36:53 UTC