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

🐛 RTL top nav bar layout fix. #1886

Open
wants to merge 1 commit into
base: dev
Choose a base branch
from

Conversation

AzzamAlsharafi
Copy link

Relevant issue: #1871

Current

In RTL languages, the layout of the top nav bar is slightly broken:

Screenshot_20241219_150634
In desktop mode, there's no gap between EN and the languages logo, and there's no gap between Shortcodes and Docs tabs

Screenshot_20241219_150626
In mobile mode, there's no gap between EN and the languages logo.

Solution

The issue is mainly caused by two things:

  • Usage of mr-X or ml-X in some places, which places the margin in the wrong direction when switched to RTL layout. This is solved by making use of rtl: and ltr: specifiers. So mr-1 is changed to ltr:mr-1 rtl:ml-1
  • Usage of space-x-X in some places, which doesn't work well with RTL layouts. This is solved by replacing space-x-X with gap-x-X.

Post-fix

Screenshot_20241219_150741
Desktop mode.

Screenshot_20241219_150752
Mobile mode.

Modify the margin direction in RTL layouts, and replace some occurrences of space-x to gap-x, for better RTL handling
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.

1 participant