Skip to content

Commit 576118e

Browse files
crisbetommalerba
authored andcommitted
fix(stepper): selector assuming that there will always be a dir attribute (#13751)
One of the selectors in the step header assumes that there will be at least one parent with a `dir="ltr"` or `dir="rtl"`. These changes rework it to have LTR as the base. Fixes #13741.
1 parent cee8c65 commit 576118e

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

src/lib/stepper/stepper.scss

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -76,18 +76,23 @@ $mat-stepper-line-gap: 8px !default;
7676
height: auto;
7777
padding: $mat-stepper-side-gap;
7878

79-
[dir='ltr'] &:not(:last-child)::after,
79+
&:not(:last-child)::after,
8080
[dir='rtl'] &:not(:first-child)::after {
8181
@extend %mat-header-horizontal-line-label-position-bottom;
8282
right: 0;
8383
}
8484

85-
[dir='ltr'] &:not(:first-child)::before,
85+
&:not(:first-child)::before,
8686
[dir='rtl'] &:not(:last-child)::before {
8787
@extend %mat-header-horizontal-line-label-position-bottom;
8888
left: 0;
8989
}
9090

91+
[dir='rtl'] &:last-child::before,
92+
[dir='rtl'] &:first-child::after {
93+
display: none;
94+
}
95+
9196
& .mat-step-icon,
9297
& .mat-step-icon-not-touched {
9398
// Cleans margin both for ltr and rtl direction

0 commit comments

Comments
 (0)