W3C home > Mailing lists > Public > www-style@w3.org > January 2012

[css3-animations] Override of animation rule by !important

From: Sylvain Galineau <sylvaing@microsoft.com>
Date: Fri, 20 Jan 2012 00:01:51 +0000
To: "www-style@w3.org" <www-style@w3.org>
Message-ID: <3C4041FF83E1E04A986B6DC50F01782903402DA3@TK5EX14MBXC296.redmond.corp.microsoft.com>
We resolved during the 1/4 telcon [1] to allow !important user rules to override 
animations.

While this seems reasonable and coherent with the overall CSS model, we need
to understand what it means in scenarios such as:

	@keyframes colorChange {
      	from { color: red; }
            to { color: blue; }
	}
	div { 
		animation: colorChange 4s infinite alternate; 
		transition: color 1s;
	}

/* user stylesheet */
div:hover { color: green !important; }


Obviously the fun part is when the :hover rule matches during the animation.

- Does the :hover transition starts from whatever intermediate value was last
applied by colorChange?
- What happens when the user hovers away? Transitioning back to a moving target
is not easy nor is it clearly desirable. Nor would a reversal look appropriate.

Thoughts?



[1] http://lists.w3.org/Archives/Public/www-style/2012Jan/0099.html
Received on Friday, 20 January 2012 00:02:35 GMT

This archive was generated by hypermail 2.3.1 : Tuesday, 26 March 2013 17:20:48 GMT