Implement color input value attribute as any CSS color
Categories
(Core :: DOM: Forms, enhancement)
Tracking
()
People
(Reporter: lwarlow, Assigned: saschanaz)
References
(Depends on 1 open bug, Blocks 1 open bug)
Details
(Keywords: dev-doc-needed)
Attachments
(1 file)
Currently the color input in Gecko only supports hex values in the value attribute of color inputs. The HTML spec has been updated to allow any valid CSS color to be used.
This was added alongside the alpha and colorspace attributes but imo would be a useful addition on its own.
This requires updating HTMLInputElement to use Servo to validate, parse and serialize the value attribute as appropriate. For now the serialization would act as if alpha attribute was missing and colorspace had its default of limited-srgb. This would result in the output still always being a standard hex.
Assignee | ||
Updated•28 days ago
|
Assignee | ||
Comment 1•28 days ago
|
||
Updated•23 days ago
|
Assignee | ||
Updated•22 days ago
|
Comment 5•22 days ago
|
||
Comment 9•21 days ago
|
||
bugherder |
Assignee | ||
Updated•21 days ago
|
Comment 12•20 days ago
|
||
Did you want to nominate this for the Fx143 relnotes?
Assignee | ||
Comment 13•20 days ago
•
|
||
I was wondering that... let's do it.
Release Note Request (optional, but appreciated)
[Why is this notable]: The color form control now accepts a broader syntax
[Affects Firefox for Android]: Yes
[Suggested wording]: <input type=color>
now recognizes CSS <color>
format in addition to the color hex format (#ffffff
). This means color names like black
and more complex string like rgb(200 200 200)
is now a valid input. For now the value will always be converted to the hex format.
[Links (documentation, blog post, etc)]:
Description
•