Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(item-sliding): options display on rtl #27203

Merged
merged 27 commits into from
May 9, 2023
Merged
Changes from 1 commit
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
ba1f0ca
fix(item-sliding): apply rtl styles regardless of browser
thetaPC Apr 13, 2023
5224778
chore(): add updated snapshots
Ionitron Apr 13, 2023
176cdd1
Revert "chore(): add updated snapshots"
thetaPC Apr 14, 2023
25d4eec
fix(item-sliding): correct structure for rtl
thetaPC Apr 14, 2023
c6b15df
chore(): add updated snapshots
Ionitron Apr 15, 2023
9f84fff
Revert "chore(): add updated snapshots"
thetaPC Apr 17, 2023
a1a8871
fix(item-sliding): add back selectors for host rtl
thetaPC Apr 17, 2023
59702f3
fix(ion-sliding): rtl for shadow dom
thetaPC Apr 17, 2023
9e49682
fix(item-sliding): rtl from host
thetaPC Apr 18, 2023
f17eb85
chore(): add updated snapshots
Ionitron Apr 18, 2023
1f757d5
fix(item-sliding): removal of console.log
thetaPC Apr 19, 2023
69e527e
fix(item-sliding): update important note
thetaPC Apr 19, 2023
23fe539
fix(item-sliding): split css group
thetaPC Apr 26, 2023
3266e1b
fix(item-sliding): add eol
thetaPC Apr 26, 2023
e5d68c0
fix(item-sliding): removal of unneeded code
thetaPC Apr 26, 2023
d62e233
fix(item-sliding): removal of unused mixin
thetaPC Apr 26, 2023
006adaa
chore(): add updated snapshots
Ionitron Apr 26, 2023
11eacc7
Revert "chore(): add updated snapshots"
liamdebeasi Apr 26, 2023
12d9dcf
Revert "chore(): add updated snapshots"
liamdebeasi Apr 26, 2023
e153766
remove old screenshots
liamdebeasi Apr 26, 2023
2cebf66
Merge branch 'main' of github.com:ionic-team/ionic-framework into FW-…
thetaPC Apr 26, 2023
93f14c9
Merge branch 'main' of github.com:ionic-team/ionic-framework into FW-…
thetaPC Apr 27, 2023
e3e1089
fix(item-sliding): split for :dir()
thetaPC Apr 28, 2023
d01fa77
fix(item-sliding): grouped similar selectors
thetaPC May 3, 2023
38b97fe
Merge branch 'main' of github.com:ionic-team/ionic-framework into FW-…
thetaPC May 3, 2023
bb1679e
Merge remote-tracking branch 'origin/main' into FW-2608
liamdebeasi May 9, 2023
5786f92
chore(): add updated snapshots
Ionitron May 9, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 16 additions & 6 deletions core/src/themes/ionic.mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -193,23 +193,33 @@

@mixin rtl() {
$root: #{&};
$selectors: str-split(#{add-root-selector($root, "[dir=rtl]")}, ",");
$dirSelector: "#{$root}:dir(rtl)";

$rootSplit: str-split($root, ",");
$selectorsSplit: str-split(#{add-root-selector($root, "[dir=rtl]")}, ",");

// Selectors must be split into individual selectors in case the browser
// doesn't support a specific selector.
// For example, Firefox and Safari doesn't support :host-context().
// For example, Firefox and Safari doesn't support `:host-context()`.
// If an invalid selector is used, then the entire group of selectors
// will be ignored.
// @link https://www.w3.org/TR/selectors-3/#grouping
@each $selector in $selectors {
@each $selector in $selectorsSplit {
@at-root #{$selector} {
@content;
}
}

@at-root #{$dirSelector} {
@content;
// Adding :dir() in case the browser doesn't support `:host-context()` and does support `:dir()`.
// `:host-context()` is added:
// - through the `add-root-selector()` function.
// - first so that it takes precedence over `:dir()`.
// For example, Firefox doesn't support `:host-context()`, but does support `:dir()`.
// MDN says that `:dir()` is supported by Safari, but it doesn't seem to work.
liamdebeasi marked this conversation as resolved.
Show resolved Hide resolved
@each $selector in $rootSplit {
$dirSelector: "#{$selector}:dir(rtl)";
@at-root #{$dirSelector} {
@content;
}
}
}

Expand Down