Re: [CSS3] UI element states pseudo-classes

Andrew Fedoniouk wrote:
> There are too many "interesting" states of input elements which make
> sense to expose into CSS. For example :changed or :input-error would
> be pretty useful, right?

CSS3 UI defines :valid and :invalid[1]. Not sure why one would need
:changed though.


> But I think if we will go this way (declare each state bit as a 
> separate class) we will end up with the mess.

Why? (By the way, please differentiate between the class and
psuedo-class selectors.)


> And in general: we should avoid declaration of pseudo-classes which 
> can be applied to only some particular type of elements as CSS is 
> more or less universal language/tool.

:visited and :link were introduced in CSS 1. I do not thing having
selectors for a particular purpose are bad. They are actually quite useful.


> There are two options I can see: a) input elements should reflect 
> their states onto attributes values in runtime or b) we need to 
> invent some other notation like input[type=text][@changed] to allow 
> adding such state flags without redesigning the whole thing.

I do not understand this part. Could you elaborate?


[1]<http://www.w3.org/TR/2004/CR-css3-ui-20040511/#pseudo-validity>


-- 
  Anne van Kesteren
  <http://annevankesteren.nl/>

Received on Sunday, 9 January 2005 20:05:12 UTC