Skip to content

Commit 4ddc053

Browse files
authored
fix(theme): fix rtl mixin for ionic theme (#29977)
Issue number: resolves internal --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> Unable to use the `rtl` mixin from the ionic theme global import: ```scss @use "../../themes/ionic/ionic.globals.scss" as globals; :host { @include globals.rtl() { ... } } ``` ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> Allows the `rtl` mixin to be accessed from the global sass import ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/docs/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->
1 parent a2bf1bb commit 4ddc053

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

core/src/themes/mixins.scss

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
@use "./functions.string" as string;
2+
13
/**
24
* A heuristic that applies CSS to tablet
35
* viewports.
@@ -239,9 +241,9 @@
239241
@mixin rtl() {
240242
$root: #{&};
241243

242-
$rootSplit: str-split($root, ",");
243-
$selectors: #{add-root-selector($root, "[dir=rtl]")};
244-
$selectorsSplit: str-split($selectors, ",");
244+
$rootSplit: string.str-split($root, ",");
245+
$selectors: #{string.add-root-selector($root, "[dir=rtl]")};
246+
$selectorsSplit: string.str-split($selectors, ",");
245247

246248
$hostContextSelectors: ();
247249
$restSelectors: ();
@@ -292,7 +294,7 @@
292294
// -- @link https://bugs.webkit.org/show_bug.cgi?id=257133
293295

294296
// Supported by Firefox.
295-
@at-root #{add-root-selector($root, ":dir(rtl)", false)} {
297+
@at-root #{string.add-root-selector($root, ":dir(rtl)", false)} {
296298
@content;
297299
}
298300
}

0 commit comments

Comments
 (0)