CSS Transitions: Difference between revisions

→‎Under-specified Behavior: clarify SVG behavior
m (→‎Comparison with SMIL animations: make this a bigger hader)
(→‎Under-specified Behavior: clarify SVG behavior)
Line 47: Line 47:
* ''Do CSS Transitions apply to SVG content?''
* ''Do CSS Transitions apply to SVG content?''
** dholbert asked about this since it could be quite complex to deal with interactions between SVG content that had both CSS Transitions and SMIL animations defined
** dholbert asked about this since it could be quite complex to deal with interactions between SVG content that had both CSS Transitions and SMIL animations defined
** I can't seem to find a definitive answer to this question, however, the [http://webkit.org/blog/138/css-animation/ blog post introducing webkit's CSS transitions] contains several comments from Apple developers, including: "there’s also no reason you can’t apply CSS animations to SVG."
** I saw some statements that implied that they should work, but when I tested CSS transitions with some SVG content on WebKit, I couldn't get it to work.  I talked with Dave Hyatt, who said that it should work. But apparently only a subset of SVG CSS properties were supported (not the ones I was testing), so he added support for a few more properties while we talked.
** On the other hand, I tried to apply CSS transitions to a svg file in webkit trunk and was not able to create any animations.
* webkit does not support any shorthand properties for -webkit-transition-property
* webkit does not support any shorthand properties for -webkit-transition-property
* When animating to or from 'auto' (e.g. for the 'width' property), webkit animates, but treats 'auto' as 0 (in other words, if you don't have a transition active for width, it would end up at a different value than if a transition ''is'' active for width.  This is clearly a bug).  When changing the property to a percentage (e.g. width:50%), webkit does not animate at all, it just updates the value immediately to the new value.
* When animating to or from 'auto' (e.g. for the 'width' property), webkit animates, but treats 'auto' as 0 (in other words, if you don't have a transition active for width, it would end up at a different value than if a transition ''is'' active for width.  This is clearly a bug).  When changing the property to a percentage (e.g. width:50%), webkit does not animate at all, it just updates the value immediately to the new value.
14

edits