Animation iteration count
Author: o | 2025-04-25
animation-iteration-count: single-animation-iteration-count [ ', ' single-animation-iteration-count ] Values single-animation-iteration-count = infinite
The CSS animation-iteration-count
When working with CSS animations, you may want to control the number of times an animation repeats, which is where the animation-iteration-count property comes into play. Sometimes, CSS doesn't behave as we expect, especially when it comes to looping animations.By default, an animation will occur once and then stop. So, if you want your animation to repeat several times, or infinitely for something like a loading animation, you'll need to set a specific number of iterations with the animation-iteration-count property.Once you know how animation-iteration-count works, you can create engaging repeating animations for your web pages. Let's dive deeper into this property and its usage.The animation-iteration-count CSS property specifies how many times an animation sequence will play. If the iteration count is finite, the animation will stop after the specified number of cycles. The rule is written as follows:animation-iteration-count: infinite | | initial | inherit;animation-iteration-count ValuesThe animation-iteration-count property can take several values. Its main values are infinite and , and the property also accepts the global values initial and inherit. Let’s go through each one now.infiniteIf assigned an animation-iteration-count value of infinite, the animation will repeat infinitely. This is the best value for an animation that you don’t want stopping on its own.See the Pen animation-iteration-count: infinite by Christina Perricone (@hubspot) on CodePen.A numeric value for animation-iteration-count causes the animation to repeat the stated number of times. For example, a value of 3 will cause the animation to cycle three times.See the Pen animation-iteration-count: number by Christina Perricone (@hubspot) on CodePen.If a value for animation-iteration-count is not specified, this value defaults to 1, and the animation will cycle once. A value of 0 prevents the animation from playing.You can also use a decimal to stop the animation before completing its final cycle. For example, a value of 2.5 will cause the animation to cycle two and a half times.See the Pen animation-iteration-count: decimal by Christina Perricone (@hubspot) on CodePen.initialThe initial value sets the value of animation-iteration-count to its default, 1.inheritIf inherit is specified, animation-iteration-count will inherit the value from the parent element.Multiple Values for animation-iteration-countIn the above examples, we’ve assigned just one value to animation-iteration-count, but this property (as well as other CSS animation properties) can handle multiple values as well. This allows you to assign different iteration counts to different animations.To add multiple values to animation-iteration-count, add values separated by commas, like so:animation-iteration-count: 3, 5, infinite;Listing multiple values for animation-iteration-count (and other CSS animation properties) assigns each value to a value listed with the animation-name property based on the order of the list. The first value of animation-iteration-count applies to the first value of animation-name, the second value of animation-iteration-count applies to the second value of animation-name, and so on.Here’s The CSS animation-iteration-countdefines how many times the animation should be played. It is specified by two values: number and infinite. The default value is 1, but any number can be set. 0 or negative values are invalid. If the infinite value sets the animation, it will be played forever. If multiple values are used every time the animation is played the next value of the list is used. When multiple comma-separated values are specified for any animation property, they will be attached to the animations that are defined in animation-name differently. The animation-iteration-count property is one of the CSS3 properties. Initial Value 1 Applies to All elements, ::before and ::after pseudo-elements. Inherited No. Animatable No. Version CSS3 DOM Syntax object.style.animationIterationCount = "infinite"; animation-iteration-count: number | infinite | initial | inherit; Example of the animation-iteration-count property: html>html> head> title>Title of the documenttitle> style> html, body { margin: 0; padding: 0; } div { position: relative; width: 100px; height: 100px; margin: 30px 0; border-radius: 50%; animation-name: pulse; } .element-one { background-color: #1c87c9; animation-duration: 3s; animation-iteration-count: 3; } .element-two { margin: 0; background-color: #83bf42; animation-duration: 5s; animation-iteration-count: 2; } @keyframes pulse { 0% { left: 0; } 50% { left: 50%; } 100% { left: 0; } } style> head> body> h2>The animation-iteration-count exampleh2> p>The animation-iteration-count sets the number of times an animation cycle should be played before stopping.p> div class="element-one">div> div class="element-two">div> body>html> Example of the animation-iteration-count property with the "infinite" value: html>html> head> title>Title of the documenttitle> style> html, body { margin: 0; padding: 0; } div { position: relative; width: 100px; height: 100px; margin: 30px 0; border-radius: 50%; animation-name: pulse; } .element-one { background-color: #1c87c9; animation-duration: 3s; animation-iteration-count: infinite; } .element-two { margin: 0; background-color: #83bf42; animation-duration: 5s; animation-iteration-count: 2; } @keyframes pulse { 0% { left: 0; } 50% { left: 50%; } 100% { left: 0; } } style> head> body> h2>The animation-iteration-count exampleh2> p>The animation-iteration-count property sets the number of times an animation cycle should be played before stopping.p> div class="element-one">div> div class="element-two">div> body>html> Value DescriptionPlay it number Defines how many times the animation should be played. Default value is 1.Play it » infinite The animation is played without stopping.Play it » initial Sets the property to its default value. inherit Inherits the property from its parent element.Animation Iteration Count in CSS
Topic: CSS3 Properties ReferencePrev|Next Description The animation-direction CSS property specifies whether the animation should play in reverse on alternate cycles or not. The following table summarizes the usages context and the version history of this property. Syntax The syntax of the property is given with: animation-direction: normal | reverse | alternate | alternate-reverse | initial | inherit The example below shows the animation-direction property in action. .box { width: 50px; height: 50px; background: red; position: relative; /* Chrome, Safari, Opera */ -webkit-animation-name: moveit; -webkit-animation-duration: 4s; -webkit-animation-iteration-count: 2; -webkit-animation-direction: alternate; /* Standard syntax */ animation-name: moveit; animation-duration: 4s; animation-iteration-count: 2; animation-direction: alternate;} /* Chrome, Safari, Opera */@-webkit-keyframes moveit { from {left: 0;} to {left: 50%;}} /* Standard syntax */@keyframes moveit { from {left: 0;} to {left: 50%;}} Note: The animation-direction property has no effect if the animation is set to play only once, see animation-iteration-count property. Property Values The following table describes the values of this property. Value Description normal The animation should play forward in each cycle. This is default. reverse The animation should play backward in each cycle. alternate The animation plays forward in the first cycle, then play backward, then continues to alternate. alternate-reverse The animation plays backward in the first cycle, then play forward, then continues to alternate. initial Sets this property to its default value. inherit If specified, the associated element takes the computed value of its parent element animation-direction property. Browser Compatibility The animation-direction property is supported in all major modern browsers. Basic Support— Firefox 5+ -moz-, 15+ Google Chrome 4+ -webkit- Internet Explorer 10+ Apple Safari 4+ -webkit- Opera 12+ -o-, 15+ -webkit- Further Reading See tutorial on: CSS3 Animations. Related properties and at-rules: animation, animation-name, animation-delay, animation-timing-function, animation-iteration-count, animation-direction, animation-fill-mode, animation-play-state, @keyframes.. animation-iteration-count: single-animation-iteration-count [ ', ' single-animation-iteration-count ] Values single-animation-iteration-count = infiniteAnimation play count: animation-iteration-countAnimations
Of three times per second or greater - which can trigger photosensitive epilepsy.All included animations now support and leverage the prefers-reduced-motion CSS media feature to detect if a user has requested that the system minimize the amount of non-essential motion it uses.CaseHow It Affects Included AnimationsNo preference set (default)Animations will render as expectedPreference set to reduceAnimations will be disabledWhen a prefers-reduced-motion is set to reduce, it indicates that the user prefers less motion, which may trigger discomfort for those with vestibular motion disorders on the page.CustomizationWe’ve added CSS custom properties to make customizing easier and more efficient, and you can use these custom properties across all of our animations. Define your own values for the following properties to override and customize Font Awesome’s defaults.CSS Custom PropertyDetailsAccepted Values--fa-animation-delaySet an initial delay for animationAny valid CSS animation-delay value--fa-animation-directionSet direction for animationAny valid CSS animation-direction value--fa-animation-durationSet duration for animationAny valid CSS animation-duration value--fa-animation-iteration-countSet number of iterations for animationAny valid CSS animation-iteration-count value--fa-animation-timingSet how the animation progresses through framesAny valid CSS animation-timing-function value div class="fa-3x"> i class="fa-solid fa-cog fa-spin">i> i class="fa-solid fa-cog fa-spin" style="--fa-animation-direction: reverse;">i> i class="fa-solid fa-cog fa-spin" style="--fa-animation-duration: 15s;">i> i class="fa-solid fa-compact-disc fa-spin" style="--fa-animation-duration: 30s; --fa-animation-iteration-count: 1;">i> i class="fa-solid fa-tire fa-spin" style="--fa-animation-duration: 3s; --fa-animation-iteration-count: 5;--fa-animation-timing: ease-in-out;">i>div>Icon Animation + WobblesWe’ve worked hard to keep icons perfectly centered when they spin or pulse. However, we’ve seen issues with several browsers with the Web Fonts + CSS method of Font Awesome. This appears to be an issue with web fonts in general and not something we can directly fix. We do have a couple of ways you might be able to work around this:Set the display of the animating icon — Use display: block; where you can. This seems to help a lot with this issue.Use multiples of 16px (the base font size) — We’ve noticed the wobble is more noticeable otherwise.Switch Frameworks — Switch to the SVG with JavaScript method; it’s working a lot better for this.Conflicts with animate.cssOlder versions of animate.css also used the fast CSS class selector to control the speed of animations.Since Font Awesome also uses this class selector, they conflict :root { --animation-state: paused; } /* user picked a theme where the "regular" scheme is dark */ /* user picked a theme a light scheme and also enabled a dark scheme */ /* deal with light scheme first */ @media (prefers-color-scheme: light) { :root { --primary: #222222; --secondary: #ffffff; --tertiary: #0088cc; --highlight: #ffff4d; --success: #009900; } } /* then deal with dark scheme */ @media (prefers-color-scheme: dark) { :root { --primary: #222222; --secondary: #ffffff; --tertiary: #0088cc; --highlight: #ffff4d; --success: #009900; } } /* these styles need to live here because the SVG has a different scope */ .dots { animation-name: loader; animation-timing-function: ease-in-out; animation-duration: 3s; animation-iteration-count: infinite; animation-play-state: var(--animation-state); stroke: #fff; stroke-width: 0.5px; transform-origin: center; opacity: 0; r: max(1vw, 11px); cy: 50%; filter: saturate(2) opacity(0.85); fill: var(--tertiary); } .dots:nth-child(2) { animation-delay: 0.15s; } .dots:nth-child(3) { animation-delay: 0.3s; } .dots:nth-child(4) { animation-delay: 0.45s; } .dots:nth-child(5) { animation-delay: 0.6s; } @keyframes loader { 0% { opacity: 0; transform: scale(1); } 45% { opacity: 1; transform: scale(0.7); } 65% { opacity: 1; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1); } } Loading DiscourseThe animation-iteration-count property - a number of animation
:root { --animation-state: paused; } /* user picked a theme where the "regular" scheme is dark */ /* user picked a theme a light scheme and also enabled a dark scheme */ /* deal with light scheme first */ @media (prefers-color-scheme: light) { :root { --primary: #000000; --secondary: #dbdbd5; --tertiary: #A55030; --highlight: #518751; --success: #518751; } } /* then deal with dark scheme */ @media (prefers-color-scheme: dark) { :root { --primary: #000000; --secondary: #dbdbd5; --tertiary: #A55030; --highlight: #518751; --success: #518751; } } /* these styles need to live here because the SVG has a different scope */ .dots { animation-name: loader; animation-timing-function: ease-in-out; animation-duration: 3s; animation-iteration-count: infinite; animation-play-state: var(--animation-state); stroke: #fff; stroke-width: 0.5px; transform-origin: center; opacity: 0; r: max(1vw, 11px); cy: 50%; filter: saturate(2) opacity(0.85); fill: var(--tertiary); } .dots:nth-child(2) { animation-delay: 0.15s; } .dots:nth-child(3) { animation-delay: 0.3s; } .dots:nth-child(4) { animation-delay: 0.45s; } .dots:nth-child(5) { animation-delay: 0.6s; } @keyframes loader { 0% { opacity: 0; transform: scale(1); } 45% { opacity: 1; transform: scale(0.7); } 65% { opacity: 1; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1); } } LoadingCSS ANIMATION ITERATION COUNT MacroNepal
:root { --animation-state: paused; } /* user picked a theme where the "regular" scheme is dark */ /* user picked a theme a light scheme and also enabled a dark scheme */ /* deal with light scheme first */ @media (prefers-color-scheme: light) { :root { --primary: #222222; --secondary: #ffffff; --tertiary: #448AFF; --highlight: #ffff4d; --success: #009900; } } /* then deal with dark scheme */ @media (prefers-color-scheme: dark) { :root { --primary: #dddddd; --secondary: #222222; --tertiary: #448AFF; --highlight: #a87137; --success: #1ca551; } } /* these styles need to live here because the SVG has a different scope */ .dots { animation-name: loader; animation-timing-function: ease-in-out; animation-duration: 3s; animation-iteration-count: infinite; animation-play-state: var(--animation-state); stroke: #fff; stroke-width: 0.5px; transform-origin: center; opacity: 0; r: max(1vw, 11px); cy: 50%; filter: saturate(2) opacity(0.85); fill: var(--tertiary); } .dots:nth-child(2) { animation-delay: 0.15s; } .dots:nth-child(3) { animation-delay: 0.3s; } .dots:nth-child(4) { animation-delay: 0.45s; } .dots:nth-child(5) { animation-delay: 0.6s; } @keyframes loader { 0% { opacity: 0; transform: scale(1); } 45% { opacity: 1; transform: scale(0.7); } 65% { opacity: 1; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1); } } Loading. animation-iteration-count: single-animation-iteration-count [ ', ' single-animation-iteration-count ] Values single-animation-iteration-count = infiniteCSS animation-iteration-count Property
:root { --animation-state: paused; } /* user picked a theme where the "regular" scheme is dark */ /* user picked a theme a light scheme and also enabled a dark scheme */ /* deal with light scheme first */ @media (prefers-color-scheme: light) { :root { --primary: #222222; --secondary: #ffffff; --tertiary: #0088cc; --highlight: #ffff4d; --success: #009900; } } /* then deal with dark scheme */ @media (prefers-color-scheme: dark) { :root { --primary: #222222; --secondary: #ffffff; --tertiary: #0088cc; --highlight: #ffff4d; --success: #009900; } } /* these styles need to live here because the SVG has a different scope */ .dots { animation-name: loader; animation-timing-function: ease-in-out; animation-duration: 3s; animation-iteration-count: infinite; animation-play-state: var(--animation-state); stroke: #fff; stroke-width: 0.5px; transform-origin: center; opacity: 0; r: max(1vw, 11px); cy: 50%; filter: saturate(2) opacity(0.85); fill: var(--tertiary); } .dots:nth-child(2) { animation-delay: 0.15s; } .dots:nth-child(3) { animation-delay: 0.3s; } .dots:nth-child(4) { animation-delay: 0.45s; } .dots:nth-child(5) { animation-delay: 0.6s; } @keyframes loader { 0% { opacity: 0; transform: scale(1); } 45% { opacity: 1; transform: scale(0.7); } 65% { opacity: 1; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1); } } LoadingComments
When working with CSS animations, you may want to control the number of times an animation repeats, which is where the animation-iteration-count property comes into play. Sometimes, CSS doesn't behave as we expect, especially when it comes to looping animations.By default, an animation will occur once and then stop. So, if you want your animation to repeat several times, or infinitely for something like a loading animation, you'll need to set a specific number of iterations with the animation-iteration-count property.Once you know how animation-iteration-count works, you can create engaging repeating animations for your web pages. Let's dive deeper into this property and its usage.The animation-iteration-count CSS property specifies how many times an animation sequence will play. If the iteration count is finite, the animation will stop after the specified number of cycles. The rule is written as follows:animation-iteration-count: infinite | | initial | inherit;animation-iteration-count ValuesThe animation-iteration-count property can take several values. Its main values are infinite and , and the property also accepts the global values initial and inherit. Let’s go through each one now.infiniteIf assigned an animation-iteration-count value of infinite, the animation will repeat infinitely. This is the best value for an animation that you don’t want stopping on its own.See the Pen animation-iteration-count: infinite by Christina Perricone (@hubspot) on CodePen.A numeric value for animation-iteration-count causes the animation to repeat the stated number of times. For example, a value of 3 will cause the animation to cycle three times.See the Pen animation-iteration-count: number by Christina Perricone (@hubspot) on CodePen.If a value for animation-iteration-count is not specified, this value defaults to 1, and the animation will cycle once. A value of 0 prevents the animation from playing.You can also use a decimal to stop the animation before completing its final cycle. For example, a value of 2.5 will cause the animation to cycle two and a half times.See the Pen animation-iteration-count: decimal by Christina Perricone (@hubspot) on CodePen.initialThe initial value sets the value of animation-iteration-count to its default, 1.inheritIf inherit is specified, animation-iteration-count will inherit the value from the parent element.Multiple Values for animation-iteration-countIn the above examples, we’ve assigned just one value to animation-iteration-count, but this property (as well as other CSS animation properties) can handle multiple values as well. This allows you to assign different iteration counts to different animations.To add multiple values to animation-iteration-count, add values separated by commas, like so:animation-iteration-count: 3, 5, infinite;Listing multiple values for animation-iteration-count (and other CSS animation properties) assigns each value to a value listed with the animation-name property based on the order of the list. The first value of animation-iteration-count applies to the first value of animation-name, the second value of animation-iteration-count applies to the second value of animation-name, and so on.Here’s
2025-04-05The CSS animation-iteration-countdefines how many times the animation should be played. It is specified by two values: number and infinite. The default value is 1, but any number can be set. 0 or negative values are invalid. If the infinite value sets the animation, it will be played forever. If multiple values are used every time the animation is played the next value of the list is used. When multiple comma-separated values are specified for any animation property, they will be attached to the animations that are defined in animation-name differently. The animation-iteration-count property is one of the CSS3 properties. Initial Value 1 Applies to All elements, ::before and ::after pseudo-elements. Inherited No. Animatable No. Version CSS3 DOM Syntax object.style.animationIterationCount = "infinite"; animation-iteration-count: number | infinite | initial | inherit; Example of the animation-iteration-count property: html>html> head> title>Title of the documenttitle> style> html, body { margin: 0; padding: 0; } div { position: relative; width: 100px; height: 100px; margin: 30px 0; border-radius: 50%; animation-name: pulse; } .element-one { background-color: #1c87c9; animation-duration: 3s; animation-iteration-count: 3; } .element-two { margin: 0; background-color: #83bf42; animation-duration: 5s; animation-iteration-count: 2; } @keyframes pulse { 0% { left: 0; } 50% { left: 50%; } 100% { left: 0; } } style> head> body> h2>The animation-iteration-count exampleh2> p>The animation-iteration-count sets the number of times an animation cycle should be played before stopping.p> div class="element-one">div> div class="element-two">div> body>html> Example of the animation-iteration-count property with the "infinite" value: html>html> head> title>Title of the documenttitle> style> html, body { margin: 0; padding: 0; } div { position: relative; width: 100px; height: 100px; margin: 30px 0; border-radius: 50%; animation-name: pulse; } .element-one { background-color: #1c87c9; animation-duration: 3s; animation-iteration-count: infinite; } .element-two { margin: 0; background-color: #83bf42; animation-duration: 5s; animation-iteration-count: 2; } @keyframes pulse { 0% { left: 0; } 50% { left: 50%; } 100% { left: 0; } } style> head> body> h2>The animation-iteration-count exampleh2> p>The animation-iteration-count property sets the number of times an animation cycle should be played before stopping.p> div class="element-one">div> div class="element-two">div> body>html> Value DescriptionPlay it number Defines how many times the animation should be played. Default value is 1.Play it » infinite The animation is played without stopping.Play it » initial Sets the property to its default value. inherit Inherits the property from its parent element.
2025-04-17Topic: CSS3 Properties ReferencePrev|Next Description The animation-direction CSS property specifies whether the animation should play in reverse on alternate cycles or not. The following table summarizes the usages context and the version history of this property. Syntax The syntax of the property is given with: animation-direction: normal | reverse | alternate | alternate-reverse | initial | inherit The example below shows the animation-direction property in action. .box { width: 50px; height: 50px; background: red; position: relative; /* Chrome, Safari, Opera */ -webkit-animation-name: moveit; -webkit-animation-duration: 4s; -webkit-animation-iteration-count: 2; -webkit-animation-direction: alternate; /* Standard syntax */ animation-name: moveit; animation-duration: 4s; animation-iteration-count: 2; animation-direction: alternate;} /* Chrome, Safari, Opera */@-webkit-keyframes moveit { from {left: 0;} to {left: 50%;}} /* Standard syntax */@keyframes moveit { from {left: 0;} to {left: 50%;}} Note: The animation-direction property has no effect if the animation is set to play only once, see animation-iteration-count property. Property Values The following table describes the values of this property. Value Description normal The animation should play forward in each cycle. This is default. reverse The animation should play backward in each cycle. alternate The animation plays forward in the first cycle, then play backward, then continues to alternate. alternate-reverse The animation plays backward in the first cycle, then play forward, then continues to alternate. initial Sets this property to its default value. inherit If specified, the associated element takes the computed value of its parent element animation-direction property. Browser Compatibility The animation-direction property is supported in all major modern browsers. Basic Support— Firefox 5+ -moz-, 15+ Google Chrome 4+ -webkit- Internet Explorer 10+ Apple Safari 4+ -webkit- Opera 12+ -o-, 15+ -webkit- Further Reading See tutorial on: CSS3 Animations. Related properties and at-rules: animation, animation-name, animation-delay, animation-timing-function, animation-iteration-count, animation-direction, animation-fill-mode, animation-play-state, @keyframes.
2025-03-28Of three times per second or greater - which can trigger photosensitive epilepsy.All included animations now support and leverage the prefers-reduced-motion CSS media feature to detect if a user has requested that the system minimize the amount of non-essential motion it uses.CaseHow It Affects Included AnimationsNo preference set (default)Animations will render as expectedPreference set to reduceAnimations will be disabledWhen a prefers-reduced-motion is set to reduce, it indicates that the user prefers less motion, which may trigger discomfort for those with vestibular motion disorders on the page.CustomizationWe’ve added CSS custom properties to make customizing easier and more efficient, and you can use these custom properties across all of our animations. Define your own values for the following properties to override and customize Font Awesome’s defaults.CSS Custom PropertyDetailsAccepted Values--fa-animation-delaySet an initial delay for animationAny valid CSS animation-delay value--fa-animation-directionSet direction for animationAny valid CSS animation-direction value--fa-animation-durationSet duration for animationAny valid CSS animation-duration value--fa-animation-iteration-countSet number of iterations for animationAny valid CSS animation-iteration-count value--fa-animation-timingSet how the animation progresses through framesAny valid CSS animation-timing-function value div class="fa-3x"> i class="fa-solid fa-cog fa-spin">i> i class="fa-solid fa-cog fa-spin" style="--fa-animation-direction: reverse;">i> i class="fa-solid fa-cog fa-spin" style="--fa-animation-duration: 15s;">i> i class="fa-solid fa-compact-disc fa-spin" style="--fa-animation-duration: 30s; --fa-animation-iteration-count: 1;">i> i class="fa-solid fa-tire fa-spin" style="--fa-animation-duration: 3s; --fa-animation-iteration-count: 5;--fa-animation-timing: ease-in-out;">i>div>Icon Animation + WobblesWe’ve worked hard to keep icons perfectly centered when they spin or pulse. However, we’ve seen issues with several browsers with the Web Fonts + CSS method of Font Awesome. This appears to be an issue with web fonts in general and not something we can directly fix. We do have a couple of ways you might be able to work around this:Set the display of the animating icon — Use display: block; where you can. This seems to help a lot with this issue.Use multiples of 16px (the base font size) — We’ve noticed the wobble is more noticeable otherwise.Switch Frameworks — Switch to the SVG with JavaScript method; it’s working a lot better for this.Conflicts with animate.cssOlder versions of animate.css also used the fast CSS class selector to control the speed of animations.Since Font Awesome also uses this class selector, they conflict
2025-03-31:root { --animation-state: paused; } /* user picked a theme where the "regular" scheme is dark */ /* user picked a theme a light scheme and also enabled a dark scheme */ /* deal with light scheme first */ @media (prefers-color-scheme: light) { :root { --primary: #222222; --secondary: #ffffff; --tertiary: #0088cc; --highlight: #ffff4d; --success: #009900; } } /* then deal with dark scheme */ @media (prefers-color-scheme: dark) { :root { --primary: #222222; --secondary: #ffffff; --tertiary: #0088cc; --highlight: #ffff4d; --success: #009900; } } /* these styles need to live here because the SVG has a different scope */ .dots { animation-name: loader; animation-timing-function: ease-in-out; animation-duration: 3s; animation-iteration-count: infinite; animation-play-state: var(--animation-state); stroke: #fff; stroke-width: 0.5px; transform-origin: center; opacity: 0; r: max(1vw, 11px); cy: 50%; filter: saturate(2) opacity(0.85); fill: var(--tertiary); } .dots:nth-child(2) { animation-delay: 0.15s; } .dots:nth-child(3) { animation-delay: 0.3s; } .dots:nth-child(4) { animation-delay: 0.45s; } .dots:nth-child(5) { animation-delay: 0.6s; } @keyframes loader { 0% { opacity: 0; transform: scale(1); } 45% { opacity: 1; transform: scale(0.7); } 65% { opacity: 1; transform: scale(0.7); } 100% { opacity: 0; transform: scale(1); } } Loading Discourse
2025-04-13