WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
NEW
23202
rgba() and hsla() opacity doesn't end up as-specified in DOM
https://bugs.webkit.org/show_bug.cgi?id=23202
Summary
rgba() and hsla() opacity doesn't end up as-specified in DOM
Faruk Ates
Reported
2009-01-08 17:52:31 PST
When setting e.g. opacity: .42 on an element, retrieving that property in the DOM again returns 0.42 as expected. This doesn't work for rgba() and hsla() values. E.g. specifying rgba(0,0,0, .42) returns rgba(0,0,0, 0.417969) in the DOM, the same for hsla(). This is inconsistent and unexpected.
Attachments
Same testcase file as URL: shows rgba() and opacity properties with inconsistent outcomes in the DOM
(345 bytes, text/html)
2009-01-08 17:56 PST
,
Faruk Ates
no flags
Details
View All
Add attachment
proposed patch, testcase, etc.
Faruk Ates
Comment 1
2009-01-08 17:56:19 PST
Created
attachment 26553
[details]
Same testcase file as URL: shows rgba() and opacity properties with inconsistent outcomes in the DOM Adding the testcase as a file attachment as well for scenarios where my site might possibly be down or something similar.
mitz
Comment 2
2009-01-09 00:53:10 PST
This probably happens because opacity is stored as a float and the alpha component of a color is stored as a byte.
Ahmad Saleem
Comment 3
2023-02-18 06:30:38 PST
Using STP163, I get opacity and rgba as 0.42 in computed tab of Developer Tools? Do we need anything else or we can close this?
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug