-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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): RTL fix for item sliding #11825
Changes from 14 commits
39909d0
e526ce1
dc9a0d4
8b63901
3d52694
71b6791
cf2ed87
3496767
7113f65
5ece981
9a65746
cda8ed5
2cf17df
cb129de
f8a55d7
57a43bc
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -17,26 +17,52 @@ ion-item-sliding .item { | |
} | ||
|
||
ion-item-options { | ||
@include position(0, 0, null, null); | ||
|
||
// scss-lint:disable PropertySpelling | ||
position: absolute; | ||
|
||
z-index: $z-index-item-options; | ||
display: none; | ||
|
||
justify-content: flex-end; | ||
|
||
height: 100%; | ||
|
||
font-size: 14px; | ||
|
||
visibility: hidden; | ||
|
||
@include multi-dir() { | ||
top: 0; | ||
|
||
right: 0; | ||
} | ||
|
||
@include ltr() { | ||
justify-content: flex-end; | ||
} | ||
|
||
@include rtl() { | ||
justify-content: flex-start; | ||
|
||
&:not([side=right]) { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. these |
||
justify-content: flex-end; | ||
|
||
right: auto; | ||
left: 0; | ||
} | ||
} | ||
} | ||
|
||
ion-item-options[side=left] { | ||
@include position-horizontal(0, auto); | ||
@include multi-dir() { | ||
// scss-lint:disable PropertySpelling | ||
right: auto; | ||
left: 0; | ||
} | ||
|
||
justify-content: flex-start; | ||
@include ltr() { | ||
justify-content: flex-start; | ||
} | ||
|
||
@include rtl() { | ||
justify-content: flex-end; | ||
} | ||
} | ||
|
||
ion-item-options .button { | ||
|
@@ -63,6 +89,13 @@ ion-item-options:not([icon-start]) .button:not([icon-only]) { | |
} | ||
|
||
ion-item-sliding.active-slide { | ||
@include rtl() { | ||
&.active-options-left ion-item-options:not([side=right]) { | ||
width: 100%; | ||
|
||
visibility: visible; | ||
} | ||
} | ||
|
||
.item, | ||
.item.activated { | ||
|
@@ -101,19 +134,37 @@ button[expandable] { | |
} | ||
|
||
ion-item-sliding.active-swipe-right button[expandable] { | ||
@include padding-horizontal(90%, null); | ||
|
||
order: 1; | ||
|
||
transition-duration: .6s; | ||
transition-property: padding-left; | ||
} | ||
|
||
ion-item-sliding.active-swipe-left button[expandable] { | ||
@include padding-horizontal(null, 90%); | ||
@include multi-dir() { | ||
// scss-lint:disable PropertySpelling | ||
padding-left: 90%; | ||
} | ||
|
||
order: -1; | ||
@include ltr() { | ||
order: 1; | ||
} | ||
|
||
@include rtl() { | ||
order: -1; | ||
} | ||
} | ||
|
||
ion-item-sliding.active-swipe-left button[expandable] { | ||
transition-duration: .6s; | ||
transition-property: padding-right; | ||
|
||
@include multi-dir() { | ||
// scss-lint:disable PropertySpelling | ||
padding-right: 90%; | ||
} | ||
|
||
@include ltr() { | ||
order: -1; | ||
} | ||
|
||
@include rtl() { | ||
order: 1; | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you move this comment to inside the mixin?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AmitMY so I should put it at two places? multi-dir and rtl mixin at the same main selector?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it would be better, yes. Just so it is more specific.