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

Add RTL support #615

Closed
wants to merge 5 commits into from
Closed

Add RTL support #615

wants to merge 5 commits into from

Conversation

amirmasoud
Copy link

This PR make the theme RTL compatible by adding the following block of code:

...
  head: {
    bodyAttrs: {
      dir: 'rtl'
    }
  },
...

to the nuxt.config.js file.

Types of changes

  • Bug fix (a non-breaking change which fixes an issue)
  • New feature (a non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Description

Describe your changes in detail
This PR adds tailwindcss-dir package to detect ltr and RTL version. Required TailwindCSS classes have been added so it won't break the already working LTR version.

Why is this change required? What problem does it solve?
An RTL version is not necessary at the moment for the documentation(s), as I have not seen the RTL version of documentations (neither website nor translations). But if it's in your internal team checklist for future features, this PR can be helpful.

I was going to use this theme for a Persian (RTL) website, and I thought this PR might be welcome. But there are some parts of it that might need more work and adjustments, such as Algolia search and tailwindcss-typography. As tailwindcss typography has an open issue for RTL support (tailwindlabs/tailwindcss-typography#78)

Checklist:

  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have added tests to cover my changes (if not applicable, please state why)

@amirmasoud amirmasoud changed the title [wip] Add RTL support Add RTL support Nov 16, 2020
@benjamincanac
Copy link
Member

@amirmasoud Thank you for the PR, it would be a nice add to the theme indeed. However I think we should we wait for the issue on tailwindcss-typography plugin to be fixed to have the full support.

@amirmasoud
Copy link
Author

@benjamincanac I see; I would try to submit a PR to tailwindcss-typography to add RTL support. I would get back to this PR after that. Thanks,

@amirmasoud
Copy link
Author

I don't think the Tailwind team has any plan to add RTL support to the core package for now. tailwindlabs/discuss#64 (comment)

Besides, there is no direction property by default in the new version of the tailwind. I don't think it's a good idea to put a time to add an RTL version for now. I would close this PR for now. Thanks.

@amirmasoud amirmasoud closed this Dec 5, 2020
@ahangarha
Copy link

May you please share your thought on the best possible way to address this issue? Should we propose something to tailwindcss?

@amirmasoud
Copy link
Author

@ahangarha As far as I can tell, the majority of works fall into the tailwind typography package which is not part of nuxt/content obviously and it seems they have no plan to add RTL support for that.

@NozomuIkuta NozomuIkuta mentioned this pull request May 21, 2021
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.

None yet

3 participants