W3C home > Mailing lists > Public > whatwg@whatwg.org > July 2005

[whatwg] [WF2] Readonly and default pseudoclass matching

From: Ian Hickson <ian@hixie.ch>
Date: Thu, 28 Jul 2005 23:24:05 +0000 (UTC)
Message-ID: <Pine.LNX.4.62.0507282322030.4466@dhalsim.dreamhost.com>
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.   `._.-(,_..'--(,_..'`-.;.'
Received on Thursday, 28 July 2005 16:24:05 UTC

This archive was generated by hypermail 2.4.0 : Wednesday, 22 January 2020 16:58:42 UTC