Re: [CSS3] UI element states pseudo-classes

On 9-Jan-05, at 3:12 AM, Andrew Fedoniouk wrote:

>
>
> | It doesn't, actually.  Apart from the issue Laurens pointed out, 
> :checked
> | applies to <option> elements in HTML, say....
>
> Why not
> option[selected]?
> why selected state needs to be named as ":checked"?

What you suggest will only select an element if it is selected by 
default.
I'll use the case of checkboxes since I find them easier to talk about.
If you have some checkbox that isn't checked by default and it hasn't 
been checked
neither selector matches it. If a user then checks it :checked will 
match it
but what you suggest using won't.

Received on Sunday, 9 January 2005 23:05:25 UTC