Skip to content

Commit

Permalink
fix(material/datepicker): use direction-agnostic text-align
Browse files Browse the repository at this point in the history
Avoids some extra styles by using `text-align: start` instead of having to flip it manually for RTL.

(cherry picked from commit 27df9cf)
  • Loading branch information
crisbeto committed Feb 12, 2024
1 parent a656164 commit 92ab097
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/material/datepicker/calendar-body.scss
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ $_tokens: (tokens-mat-datepicker.$prefix, tokens-mat-datepicker.get-token-slots(
.mat-calendar-body-label {
height: 0;
line-height: 0;
text-align: left;
text-align: start;
padding-left: $calendar-body-label-side-padding;
padding-right: $calendar-body-label-side-padding;

Expand Down Expand Up @@ -424,9 +424,3 @@ $_tokens: (tokens-mat-datepicker.$prefix, tokens-mat-datepicker.get-token-slots(
}
}
}

[dir='rtl'] {
.mat-calendar-body-label {
text-align: right;
}
}

0 comments on commit 92ab097

Please sign in to comment.