Skip to content

Commit

Permalink
[EuiProgress] Fix broken transition CSS (#7538)
Browse files Browse the repository at this point in the history
  • Loading branch information
cee-chen authored Feb 21, 2024
1 parent 8cc0fec commit c2dbd57
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
3 changes: 3 additions & 0 deletions changelogs/upcoming/7538.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**Bug fixes**

- Fixed missing animation on native `EuiProgress` bar update
11 changes: 8 additions & 3 deletions src/components/progress/progress.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import { css, keyframes } from '@emotion/react';
import {
logicalCSS,
logicalTextAlignCSS,
euiCanAnimate,
euiCantAnimate,
euiFontSize,
euiTextTruncate,
Expand Down Expand Up @@ -105,9 +106,13 @@ export const euiProgressStyles = (
background-color: ${euiTheme.colors.lightShade};
}
${crossBrowserProgressValue(
'transition: width ${euiTheme.animation.normal} linear;'
)}
${euiCanAnimate} {
/* Note: FF/Mozilla doesn't actually support animating the native progress bar
@see https://bugzilla.mozilla.org/show_bug.cgi?id=662351 */
${crossBrowserProgressValue(
`transition: width ${euiTheme.animation.normal} linear`
)}
}
`,
// An indeterminate bar has an unreliable end time. Because of a Firefox animation issue,
// we apply this style to a <div> instead of a <progress> element.
Expand Down

0 comments on commit c2dbd57

Please sign in to comment.