Does CSS :active include text selection?

David Emmerson wrote:
> On http://www.w3.org/StyleSheets/TR/W3C-REC, could:
> 
>  :active { color: #C00; background: transparent }
> 
> be changed to:
> 
>  a:active { color: #C00; background: transparent }?
> 
> It's quite annoying when selecting text on a CSS2 browser to have whole
> paragraphs turn red, I'm sure that was not the intended effect of the
> selector.

David,

This is an interesting question. According to section 5.11.3
of the CSS 2 spec [1], the ':active' pseudo-class "applies while an 
element is being activated by the user." I do not believe that the
spec intended to consider text selection as element activation. In
my opinion, your browser should not highlight the paragraph upon
text selection given :active styling. Bert can you comment on this?

Which browser are you using?

Meanwhile, I think we can change our style sheet to the
more specific a:active. I don't think we would lose anything in
doing so.

Thank you,

  _ Ian

[1] http://www.w3.org/TR/REC-CSS2/selector.html#dynamic-pseudo-classes

-- 
Ian Jacobs (ij@w3.org)   http://www.w3.org/People/Jacobs
Tel:                     +1 718 260-9447

Received on Monday, 10 June 2002 10:02:58 UTC