Open
Bug 372783
Opened 18 years ago
Updated 3 years ago
hsl(), hsla(), rgba(0,0,0,0), rgba(x, y, z, 1.0) colors not round-tripped correctly
Categories
(Core :: CSS Parsing and Computation, defect)
Core
CSS Parsing and Computation
Tracking
()
NEW
People
(Reporter: dbaron, Unassigned)
References
Details
Attachments
(1 file)
|
1.75 KB,
text/html; charset=UTF-8
|
Details |
As discussed in bug 372770, hsl() and hsla() colors are not round-tripped correctly by nsCSSDeclaration (e.g., setting and getting the style attribute or a property on element.style), since they are converted to rgb() or rgba(). Furthemore, rgba(0, 0, 0, 0) is converted to 'transparent'. These should probably not be modified in editing situations.
Comment 1•18 years ago
|
||
Also a problem for "rgba(x, y, z, 1.0)". It ends up as "rgb(x, y, z)".
Summary: hsl(), hsla(), and rgba(0,0,0,0) colors not round-tripped correctly → hsl(), hsla(), rgba(0,0,0,0), rgba(x, y, z, 1.0) colors not round-tripped correctly
| Reporter | ||
Comment 2•18 years ago
|
||
This shows the bug (compare the second and third columns for what this bug covers).
| Reporter | ||
Updated•18 years ago
|
Assignee: dbaron → nobody
QA Contact: ian → style-system
Is this bug the cause of the following bug?
A div with a hsla background color has in the source viewer opened with "View Selection Source" a rgba background color.
If this isn't the case then I will open another bug for it.
| Reporter | ||
Comment 4•17 years ago
|
||
(In reply to comment #3)
> Is this bug the cause of the following bug?
Yes.
Another related question:
What does this return: hsl(34.9,50.9%,57.6%)?
It should return rgb(202,156,92) whereas hsl(35,51%,58%) maps to rbg(203,157,93)
HSL with integer values only allows 3.6 million colors/combinations. There are 16.8 million RBG colors, which means that there are about 5 (4.661) RBG colors mapped to each integer HSL value. The CSS 3 color spec doesn't mention fractional HSL values at all. Nor does it require only integer values.
Does Mozilla do fractional HSL values?
Comment 6•14 years ago
|
||
I didn't find this bug when I filed bug 635723 and bug 635724 earlier today. I'm handling the rgba(0, 0, 0, 0) vs. transparent issues there.
Updated•8 years ago
|
Flags: needinfo?(emilio+bugs)
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•