Closed Bug 1291878 Opened 8 years ago Closed 6 years ago

Allow <number> values in rgb() and rgba()

Categories

(Core :: CSS Parsing and Computation, enhancement, P3)

enhancement

Tracking

()

RESOLVED FIXED

People

(Reporter: sebo, Unassigned)

References

()

Details

The CSS Color Module Level 4 lifts the restriction of RGB components in rgb() and rgba() to integer values and explicitly allows any numeric values instead.[1]

The implementation should be adjusted accordingly.

Sebastian

[1] https://drafts.csswg.org/css-color-4/#typedef-rgb-component
Priority: -- → P3
I've tested this again in Firefox 62 and numeric values are obviously interpreted now.
When a float value is authored, the computed value is rounded, which is obviously allowed by the spec.[1]

Therefore I close this bug now.

Sebastian

[1] https://drafts.csswg.org/css-color-4/#rgb-functions
Status: NEW → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.