This is an archived snapshot of W3C's public bugzilla bug tracker, decommissioned in April 2019. Please see the home page for more details.

Bug 15843 - Handling color transition to/from transparent
Summary: Handling color transition to/from transparent
Status: RESOLVED DUPLICATE of bug 14624
Alias: None
Product: CSS
Classification: Unclassified
Component: Transitions (show other bugs)
Version: unspecified
Hardware: PC All
: P2 normal
Target Milestone: ---
Assignee: Dean Jackson
QA Contact: This bug has no owner yet - up for the taking
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-02-02 02:03 UTC by Sylvain Galineau
Modified: 2012-02-17 21:57 UTC (History)
5 users (show)

See Also:


Attachments

Description Sylvain Galineau 2012-02-02 02:03:50 UTC
As CSS defines transparent to be 'transparent black' and we have agreed to transition instead to the transparent version of the other end of the transition - I believe Firefox does this - we need to capture this in the spec. I thought it was there but couldn't find it.
Comment 1 Aryeh Gregor 2012-02-17 16:09:16 UTC
We should just define that color transitions happen in premultiplied space.  Test case:

data:text/html,<!doctype html>
<body style="width:100px;color:green;
transition:color 5s linear">
The quick brown fox jumped over the lazy dog
<script>
setTimeout(function(){document.body.style.color = 'rgba(7,250,9,0)'},0)
setTimeout(function(){document.documentElement.textContent =
getComputedStyle(document.body).color},2500)
</script>

Add a prefix to the 'transition' property as appropriate.  Chrome 18 dev and Firefox trunk output "rgba(0, 128, 0, 0.5)" or something close to it, so they're using premultiplied space.  IE10 Developer Preview and Opera Next 12.00 alpha output "rgba(3, 189, 4, 0.5)" or something close to it, so they're doing non-premultiplied space.  The expected visual effect is always to do it in premultiplied space -- otherwise the transition can look quite weird.  This shouldn't be a special case for "transparent".

This is currently issue 6 in the spec.  I suggest it be resolved in favor of the Gecko/WebKit behavior.
Comment 2 Simon Fraser 2012-02-17 16:23:48 UTC
Agreed, although matching CSS gradients has been discussed in the past, and Mac WebKit (at least) can't do premultiplied gradients right now.
Comment 3 L. David Baron (Mozilla) 2012-02-17 19:15:16 UTC
Can we mark this a duplicate of bug 14624?
Comment 4 Sylvain Galineau 2012-02-17 21:57:31 UTC

*** This bug has been marked as a duplicate of bug 14624 ***