Skip to content

Commit

Permalink
fix(material/progress-bar): incorrect alignment if direction is set o…
Browse files Browse the repository at this point in the history
…n element

Fixes an issue where the progress bar was looking for `dir="rtl"` only on parent elements, but on itself. We can avoid the problem altogether by using a directionality-agnostic property.

Fixes #28572.

(cherry picked from commit d0618bc)
  • Loading branch information
crisbeto committed Feb 12, 2024
1 parent 59b93b4 commit a656164
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions src/material/progress-bar/progress-bar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@
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;
}
text-align: start;

// Inverts the progress bar horizontally in `query` mode.
&[mode='query'] {
Expand Down

0 comments on commit a656164

Please sign in to comment.