From f161a59343a9b595f8101a5a9ec409f23505db85 Mon Sep 17 00:00:00 2001 From: Scotty Simpson Date: Sat, 5 May 2018 07:22:01 -0700 Subject: [PATCH] Update animation.md --- docs/animation.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/animation.md b/docs/animation.md index 7e251580..54138756 100644 --- a/docs/animation.md +++ b/docs/animation.md @@ -17,7 +17,7 @@ Mithril does not provide any animation APIs per se, since these other options ar ### Animation on element creation -Animating an element via CSS when the element created couldn't be simpler. Just add an animation to a CSS class normally: +Animating an element via CSS when the element is created couldn't be simpler. Just add an animation to a CSS class normally: ```css .fancy {animation:fade-in 0.5s;} @@ -41,7 +41,7 @@ m.mount(document.body, FancyComponent) ### Animation on element removal -The problem with animating before removing an element is that we must wait until the animation is complete before we can actually remove the element. Fortunately, Mithril offers a [`onbeforeremove`](lifecycle-methods.md#onbeforeremove) hook that allows us to defer the removal of an element. +The problem with animating before removing an element is that we must wait until the animation is complete before we can actually remove the element. Fortunately, Mithril offers the [`onbeforeremove`](lifecycle-methods.md#onbeforeremove) hook that allows us to defer the removal of an element. Let's create an `exit` animation that fades `opacity` from 1 to 0.