Skip to content

Support for RTL #182

New issue

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

By clicking “No 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? No Sign in to your account

Closed
dev-masih opened this issue Dec 24, 2019 · 4 comments
Closed

Support for RTL #182

dev-masih opened this issue Dec 24, 2019 · 4 comments
Milestone

Comments

@dev-masih
Copy link

Hi, great job on this btw.
i have a question is there any easy way to change entire tree direction from LTR to RTL? especially when using RTL languages?

@jakezatecky
Copy link
Owner

jakezatecky commented Dec 24, 2019 via email

@dev-masih
Copy link
Author

good to hear that you are going to add this feature, thanks

@jakezatecky jakezatecky added this to the v1.7.0 milestone Dec 25, 2019
@jakezatecky
Copy link
Owner

Hello @dev-masih. My knowledge of RTL support is fairly limited, but I made some style adjustments as I was testing things out and wanted to know if the following layout would be what you are looking for:

image

I made these changes after applying dir="rtl" to the top-level <html> tag and applying the following CSS rules:

.react-checkbox-tree ol ol {
  padding-right: 24px;
}

.rct-icons-fa5 .rct-icon-expand-close::before {
  content: "\f053";
}

If that looks fine, I can add the dir prop to this library such that it supports RTL and applies these style changes automatically.

@dev-masih
Copy link
Author

dev-masih commented Dec 26, 2019

ok, I tested your changes myself with several RTL statements and even combined with English words between sentences, and it worked great.
I think these changes are good enough for converting to RTL

jakezatecky added a commit that referenced this issue Dec 26, 2019
jakezatecky added a commit that referenced this issue Dec 26, 2019
No Sign up for free to join this conversation on GitHub. Already have an account? No Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants