-
This page lists errata from the book (hopefully not too much!), changes to the specifications since publication, and brand new features.
Categories
Opera have recently released a new preview of version 12 of their browser, which features support for CSS Animations, and the updated linear-gradient syntax. The tables and examples in Chapter 13 and Chapter 11 (respectively) have been updated.
— 29 March, 2012
Since the release of the book two changes have been introduced to the CSS Animations module. The first is a new value for the animation-timing-function property, which is the steps() function. This accepts as a value any whole number, and runs the animation in that number of frames. For example:
@keyframes leftright {
from { left: 0; }
to { left: 100px; }
}
div { animation: leftright 4s steps(20) infinite; }
In this example the div would move from left to right over four seconds, but would do it in 20 steps rather than one smooth movement. You can see this in action in Example 13-4a.
Also new is the animation-fill-mode property. This sets how the selected element will be displayed when an animation has finished running or is delayed. A value of backwards applies the styles from the 0% or from keyframe, while a value of forwards will apply the styles from the 100% or to keyframe (other possible values are none or both).
div { animation-fill-mode: forwards; }
This is easier demonstrated, so take a look at Example 13-4b. The element on the left has the forwards value, and on the right, backwards. When the animation has finished running you can see the difference. If you’re still unclear, MDN has more information on animation-fill-mode.
Both of these new features are implemented in WebKit, Firefox, and IE10 Platform Preview.
— 10 November, 2011
The version of IE10 which is available in the Windows 8 Developer Preview supports CSS Animations and Transitions, so the examples in Chapter 13 have been updated to reflect that.
Bear in mind that these features are not confirmed for the final release of IE10, but there’s a good chance they will be. Also note: Animations is not currently 100% compliant with the specification — this should hopefully be resolved before release.
— 25 September, 2011
The @keyframes at-rule and animation properties are now supported with the -moz- prefix in Firefox 5 (currently in Beta), and Example 13–4 has been updated to reflect this. However, in accordance with the latest version of the CSS Animations Module, the name of the animation can no longer be a space-separated string, so quoting the name will not work; this being the case, the examples used in the book will need to be updated, such as this one from page 173:
@keyframes expand {
from { border-width: 10px; }
50% { border-width: 1px; }
to {
border-width: 1px;
height: 120px;
width: 150px;
}
}
The WebKit implementation will work perfectly well without string quotes, so the online examples have been updated to exclude them.
— 13 June, 2011