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.
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.
This probably happens because opacity is stored as a float and the alpha component of a color is stored as a byte.
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?