fix(segment): update segment border for rtl (#18326)

references #17012
This commit is contained in:
Brandy Carney
2019-05-21 17:46:14 -04:00
committed by GitHub
parent 845def82f5
commit 805b225876
2 changed files with 14 additions and 3 deletions

View File

@ -71,6 +71,11 @@
} }
:host(:not(:first-of-type)) { :host(:not(:first-of-type)) {
@include rtl() {
border-right-width: 0;
border-left-width: var(--border-width);
}
border-left-width: 0; border-left-width: 0;
} }

View File

@ -121,10 +121,16 @@
@each $element in $elements { @each $element in $elements {
@if str-contains($element, ":host(") { @if str-contains($element, ":host(") {
$updated-element: str-replace($element, ")", ""); $scoped-element: $element;
$updated-element: str-replace($updated-element, ":host(", ":host-context(#{$addHostSelector})");
$new-element: append($new-element, $updated-element, space); @if str-contains($element, "))") {
$scoped-element: str-replace($scoped-element, "))", ")");
} @else {
$scoped-element: str-replace($scoped-element, ")", "");
}
$scoped-element: str-replace($scoped-element, ":host(", ":host-context(#{$addHostSelector})");
$new-element: append($new-element, $scoped-element, space);
} @else { } @else {
$new-element: append($new-element, $element, space); $new-element: append($new-element, $element, space);
} }