Re: Custom dynamic properties

On 9/17/10 1:42 PM, Tab Atkins Jr. wrote:
> What difference do you think there is between pseudoclasses and
> attribute selectors?  Other than the fact that they refer to different
> things, they're fairly similar.

Pseudo classes can be defined arbitrarily, in general, whereas what 
attribute selectors can do is very restricted.

For example, there's no sane way to write an attribute selector for 
"tables with a nonzero border attribute" (in the sense that affects HTML 
rendering).  One could define a pseudo-class that does that, though.

> :enabled and :disabled were presumably introduced for parsimony with
> the other input-state-based pseudoclasses.  It's also easier to write
> them than [disabled] and :not([disabled])

:disabled and [disabled] will match different sets of elements, in general.

:disabled and :not(:enabled) will match different sets of elements, in 
general.

See http://www.w3.org/TR/2004/CR-css3-ui-20040511/ section 6.6.4.1 
paragraph 3 second sentence:

   In a typical document most elements will be neither :enabled nor
   :disabled.

-Boris

Received on Friday, 17 September 2010 17:55:40 UTC