[whatwg] [WF2] Readonly and default pseudoclass matching

Ian Hickson ian at hixie.ch
Thu Jul 28 16:24:05 PDT 2005

On Thu, 28 Jul 2005, Boris Zbarsky wrote:
> Ian Hickson wrote:
> > > Further, it would make sense to me if a disabled form control matched
> > > :readonly (since it _is_ readonly; it doesn't so much matter how it got
> > > there, imo).  So for example a disabled radio button would match
> > > readonly...
> > 
> > :disabled/:enabled is orthogonal to :read-only/:read-write.
> I realize that, but it still seems to me that a disabled control also 
> becomes read-only... is there a reason for that not to match :read-only?

Imagine this case:

   :read-only { border: none; }
   :read-write { border: inset; }
   :disabled { color: gray; }

...with a <fieldset> that contains some text fields. Now temporarily 
disable the fieldset because something temporarily makes it unavailable.

Why would you want the borders to change?

It seems much more useful to treat them independently, otherwise when you 
disable something you can no longer style it based on what it would act as 
if it is was enabled.

Ian Hickson               U+1047E                )\._.,--....,'``.    fL
http://ln.hixie.ch/       U+263A                /,   _.. \   _\  ;`._ ,.
Things that are impossible just take longer.   `._.-(,_..'--(,_..'`-.;.'

More information about the whatwg mailing list