-
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(rtl): flip arrow icons on rtl #11218
Conversation
@AmitMY What if we had an attribute that only flips the icon for
Then if you want the icon to be flipped you would add it like:
This would make it completely up to the user to flip the icon or not, could be used on icons outside of ionicons, and gets rid of any hardcoded styles for ionicons in case icons are added or removed. Then we would need to add some styling for our icons that are used in components. What do you think of this solution? Would it be viable? |
@brandyscarney While I think that should be an option (the It is a hassle, so most users wont use it. The arrows mostly use Look for the word "arrow" here: |
@brandyscarney Well, I added the |
src/fonts/ionicons.scss
Outdated
@@ -33,3 +33,20 @@ ion-icon { | |||
text-transform: none; | |||
speak: none; | |||
} | |||
|
|||
@mixin scale-x($amount) { |
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.
scss already does it for transform, scale-x
is not needed
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.
@manucorporat can you please explain a bit more? If I only do transform: scaleX(-1);
it does not cover browsers support, so I am not sure what you mean.
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.
@manucorporat I looked in some code, and it seems you never do custom browser support for transform
, so I guess I'll do the same. Updated
@manucorporat Anything else to fix here? |
add support for old variable names
# Conflicts: # src/components/button/button-icon.scss
# Conflicts: # src/components/label/label.ios.scss
@brandyscarney Can you re-review? |
# Conflicts: # src/components/range/range.ios.scss # src/components/range/range.md.scss # src/components/range/range.wp.scss # src/components/slides/slides.scss
# Conflicts: # src/components/action-sheet/action-sheet-component.ts # src/components/alert/alert.ios.scss # src/components/alert/alert.md.scss # src/components/alert/alert.wp.scss # src/components/tabs/tabs.scss # src/components/toolbar/toolbar.ios.scss # src/components/toolbar/toolbar.md.scss # src/components/toolbar/toolbar.wp.scss
Short description of what this resolves:
bad arrow direction on rtl
Changes proposed in this pull request:
Only arrows?
I understand that more icons should be flipped, for example,
exit
, which is also an arrow, but that should be somehow in the icon's metadata.I went all out in this edit and flipped all icons that can be flipped without causing harm, so this is just a toned down version
Ionic Version: 3.x