W3C home > Mailing lists > Public > whatwg@whatwg.org > May 2012

[whatwg] Allow empty string for input type=color

From: Ashley Sheridan <ash@ashleysheridan.co.uk>
Date: Thu, 03 May 2012 19:37:48 +0100
Message-ID: <1336070268.2564.14.camel@localhost.localdomain>
On Fri, 2012-05-04 at 04:33 +1000, Shaun Moss wrote:

> The way things are done is not always the best way. Most colour pickers 
> are used in instances where "not selected" would make no sense.
> However, as you're designing a widget for the web that may be used by 
> billions of people in any number of unforeseen ways, flexibility is a 
> virtue, and the option to clear the field would be an improvement. If 
> you don't allow a "not selected" or null option, this would basically 
> force all colour widgets to be required fields, which may not be what 
> the form designer wants.
> To compare, some date pickers do not allow you to clear the field, but 
> some do. For the web, it's a useful feature.
> Shaun
> On 2012-05-03 11:46 PM, Anne van Kesteren wrote:
> > On Thu, 03 May 2012 02:10:11 -0700, Markus Ernst <derernst at gmx.ch> wrote:
> >> If I understand the spec correctly, entering no value defaults to 
> >> #000000, thus the required attribute does not apply. What are the 
> >> reasons for this? I am sure there were good reasons to specify it 
> >> this way, anyway I don't see them right now. "Not selected" is 
> >> actually very different from "black".
> >
> > "Not selected" is not something typically supported by native color 
> > pickers.
> >
> >

Would the colour pickers allow the selection of the alpha channel at the
time of choosing? If so, couldn't you allow a full transparent colour to
be used where null couldn't?
Received on Thursday, 3 May 2012 11:37:48 GMT

This archive was generated by hypermail 2.2.0+W3C-0.50 : Wednesday, 30 January 2013 18:48:08 GMT