CSS Transitions: Difference between revisions

→‎Under-specified Behavior: Add some information about css transitions and svg content
(→‎Under-specified Behavior: Add some information about css transitions and svg content)
Line 45: Line 45:
* ''What happens when an element's -webkit-transition* properties are modified?''
* ''What happens when an element's -webkit-transition* properties are modified?''
** If an element's -webkit-transition-* properties are changed (e.g. by dynamically changing the 'class' attribute such that a new set of style rules apply to it), the new style should be used to determine which properties should have active transitions (previous versions of webkit actually used the old style, but at some point the behavior was switched to use the new style's transition definitions)
** If an element's -webkit-transition-* properties are changed (e.g. by dynamically changing the 'class' attribute such that a new set of style rules apply to it), the new style should be used to determine which properties should have active transitions (previous versions of webkit actually used the old style, but at some point the behavior was switched to use the new style's transition definitions)
* ''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
** 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."
** 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