Closed Bug 1295451 Opened 8 years ago Closed 8 years ago

RGB color components should allow decimal number

Categories

(Core :: CSS Parsing and Computation, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1295456

People

(Reporter: hiro, Assigned: jerry)

References

()

Details

Attachments

(1 file)

From CSS Color Module Level 4;

 the CSS syntax allows full <number>s, not just <integer>s, for authoring convenience.
Attached patch WIPSplinter Review
Attaching file is a patch what I've written in bug 1295107.  I was going to also fix this in bug 1295107, but now I think it should be a separate bug.

I think this patch is almost finished, but I am not sure whether there are remaining works or not.
I'm not sure we should cherrypick just this one update from CSS Color 4. There are a good bit more related changes in CSS Color 4, just about this same expression (e.g. supporting 3-4 components in both "rgb()" and "rgba()", supporting rgb/rgba with spaces and a slash instead of commas).

If we're making this one upgrade to these expressions, I think we need to make the other upgrades at (approximately) the same time.
Note that in CSS Color 3, rgb/rgba expressions only accept "either three integer values or three percentage values":
 https://drafts.csswg.org/css-color-3/#rgb-color

(The full <number> stuff is new [along with a lot of other changes] in CSS Color 4.)
Assignee: nobody → hshih
Status: NEW → ASSIGNED
Status: ASSIGNED → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: