Bug 193681 - rgba() alpha parameter should default to 100% when omitted
Summary: rgba() alpha parameter should default to 100% when omitted
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: CSS (show other bugs)
Version: Safari Technology Preview
Hardware: Mac macOS 10.14
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-01-22 13:20 PST by Dayton Lowell
Modified: 2019-01-23 14:00 PST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dayton Lowell 2019-01-22 13:20:19 PST
According to the CSS Color Module Level 4 spec, when using rgba() function, if the 4th parameter(alpha) is omitted, it should default to 100%.

Edge and Safari don't currently do this. Tested with Safari Technology Preview 73.
Chrome and Firefox handle it correctly.

Test: https://codepen.io/TehShrike/pen/MLYajK
Spec: https://www.w3.org/TR/css-color-4/#rgb-functions
Comment 1 Simon Fraser (smfr) 2019-01-22 14:17:06 PST
I fixed this in http://trac.webkit.org/r239574. Please test STP 74 when it comes out.
Comment 2 Radar WebKit Bug Importer 2019-01-22 14:18:28 PST
<rdar://problem/47459951>
Comment 3 Dayton Lowell 2019-01-22 14:20:08 PST
Thanks Simon!
Comment 4 Dayton Lowell 2019-01-23 14:00:59 PST
Confirmed fixed in STP 74. Thanks again!