styling-inherit-02-t

raster image of styling-inherit-02-t

Tests inheritance, animation and effect of display:none on stop-color. Three rectangles are displayed. After a five second animation has completed, the test is passed if all three rectangles display a green to blue gradient.

The stop-color property is not inherited by default, but the value 'inherit' forces it to inherit the current animated value from its parent.

In the first subtest, the value of the stop-color property on the second stop is 'inherit'. Its parent, linearGradient with id "MyGradient" also has stop-color set to "inherit". The parent of this gradient is the group with id "g2" and the property stop-color is animated on that group. Thus, after the animation finishes, the inherited value is blue.

In the second subtest, the value of the stop-color property on the second stop is 'currentColor'. Its parent, linearGradient with id "MyGradient" does not have the color property set, but the property is inherited, so it inherits from the parent - the group with id "g2". The property color is animated on that group. Thus, after the animation finishes, the inherited value is again blue.

The third subtest is not animated. It checks that, per specification, the properties on a gradient are inherited from the point of definition, not the point of use. An implementation which does this incorrectly will show a green to red fill.