Implement <input type="color">: list attribute




Layout: Form Controls
4 years ago
11 days ago


(Reporter: Arnaud Bienner, Unassigned)


(Blocks: 1 bug, {dev-doc-needed})


Firefox Tracking Flags

(Not tracked)




4 years ago
There was some ideas about how to implement this in bug 547004 comment 22 (attachment 437584 [details]), bug 547004 comment 70 and bug 547004 comment 71, at the end.

Quoting the (IMO) most interesting parts:

Mounir: "Then the user would click on it, if the list attribute is specified, it will show the colors and let the user choose another one with 'Other' which will show the color picker. Otherwise, it will directly show the color picker.
This is highly inspired from the Google's document."

Arnaud: "I think it will be nice to have something similar to Chrome and Opera: a drop-down list available with the list of colors when |list| attribute is specified.
I prefer the Chrome's one, as it displays the list only when |list| is specified, while Opera always displays it, with a default list of colors if |list| isn't specified, but I'm not sure this is really useful.
Or we can add those colors to the "custom colors" part of the color picker, if it has one?"

Mounir: "The UI you proposed look good to me. We might want to use the XUL color picker (that is basically a list of colors). We should probably involve the UI team though."


4 years ago
Blocks: 547004

Comment 1

3 years ago
As per suggestions above, I think there has to be an option to display list colours without 'Other' button too. To suggest only predefined colours to the users. Not sure if it's in par with the specs though.

Comment 2

3 years ago
IIRC the spec, we shouldn't restrict user choice, but only indicate some pre-defined/preferred values (but maybe I'm wrong or it has changed since. If you think it's the case, could you please point me out to the part which part of the spec says this?)

Comment 3

3 years ago
I cant point you to any specs to support my opinion. And I agree that by default we should not restrict users choices. However, in my experience I had situations where I had to build a color picker with predefined colors to prevent "colour soup" on site/service/CMS. Something like OSX Maveriks Finder context menu color tags are limited to seven colors only.


3 years ago
Duplicate of this bug: 1016715

Comment 5

3 years ago
Bug 1016715 contains an example of how to use the datalist attribute + how is it rendered in Chrome (attachment 8429661 [details]).


5 months ago
Keywords: dev-doc-needed
You need to log in before you can comment on or make changes to this bug.