Skip to content

Commit

Permalink
fix(segment): update segment border for rtl (#18326)
Browse files Browse the repository at this point in the history
references #17012
  • Loading branch information
brandyscarney committed May 21, 2019
1 parent 845def8 commit 805b225
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
5 changes: 5 additions & 0 deletions core/src/components/segment-button/segment-button.scss
Expand Up @@ -71,6 +71,11 @@
}

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

border-left-width: 0;
}

Expand Down
12 changes: 9 additions & 3 deletions core/src/themes/ionic.functions.string.scss
Expand Up @@ -121,10 +121,16 @@

@each $element in $elements {
@if str-contains($element, ":host(") {
$updated-element: str-replace($element, ")", "");
$updated-element: str-replace($updated-element, ":host(", ":host-context(#{$addHostSelector})");
$scoped-element: $element;

$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 {
$new-element: append($new-element, $element, space);
}
Expand Down

0 comments on commit 805b225

Please sign in to comment.