Skip to content

Commit

Permalink
fix(rtl): updates searchbar, fab and toggle icon positioning in rtl (#…
Browse files Browse the repository at this point in the history
…18325)

- fixes tab badge (in Chrome)
- fixes searchbar buttons
- fixes fab positioning
- fixes toggle

references #17012
  • Loading branch information
brandyscarney authored May 21, 2019
1 parent 4339ec3 commit 845def8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/src/themes/ionic.functions.string.scss
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@
// --> :host-context([dir=rtl])
//
// @include add-root-selector("[dir=rtl]", ":host(.fixed)")
// --> :host-context([dir=rtl]):host(.fixed)
// --> :host-context([dir=rtl]).fixed
//
// @include add-root-selector("[dir=rtl]", ":host(.tab-layout-icon-hide) ::slotted(ion-badge)")
Expand All @@ -112,6 +113,9 @@
// If the selector contains :host( it means it is targeting a class on the host
// element so we need to change how we target it
@if str-contains($selector, ":host(") {
$shadow-element: str-replace($selector, ":host(", ":host-context(#{$addHostSelector}):host(");
$list: append($list, $shadow-element, comma);

$new-element: ();
$elements: str-split($selector, " ");

Expand Down
3 changes: 3 additions & 0 deletions core/src/themes/ionic.mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -286,6 +286,9 @@
right: $end;
}
@include rtl() {
left: unset;
right: unset;

left: $end;
right: $start;
}
Expand Down

0 comments on commit 845def8

Please sign in to comment.