summaryrefslogtreecommitdiff
path: root/testsuite/reftests/color-transition.css
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2015-06-26 21:08:04 +0200
committerBenjamin Otte <otte@redhat.com>2015-06-26 21:12:50 +0200
commitcd3f24d5793e038ee29d780b24747707c73ad00c (patch)
tree4e06de6da08db1f87e31219dcb4ea4e547cb1f35 /testsuite/reftests/color-transition.css
parent142abce46a18ef09ca77ed581cf3b385671c9515 (diff)
downloadgtk+-cd3f24d5793e038ee29d780b24747707c73ad00c.tar.gz
cssvalue: Change color transitions to run premultiplied
Previously, the unpremultiplied values from the GdkRGBA were taken. Now we premultiply the color values as specified by the CSS specs. This is only relevant when transitioning with translucent colors. An example is the halfway transition between transparent (0, 0, 0, 0) and white (1, 1, 1, 1). Previously, all 4 values where transitioned separately and the result was semi-transparent gray (0.5, 0.5, 0.5, 0.5). By depending on the alpha value, the result is now semi-transparent white (1, 1, 1, 0.5) which is what one would naively expect. New reftest: color-transition
Diffstat (limited to 'testsuite/reftests/color-transition.css')
-rw-r--r--testsuite/reftests/color-transition.css18
1 files changed, 18 insertions, 0 deletions
diff --git a/testsuite/reftests/color-transition.css b/testsuite/reftests/color-transition.css
new file mode 100644
index 0000000000..ac964b00b6
--- /dev/null
+++ b/testsuite/reftests/color-transition.css
@@ -0,0 +1,18 @@
+@import "reset-to-defaults.css";
+
+@keyframes foo {
+ 100% { background-color: blue; }
+}
+
+GtkWindow {
+ background-color: #7F0080;
+}
+
+GtkBox {
+ background-color: red;
+}
+
+GtkBox GtkBox {
+ background-color: transparent;
+ animation: foo 100s steps(2);
+}