Skip to content

Commit a93c799

Browse files
committed
MOBILE-4060 theme: Fix ionic mixin when using add-root-selector
More info: ionic-team/ionic-framework#25264
1 parent 77e6fcc commit a93c799

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/theme/helpers/ionic.functions.string.scss

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -147,9 +147,10 @@
147147
// If the selector contains :host it means it is targeting just the host
148148
// element so we can change it to look for host-context
149149
} @else if str-contains($selector, ":host") {
150-
$list: append($list, ":host-context(#{$addHostSelector})", comma);
151-
// If the selector does not contain host at all it is either a shadow
152-
// or normal element so append both the dir check and host-context
150+
$shadow-element: str-replace($selector, ":host", ":host-context(#{$addHostSelector})");
151+
$list: append($list, $shadow-element, comma);
152+
// If the selector does not contain host at all it is either a shadow
153+
// or normal element so append both the dir check and host-context
153154
} @else {
154155
$list: append($list, "#{$addHostSelector} #{$selector}", comma);
155156
$list: append($list, ":host-context(#{$addHostSelector}) #{$selector}", comma);

0 commit comments

Comments
 (0)