-
Notifications
You must be signed in to change notification settings - Fork 843
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
[WIP][rtl][css] Fix button margins for RTL langs #3974
Conversation
Preview documentation changes for this PR: https://eui.elastic.co/pr_3974/ |
Really interesting find! I was curious to see if it had any effect on the current layout and overlaid the old on top of the new, and there were no effects. Here's a screenshot for those who want to see the LTR vs RTL. It of course doesn't change the actual text which is dependent on the source to be served in the correct direction. My one concern was for consumers or other components that were possibly altering this margin and using the original syntax. So I faked changing the So, the custom overrides will not be negatively affected unless in RTL mode which isn't be tested much anyway right now. @snide I don't see much problem with this change based on my explorations above. But I'd like to get your quick reaction to this change and see if your brain can find any other thing we should test first. |
I ran through it a bit locally. I'll have to give you credit @nyurik, it's pretty rare to run into some CSS code that either @cchaos or I haven't seen before. From all the reading I can see, this seems to be a good solution to the problem. My guess is that we have other parts of the codebase that this might be useful in. Can I use shows this as safe for everything but IE11, which we've recently dropped. I think this looks ok to merge. It'll need a changelog. I didn't get a chance to test Safari though, but as long as that works LGTM. |
Thanks @cchaos and @snide for such thorough review! I wonder why the tests failed though, but perhaps if i ask jenkins test this it may resolve itself. I sadly cannot test on Safari (Linux doesn't run it). And thanks for dropping IE, RIP! :) There are some other issues with RTL I'm exploring - e.g. somehow in RTL the screen instantly becomes horizontally scroll-able with lots of empty space on the left. (try it here and change lang to Hebrew in the upper right corner). But that's for the future. |
When showing a button in RTL, margin-left/right shows up incorrectly. The needed CSS seems to be `margin-inline-start/end`. Those values do not exist in IE, so not sure if we can introduce these or not just yet.
81a2a5b
to
326a989
Compare
Preview documentation changes for this PR: https://eui.elastic.co/pr_3974/ |
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.
Preview documentation changes for this PR: https://eui.elastic.co/pr_3974/ |
Summary
When showing a button in RTL, margin-left/right shows up incorrectly. The needed CSS seems to be
margin-inline-start/end
. Partially relates to #3960Those values do not exist in IE, so not sure if we can introduce these or not just yet. I tested these changes with a search bar's filters and
EuiHeaderLink
with icons.The above changes can be achieved with this CSS override.
Checklist