Skip to content

Commit

Permalink
fix(material/progress-bar): alignment affected by parent text-align (#…
Browse files Browse the repository at this point in the history
…27646)

Fixes that the progress bar's alignment was affected by the parent's element's `text-align`.

Fixes #27613.

(cherry picked from commit 43dbbe2)
  • Loading branch information
crisbeto committed Aug 15, 2023
1 parent 8f161e8 commit 58dd802
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/material/progress-bar/progress-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,13 @@
// Explicitly set to `block` since the browser defaults custom elements to `inline`.
display: block;

// Explicitly set a `text-align` so that the content isn't affected by the parent (see #27613).
text-align: left;

[dir='rtl'] & {
text-align: right;
}

// Inverts the progress bar horizontally in `query` mode.
&[mode='query'] {
transform: scaleX(-1);
Expand Down

0 comments on commit 58dd802

Please sign in to comment.