RTL support for guide website theme#450
Open
Raghaddahi wants to merge 11 commits into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #447
Description
Adds RTL support to the User Guide theme, so pages render correctly under an RTL active translation (e.g.
ar). The theme was hard-wired to LTR.Four groups of changes:
base.htmlderivesdirfrom the active translation viaget_current_language_bididir="auto"on page titles, headings, navigation, search results, footer blocks, alerts, prev/next labels and bylines, so the browser picks the direction per string. Becomes visible once real Arabic translations land (current.pofiles are stubs).explanation/tutorialicons mirrored via[dir='rtl']transforms using a newsvg_icon--flip-rtlopt-in class — avoids separate RTL SVG assets.insetproperties so buttons anchor to the right corner; RTL-scoped grid overrides reposition the logo right at the large breakpoint without changing LTR. Mobile menu overlay switched absolute→fixed so it stops clipping when scrolled.Areas needing careful review
header.scss: confirm logo mirrors right in RTL and LTR is unchanged.tutorial.svg: its "1 2 3" digits share the path with the list bars, soscaleX(-1)mirrors the digits backward.Testing
Each item below shows the RTL bug before this PR, and the fix after.
1. Logo cropped on mobile
Before:

After:

2. Logo alignment (desktop)
Before:

After:

3. Mobile menu overlay
Before:

After:

4. Results count
Before:

After:

5. Flipped icons
Before:


After:


6. Feedback message
Before:

After:

7. Burger and search position
Before:

After:

8.
dir="auto"to support mixed-language contentBefore:

After:

AI usage
AI assisted with the PR description and portions of the SCSS code (model: GLM 5.2, via opencode). Reviewed and tested by me