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

feat: RTL support #320

Merged
merged 3 commits into from
Jun 21, 2023
Merged

feat: RTL support #320

merged 3 commits into from
Jun 21, 2023

Conversation

HassanKadhim
Copy link
Contributor

We have noticed a few problems with RTL languages, here are what we have changed:

  • change all margin, padding, and border-radius to the new logical property utilities introduced in Tailwind v3.3 (https://tailwindcss.com/blog/tailwindcss-v3-3) to support both LTR and RTL languages
  • change all text direction text-left to rtl:text-right ltr:text-left

We have notice a few problems with RTL languages, here are what we have changed:
- change all margin, padding, border-radius to the new logical property utilities introduced in Tailwind v3.3 (https://tailwindcss.com/blog/tailwindcss-v3-3) to support both LTR and RTL languages
- change all text direction text-left to rtl:text-right ltr:text-left
@vercel
Copy link

vercel bot commented Jun 19, 2023

@HassanKadhim is attempting to deploy a commit to the Nuxt Labs Team on Vercel.

A member of the Team first needs to authorize it.

Copy link

@Gruce Gruce left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well done 👏

@@ -11,7 +11,7 @@ const table = {
selected: 'bg-gray-50 dark:bg-gray-800/50'
},
th: {
base: 'text-left',
base: 'ltr:text-left rtl:text-right',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about when not using either ltr or rtl? The text is centered for me.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When converting the direction to rtl, the writing is not in the middle, so I set the direction for the text
Screenshot_1

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean, we should also let text-left as by default ltr will only apply if a dir attr is present on HTML. See https://tailwindcss.com/docs/hover-focus-and-other-states#rtl-support
CleanShot 2023-06-20 at 16 47 39@2x

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, I understood what you meant and made the new commit

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't it be the same for all the text-left?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes , you can Check now

@benjamincanac benjamincanac changed the title Support RTL Lang feat: RTL support Jun 21, 2023
@benjamincanac benjamincanac merged commit 13d6639 into nuxt:dev Jun 21, 2023
@HassanKadhim HassanKadhim deleted the RTL-Lang branch June 21, 2023 12:46
benjamincanac pushed a commit that referenced this pull request Jun 21, 2023
benjamincanac pushed a commit that referenced this pull request Jun 21, 2023
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 this pull request may close these issues.

3 participants