- From: Boris Zbarsky <bzbarsky@mit.edu>
- Date: Tue, 26 Jul 2005 19:59:43 -0500
Matthew Raymond wrote: > Take a look at the following URL: > > http://www.w3.org/TR/2003/REC-xforms-20031014/sliceF.html#id2644859 That has no bearing on how :read-only is to be applied outside the context of the XForms namespace. Like to HTML, say. Which brings us back to WF2, which is working with HTML... > So, clearly, when :read-only was first introduced for XForms, it was > meant to be used only with form controls that are not only set to > read-only, but are actually capable of being set to read-only in markup. Which makes some sense in the context of XForms, where form controls are what you care about styling. Outside of that context, that seems like a very unreasonable restriction. > The XForms spec clearly states :read-only selects a form control, so > if :read-only is a "way to style elements which are in the respective > states as defined by XForms", then it can't apply to a non-control element. Sure it can, if the non-control element is not in the XForms namespace (if nothing else, you can then just style XForms-namespace content that matches :read-only, if desired). >> WF2 is claiming to be doing exactly such clarification, if you note. > > WF2 can suggest how styling should be handled, as XForms did, but it > needs to ultimately be defined by CSS. Actually, no. CSS defers to document languages on a number of issues; HTML5 and specifically the Web Forms 2 part of it is such a language. XForms is another language. CSS just defines that a :read-only psuedo-class exists and leaves it up to the document language to define what is matched by it. XForms has such a definition. So does Web Forms 2, but the Web Forms 2 definition seems inadequate to me in the context of HTML5. If Web Forms 2 were somehow separate from HTML5 that might be OK, but it's not. > The width of the checkbox is 100 pixels. You should have used the > :disabled pseudo-class from CSS3-UI: I realize :disabled would match there. The question is why :read-only should not match -- the checkbox is readonly in this case; the user can't change its value. Again, this comes back to the basic question of "what does :read-only select?" Is it "read-only elements" or "form controls that have a readonly attribute in the DTD and have it set"? The former seems more useful to me from a general user-interface basis. You seem to be convinced that it should be the latter, with "that's what XForms does" as the argument. I think that this is a case where HTML5 shouldn't copy XForms. >> You seem to be confusing the "readonly" attribute and the :read-only CSS >> pseudo-class... > > Not at all. See the following URLs: > > http://whatwg.org/specs/web-forms/current-work/#readonly > http://www.w3.org/TR/html4/interact/forms.html#adef-readonly Those both talk about the "readonly" attribute. They don't have any mention of :read-only. I stand by my original statement. -Boris
Received on Tuesday, 26 July 2005 17:59:43 UTC