diff --git a/aio/content/examples/animations/src/app/app.component.html b/aio/content/examples/animations/src/app/app.component.html index c2d1188f70..1deca03101 100644 --- a/aio/content/examples/animations/src/app/app.component.html +++ b/aio/content/examples/animations/src/app/app.component.html @@ -12,10 +12,12 @@ Toggle All Animations Auto Calculation Filter/Stagger Hero Groups + Insert/Remove +
-Here's another code sample using the wildcard state together with our previous example using the `open` and `closed` states. Instead of defining each state-to-state transition pair, we're now saying that any transition to `closed` takes 1 second, and any transition to `open` takes 0.5 seconds.
+The following is another code sample using the wildcard state together with the previous example using the `open` and `closed` states.
+Instead of defining each state-to-state transition pair, any transition to `closed` takes 1 second, and any transition to `open` takes 0.5 seconds.
This allows us to add new states without having to include separate transitions for each one.
@@ -30,7 +32,9 @@ Use a double arrow syntax to specify state-to-state transitions in both directio
### Using wildcard state with multiple transition states
-In our two-state button example, the wildcard isn't that useful because there are only two possible states, `open` and `closed`. Wildcard states are better when an element in one particular state has multiple potential states that it can change to. If our button can change from `open` to either `closed` or something like `inProgress`, using a wildcard state could reduce the amount of coding needed.
+In the two-state button example, the wildcard isn't that useful because there are only two possible states, `open` and `closed`.
+Wildcard states are better when an element in one particular state has multiple potential states that it can change to.
+If the button can change from `open` to either `closed` or something like `inProgress`, using a wildcard state could reduce the amount of coding needed.
@@ -73,18 +77,18 @@ This section shows how to animate elements entering or leaving a page.
@@ -227,9 +239,13 @@ The code for this color change might look like this.
### Offset
-Keyframes include an *offset* that defines the point in the animation where each style change occurs. Offsets are relative measures from zero to one, marking the beginning and end of the animation, respectively and should be applied to each of the keyframe's steps if used at least once.
+Keyframes include an *offset* that defines the point in the animation where each style change occurs.
+Offsets are relative measures from zero to one, marking the beginning and end of the animation, respectively and should be applied to each of the keyframe's steps if used at least once.
-Defining offsets for keyframes is optional. If you omit them, evenly spaced offsets are automatically assigned. For example, three keyframes without predefined offsets receive offsets of 0, 0.5, and 1. Specifying an offset of 0.8 for the middle transition in the above example might look like this.
+Defining offsets for keyframes is optional.
+If you omit them, evenly spaced offsets are automatically assigned.
+For example, three keyframes without predefined offsets receive offsets of 0, 0.5, and 1.
+Specifying an offset of 0.8 for the middle transition in the above example might look like this.
@@ -248,9 +264,9 @@ Use keyframes to create a pulse effect in your animations by defining styles at
Here's an example of using keyframes to create a pulse effect:
-* The original `open` and `closed` states, with the original changes in height, color, and opacity, occurring over a timeframe of 1 second
+* The original `open` and `closed` states, with the original changes in height, color, and opacity, occurring over a timeframe of 1 second.
-* A keyframes sequence inserted in the middle that causes the button to appear to pulsate irregularly over the course of that same 1-second timeframe
+* A keyframes sequence inserted in the middle that causes the button to appear to pulsate irregularly over the course of that same 1-second timeframe.
@@ -262,7 +278,8 @@ The code snippet for this animation might look like this.
### Animatable properties and units
-Angular's animation support builds on top of web animations, so you can animate any property that the browser considers animatable. This includes positions, sizes, transforms, colors, borders, and more. The W3C maintains a list of animatable properties on its [CSS Transitions](https://www.w3.org/TR/css-transitions-1/) page.
+Angular's animation support builds on top of web animations, so you can animate any property that the browser considers animatable.
+This includes positions, sizes, transforms, colors, borders, and more. The W3C maintains a list of animatable properties on its [CSS Transitions](https://www.w3.org/TR/css-transitions-1/) page.
For positional properties with a numeric value, define a unit by providing the value as a string, in quotes, with the appropriate suffix:
@@ -270,15 +287,19 @@ For positional properties with a numeric value, define a unit by providing the v
* Relative font size: `'3em'`
* Percentage: `'100%'`
-If you don't provide a unit when specifying dimension, Angular assumes a default unit of pixels, or px. Expressing 50 pixels as `50` is the same as saying `'50px'`.
+If you don't provide a unit when specifying dimension, Angular assumes a default unit of pixels, or px.
+Expressing 50 pixels as `50` is the same as saying `'50px'`.
### Automatic property calculation with wildcards
-Sometimes you don't know the value of a dimensional style property until runtime. For example, elements often have widths and heights that depend on their content and the screen size. These properties are often challenging to animate using CSS.
+Sometimes you don't know the value of a dimensional style property until runtime.
+For example, elements often have widths and heights that depend on their content and the screen size.
+These properties are often challenging to animate using CSS.
In these cases, you can use a special wildcard `*` property value under `style()`, so that the value of that particular style property is computed at runtime and then plugged into the animation.
-In this example, we have a trigger called `shrinkOut`, used when an HTML element leaves the page. The animation takes whatever height the element has before it leaves, and animates from that height to zero.
+The following example has a trigger called `shrinkOut`, used when an HTML element leaves the page.
+The animation takes whatever height the element has before it leaves, and animates from that height to zero.