Cool that you open-source a book - it looks like it contains a solid amount of information. Well done!<p>What I'm missing (couldn't find it on the first glance) is a topic about the performance implications of animations.
Most devs don't consider which css properties trigger a layout->paint->composite re-render, which has massive influence on browser performance.<p>There are soooo many shitty animations/transitions in the web, just because people don't know that animations can slow down a whole site.<p>Imho people should read something like the web dev one pager on animation performance (1), which explains (more or less) how to build high-performance animations.<p>There is also this free udacity course (2) which explains everything a web developer needs to know. It's not hard nor magic, and you just have to hear it once to remember it for whenever it becomes necessary.<p>1: <a href="https://developers.google.com/web/fundamentals/design-and-ux/animations/animations-and-performance" rel="nofollow">https://developers.google.com/web/fundamentals/design-and-ux...</a>
2: <a href="https://eu.udacity.com/course/browser-rendering-optimization--ud860" rel="nofollow">https://eu.udacity.com/course/browser-rendering-optimization...</a>
Just don't be tempted to add all the animations you can think of after reading something like this (similar to what often happens to other developers after reading about design patterns.) If anything, you should probably err on the side of not using animation.<p>(Unless it's a game or such, in which case definitely be more liberal with animating things.)
Something important which I think is missing from the accessibility section is a reference to the prefers-reduced-motion CSS media feature [0]. When it was initially released the WebKit team wrote a post [1] explaining its purpose, how to use it, and many practical examples. I'd suggest including a link to their post.<p>It's currently supported by Firefox and Safari [2]. The Chromium team recently began working on it as well [3]. Edge's Platform Status [4] has it marked as a low-priority issue; given the included explanation they'll probably wait for Chromium to finish implementing it and copy them. Please consider taking a minute to vote on the issue if you consider it important.<p>WCAG 2.1 Level AAA requires that animations from interactions have a way to be disabled [5]. I wish more developers would implement this, although in my case it's just because I generally don't care much for animations.<p>There's no mention of springs, which is essential for creating animations that feel natural. I remember having my mind blown when I first learned about these animation techniques. Just knowing they exists lets you expand your toolkit, even if you don't regularly work on UI development. "Creating Animations and Interactions with Physical Models" [6] has a superb explanation.<p>The book references it in passing, but I want to highlight Disney's Twelve Basic Principles of Animation. I was first exposed to them in the wonderful animation: "The illusion of life" [7], and it remains my preferred resource for quickly introducing others to the concepts. They also put up each individual rule as gifs on tumblr [8] if you prefer to skip the video. This is one of those foundational building blocks that you start to notice everywhere after learning about it.<p>[0] <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/@media/prefers-reduced-motion" rel="nofollow">https://developer.mozilla.org/en-US/docs/Web/CSS/@media/pref...</a><p>[1] <a href="https://webkit.org/blog/7551/responsive-design-for-motion/" rel="nofollow">https://webkit.org/blog/7551/responsive-design-for-motion/</a><p>[2] <a href="https://caniuse.com/#search=prefers-reduced-motion" rel="nofollow">https://caniuse.com/#search=prefers-reduced-motion</a><p>[3] <a href="https://bugs.chromium.org/p/chromium/issues/detail?id=722548" rel="nofollow">https://bugs.chromium.org/p/chromium/issues/detail?id=722548</a><p>[4] <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/status/mediaqueriesprefersreducedmotion/" rel="nofollow">https://developer.microsoft.com/en-us/microsoft-edge/platfor...</a><p>[5] <a href="https://www.w3.org/TR/WCAG21/#animation-from-interactions" rel="nofollow">https://www.w3.org/TR/WCAG21/#animation-from-interactions</a><p>[6] <a href="https://iamralpht.github.io/physics/" rel="nofollow">https://iamralpht.github.io/physics/</a><p>[7] <a href="https://vimeo.com/93206523" rel="nofollow">https://vimeo.com/93206523</a><p>[8] <a href="http://the12principles.tumblr.com/" rel="nofollow">http://the12principles.tumblr.com/</a>
other than css tricks, as far as animation is concerned, webp is replacing gif:<p><a href="https://caniuse.com/#feat=webp" rel="nofollow">https://caniuse.com/#feat=webp</a>