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

Replacing left/right classes with start/end to support RTL #1392

Merged
merged 1 commit into from
Oct 27, 2023
Merged

Replacing left/right classes with start/end to support RTL #1392

merged 1 commit into from
Oct 27, 2023

Conversation

AbdullahObaid
Copy link
Contributor

Summary:
This pull request aims to enhance the internationalization (I18N) and readability of the project by replacing the usage of left and right classes with start and end classes. By making this change, we will ensure better support for right-to-left (RTL) languages and align the codebase with Tailwind CSS's conventions for improved semantic clarity.

Details:

Changes Made:

  • Replaced instances of left classes with start classes.
  • Replaced instances of right classes with end classes.
  • Replaced instances of ml and pl classes with ms and ps classes.
  • Replaced instances of mr and pr classes with me and pe classes.
  • Replaced instances of text-left classes with text-start classes.
  • Replaced instances of text-right classes with text-end classes.
  • Modified $alignmentClasses in dropdown component to handle ltr and rtl correctly.

Testing:

  • Manual testing was conducted to verify that the layout and styles remained consistent after the changes.
  • Tested the project with both LTR and RTL languages to ensure that the UI adapts appropriately.

Please review these changes, and I look forward to your feedback and any further guidance on the proposed updates.

Thank you for considering this pull request.

Sincerely,
Abdullah

@driesvints
Copy link
Member

Could you link to some resources where Tailwind recommends these as best practices?

@AbdullahObaid
Copy link
Contributor Author

AbdullahObaid commented Oct 27, 2023

While Tailwind CSS doesn't explicitly mention CSS logical properties as the best practice, they are widely recognized as best practices in web development for making it easier to support RTL languages ( Arabic, Farsi, Hebrew .. etc ) see sources below. This change will make Jetstream RTL ready, Only add <html dir="rtl"> and everything is ready to go! This will make the life of anyone who wants to use Jetstream in an RTL website a lot easier.
This was requested before here #363

Sources : 1 2 3 4

Thank you for your consideration.

Sincerely,

@taylorotwell taylorotwell merged commit 23a4ce8 into laravel:4.x Oct 27, 2023
8 checks passed
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