feature(bento): make it RTL compatible#503
Conversation
|
@zaaakher is attempting to deploy a commit to the product-studio Team on Vercel. A member of the Team first needs to authorize it. |
|
@zaaakher Hey, I didn’t quite get what this is for. Could you show me what changes it makes and what you’re trying to achieve here? |
Sure, here's a way to try out the difference: This will not look correct in RTL Notice the This will work correctly regardless of direction In the old days, we used to conditionally pass different css if the current language is "ar" (an RTL language) or if it's "en" and adjust our padding and margins accordingly. But with Learn more in tailwind: https://tailwindcss.com/docs/padding#using-logical-properties TLDR: These properties are direction agnostic. So whenever we use MagicUI in a RTL website, the UI won't break because we're using these properties:
Try setting the I noticed OriginUI already use the logical properties so whenever I use their components in my Arabic website it works correctly out of the box. |
|
Here are some visuals: BeforeNotice in the second image (Arabic) the space between the arrow icon and the text is wrong, and also the arrow is pointing in the wrong direction.
AfterNotice the first image (English) is unaffected while the second one (Arabic) is fixed.
Learn more about the |
|
Thank you for making the PR and suggesting this change. It was a great suggestion! |




This PR simply replaces
ml-2toms-2and also rotates the arrow 180 degrees on RTL