From CSS Color Module Level 4; the CSS syntax allows full <number>s, not just <integer>s, for authoring convenience.
Created attachment 8781362 [details] [diff] [review] WIP 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
Last Resolved: 2 years ago
Resolution: --- → DUPLICATE
Duplicate of bug: 1295456
You need to log in before you can comment on or make changes to this bug.