Skip to content

Commit 440ca6c

Browse files
devversionandrewseguin
authored andcommitted
fix(material-experimental/mdc-form-field): fix incorrect floating label shift in RTL
1 parent 1b1ae03 commit 440ca6c

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/material-experimental/mdc-form-field/_mdc-text-field-structure-overrides.scss

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,9 @@
8888
// the shifting since there is no padding the label needs to account for. Note that we do not
8989
// want do this for labels in the notched-outline since MDC keeps those labels relative to
9090
// the notched outline container, and already applies a specific horizontal spacing which
91-
// we do not want to overwrite.
92-
.mat-mdc-form-field-infix .mdc-floating-label {
91+
// we do not want to overwrite. *Note*: We need to have increased specificity for this
92+
// override because the `right` property will be set with higher specificity in RTL mode.
93+
.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mdc-floating-label {
9394
left: 0;
9495
right: 0;
9596
}

0 commit comments

Comments
 (0)