diff --git a/core/src/components/progress-bar/progress-bar.scss b/core/src/components/progress-bar/progress-bar.scss
index 6e6f1781002..e9904e1d23c 100644
--- a/core/src/components/progress-bar/progress-bar.scss
+++ b/core/src/components/progress-bar/progress-bar.scss
@@ -39,22 +39,34 @@
.progress-indeterminate,
.indeterminate-bar-primary,
.indeterminate-bar-secondary,
-.progress-buffer-bar,
-.progress-buffer-bar:before,
-.buffer-circles {
+.progress-buffer-bar {
@include position(0, 0, 0, 0);
-
position: absolute;
width: 100%;
height: 100%;
}
+.buffer-circles-container,
+.buffer-circles {
+ @include position(0, 0, 0, 0);
+ position: absolute;
+}
+
+// Extend a bit to overflow. The size of animated distance.
+.buffer-circles {
+ /* stylelint-disable property-blacklist */
+ right: -10px;
+ left: -10px;
+ /* stylelint-enable property-blacklist */
+}
+
// Determinate progress bar
// --------------------------------------------------
.progress,
-.progress-buffer-bar {
+.progress-buffer-bar,
+.buffer-circles-container {
/* stylelint-disable-next-line property-blacklist */
transform-origin: left top;
@@ -74,10 +86,13 @@
.progress-buffer-bar {
background: var(--buffer-background);
- // Make it behind the progress
z-index: 1;
}
+.buffer-circles-container {
+ overflow: hidden;
+}
+
// MD based animation on indeterminate type
// --------------------------------------------------
@@ -116,28 +131,8 @@
// Buffer style
// --------------------------------------------------
-.buffer-circles.buffer-circles-reversed {
- /* stylelint-disable property-blacklist */
- right: unset;
- left: 2px;
-
- background-position: right;
- /* stylelint-enable property-blacklist */
-}
-
.buffer-circles {
- /* stylelint-disable property-blacklist */
- right: -8px;
-
- left: unset;
-
- transition: width 150ms linear;
- /* stylelint-enable property-blacklist */
-
- background: radial-gradient(ellipse at center, var(--buffer-background) 0%, var(--buffer-background) 30%, transparent 30%) repeat-x 5px;
-
- /* stylelint-disable-next-line property-blacklist */
- background-position: left;
+ background: radial-gradient(ellipse at center, var(--buffer-background) 0%, var(--buffer-background) 30%, transparent 30%) repeat-x 5px center;
background-size: 10px 10px;
z-index: 0;
@@ -149,18 +144,7 @@
// --------------------------------------------------
:host(.progress-bar-reversed) {
- .progress,
- .progress-buffer-bar {
- /* stylelint-disable-next-line property-blacklist */
- transform-origin: right top;
- }
-
- .buffer-circles,
- .indeterminate-bar-primary,
- .indeterminate-bar-secondary,
- .progress-indeterminate {
- animation-direction: reverse;
- }
+ transform: scaleX(-1);
}
// Progress paused
diff --git a/core/src/components/progress-bar/progress-bar.tsx b/core/src/components/progress-bar/progress-bar.tsx
index aeb9f70b871..20d05d0e665 100644
--- a/core/src/components/progress-bar/progress-bar.tsx
+++ b/core/src/components/progress-bar/progress-bar.tsx
@@ -54,7 +54,6 @@ export class ProgressBar implements ComponentInterface {
const { color, type, reversed, value, buffer } = this;
const paused = config.getBoolean('_testing');
const mode = getIonMode(this);
- const isReversed = document.dir === 'rtl' ? !reversed : reversed;
return (