Skip to content

fix: display right-to-left for rtl-languages in mobile - #406

Closed
meysam81 wants to merge 2 commits into
opencraft-release/koa.3from
meysam/rtl_for_mobile
Closed

fix: display right-to-left for rtl-languages in mobile#406
meysam81 wants to merge 2 commits into
opencraft-release/koa.3from
meysam/rtl_for_mobile

Conversation

@meysam81

Copy link
Copy Markdown

This will display the RTL languages from right to left. Tested on mobile using Developer Tools on Firefox.

To reproduce the result in this PR, simply run the devstack on koa.master, open the Developer Tools on either Firefox or Chrome, select Mobile View from the icon on the top right of the Developer Tools, check the display when the following settings are applied:

# /edx/etc/lms.yml
LANGUAGE_CODE: ar

You can optionally change the theme for more thorough testing, though it's not necessary; By copying a theme like nelp to <devstack_root>/../src and with the following change:

# /edx/etc/lms.yml
COMPREHENSIVE_THEME_DIRS:
- '/edx/src'

...
...
...

DEFAULT_SITE_THEME: 'nelp-ecommerce-theme'

Then head to http://localhost:18000 and check the changes to see if an RTL language (like Arabic: ar) is correctly displayed from right to left or not.

@meysam81 meysam81 added the bug label Sep 22, 2021
@meysam81 meysam81 self-assigned this Sep 22, 2021
@shimulch

Copy link
Copy Markdown

@meysam81, I think the proper thing to do is the following -

diff --git a/lms/static/sass/_header.scss b/lms/static/sass/_header.scss
index aa4236fd74..1949d557de 100644
--- a/lms/static/sass/_header.scss
+++ b/lms/static/sass/_header.scss
@@ -366,7 +366,7 @@
         width: 100%;
         padding: $baseline*0.6 $baseline;
         border-bottom: 1px solid theme-color('light');
-        text-align: left;
+        @include text-align(left);
         cursor: pointer;
 
         &:hover,

This fixed the issue for me and didn't give any error. Can you try this?

@meysam81

Copy link
Copy Markdown
Author

Closing in favor of edx/edx-platform#28861

cc @shimulch

@meysam81 meysam81 closed this Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants