Skip to content
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

Using -start and -end properties for better RTL support #1919

Closed
yahia-berashish opened this issue Nov 9, 2023 · 6 comments · May be fixed by #1638
Closed

Using -start and -end properties for better RTL support #1919

yahia-berashish opened this issue Nov 9, 2023 · 6 comments · May be fixed by #1638

Comments

@yahia-berashish
Copy link

yahia-berashish commented Nov 9, 2023

I noticed that border, margin, padding, etc classes use -left and -right properties, which doesn't work well for RTL pages, I suppose using -start and -end properties like ms- instead of me- would be better for accessibility and would remove a lot of work for everyone wanting to use RTL languages with shadcnUI (like Arabic for example).
The changes aren't hard to implement using text search, and I can open a PR if the idea is valid.

@TA9IO
Copy link

TA9IO commented Nov 9, 2023

i'm doing it manualy every time i install a component i change the following classNames
mr-=> ms-
ml- => me-
pl- => pe-
pr- => ps-
also some stuff like flexbox and position ( like a closing button of modal )needs to fixed manualy
for example:
flex-start => rtl:flex-end
left-4 => ltr:left-4 rtl:right-4

I mean, the thought of adding RTL support came to my mind, but I don't have time to update the entire library. If you guys are interested, count me in.
image

@yahia-berashish
Copy link
Author

Thanks for your interest @TA9IO
Fixing the issue shouldn't be too hard with advanced text search and some testing, I think it is important that such a large component library be more accessible for RTL languages-speaking users and developers.

I will probably open a PR soon to work on the issue.

@primemb
Copy link

primemb commented Nov 13, 2023

there is pull request for RTL already but it is pending for a while i don't know what the plan is for that #1638

@nahasco
Copy link

nahasco commented Dec 16, 2023

Did that in a pull request for all components and all styles. It is still pending but you can check it out here #1638

@shadcn
Copy link
Collaborator

shadcn commented Dec 22, 2023

@yahia-berashish Yep like @nahasco we'll add this to the cli. Thanks for the ping @nahasco I'll add this to the queue.

@sahandsn
Copy link

any update on this?

@nahasco nahasco mentioned this issue Dec 11, 2024
48 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants