[whatwg] [WF2] Readonly and default pseudoclass matching

Ian Hickson ian at hixie.ch
Thu Jul 28 13:44:59 PDT 2005


On Tue, 26 Jul 2005, Boris Zbarsky wrote:
>
> I have a question about the description of :read-only in WF2.  The description
> says:
> 
>   :read-only
>     Matches form control elements that have the readonly attribute set, and to
>     which the readonly attribute applies. (For instance, radio buttons will
>     never match this, regardless of the value of the attribute.)
> 
> It's not clear to me whether this restricts :read-only to _only_ apply to
> those form controls. 

The spec says, about the pseudo-classes, "Their relationship to the form 
controls described in this specification is described here". It doesn't 
claim to do any more than that. :-)

I've added a note to make this clearer.


> Per my reading of CSS3 UI, for example, :read-only should match a random 
> fieldset (since the fieldset itself is not editable in any way).  The 
> text in WF2 could be interpreted this way if one assumes that the whole 
> of section 8.2 only applies to "form controls" (that is, input, output, 
> select, textarea and button), but it's not completely clear what the 
> spec is intending here.

Clarified.



> 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 also have a question about :default.  Again, CSS3 UI makes it pretty 
> clear that :default should match appropriate radio buttons, checkboxes, 
> and options, but WF2 says it only matches the default submit button.  I 
> feel that this contradiction should be somewhat clarified (probably by 
> stating that :default must match said submit button and may match other 
> things as well, per CSS3 UI).

Fixed.

Thanks for your feedback!
-- 
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