[whatwg] Re: some issues

Malcolm Rowe malcolm-what at farside.org.uk
Sun Jul 11 05:38:12 PDT 2004


Jim Ley writes:
>> Sounds reasonable to me. WF2 controls could be styled via CSS in just the
>> same way as any other form control. 
> could you give me a demo - say using Fantasai's interesting proposed
> suggestions, of how they might be styled?

Well, off the top of my head (and I can't remember what fantasai's proposal 
was, I'm afraid): we already have the standard positioning properties: 
height, {min-, max-,}width, position, and so on. I assume that those are 
well-defined for HTML form controls, so there's no reason to suppose they 
wouldn't be defined for WF2 controls. You have a theoretical problem in that 
you can't tell how a given UA will implement a particular control, but most 
UA's implement them as 'thin rectangular box', so this isn't a problem in 
practice. No reason to suspect that that would change with WF2. 

Then there's the properties that generally make sense to apply to all form 
controls: color, background-color, font, and so on. These aren't necessarily 
valid for all controls (does background-color affect <button>? how about 
border?), and aren't defined by HTML or CSS, so arguably, you shouldn't 
expect them to work. In practice, most of them work as you'd expect (though 
not necessarily inter-operably -- not surprising, since they've never been 
specified). Again, WF2 controls should 'support' these properties to the 
same extent as existing HTML form controls. 

Then, finally, there is a set of properties specific to the presentation of 
a particular control. I can't actually think of any obvious ones for HTML, 
and for WF2, the only ones that I can think of are the ones that have been 
suggested here: a way to format numbers and dates for display 
(date-display-format: short/long, I imagine). But there's only been 
relatively little discussion on this topic. 

In other words, the situation for WF2 controls is essentially the same as 
for the existing HTML form controls: not great, and not currently 
well-defined, but not insurmountable. Now, this situation ('styling of form 
controls is not defined') clearly isn't ideal, and it's well-understood that 
it should be defined, but the WF2 spec isn't the right place. I think that 
Ian commented on where the right place was, though I can't remember what he 
said (I think it was either one of the other two WHATWG specs, or as part of 
the W3C CSS WG). 

Regards,
Malcolm 





More information about the whatwg mailing list