Skip to content

Commit

Permalink
fix(stepper): selector assuming that there will always be a dir attri…
Browse files Browse the repository at this point in the history
…bute (#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.
  • Loading branch information
crisbeto authored and mmalerba committed Oct 26, 2018
1 parent cee8c65 commit 576118e
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/lib/stepper/stepper.scss
Expand Up @@ -76,18 +76,23 @@ $mat-stepper-line-gap: 8px !default;
height: auto;
padding: $mat-stepper-side-gap;

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

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

[dir='rtl'] &:last-child::before,
[dir='rtl'] &:first-child::after {
display: none;
}

& .mat-step-icon,
& .mat-step-icon-not-touched {
// Cleans margin both for ltr and rtl direction
Expand Down

0 comments on commit 576118e

Please sign in to comment.