Fordson Dropdown Menu "My Course" RTL

Fordson Dropdown Menu "My Course" RTL

by Yana Konstantinovsky -
Number of replies: 5

Hello,

I've noticed a problem with the dropdown menu of "my courses" in rtl mode.

The dropdown drops down like it should in the LTR mode, but in RTL, it drops down from the left side (instead from the right, as it should in rtl), and if the course name is long, it even can be shown outside of the screen.

I tried editing it with some CSS, but i don't see a separation in code between rtl and ltr, so my change even if effective, will effect only the RTL.

Can someone help with some guidance? 

Adding a screen shot.

I tried making the name of "site" longer. that does make the dropdown appear in a better place and not off the screen, but then i'm limited with the navbar custom menu, in smaller screens.

A few technical details:
Moodle ver: Moodle 3.7+ (Build: 20190524)

Fordson ver: Moodle 3.7 Fordson v3.7 

Thank you 

RLT dropdown menu



Average of ratings: -
In reply to Yana Konstantinovsky

Re: Fordson Dropdown Menu "My Course" RTL

by Jean-Roch Meurisse -
Picture of Core developers Picture of Plugin developers Picture of Testers
Hi,
Maybe you can try to prefix your css rules with body.dir-rtl to apply them only when in rtl mode

Cheers
In reply to Jean-Roch Meurisse

Re: Fordson Dropdown Menu "My Course" RTL

by Yana Konstantinovsky -
Hi Jean Rocj,

Thanks fo r the reply, but i'm not sure what you mean?

Could you be more specific?

Thank you
In reply to Yana Konstantinovsky

Re: Fordson Dropdown Menu "My Course" RTL

by Mary Evans -
Picture of Core developers Picture of Documentation writers Picture of Peer reviewers Picture of Plugin developers Picture of Testers
Hi
I am going to see if I can find where the problem is in the Fordson theme. However I do not have Moodle 3.7 only Moodle 3.6 but it should be the same as 3.7.
I will let you know how I get on and hopefully find a solution.
It is probably something simple within the coding of that menu as not many know how RTL is supposed to work. It may just be a simple thing that needs to be added in the code of a renderer file in Fordson.

Mary
In reply to Yana Konstantinovsky

Re: Fordson Dropdown Menu "My Course" RTL

by Jean-Roch Meurisse -
Picture of Core developers Picture of Plugin developers Picture of Testers
If you want to apply your css rules only in rtl mode, every css rule you add should be prefixed with body.dir-rtl, for example
Do not write
h1  {
    font-weight: bold;
}
but 
body.dir-rtl h1 {
    font-weight: bold;
}
Average of ratings: Useful (1)
In reply to Jean-Roch Meurisse

Re: Fordson Dropdown Menu "My Course" RTL

by Yana Konstantinovsky -
Hi,

So i added this code to the CSS, and it seemd to work.  It doesn't effect the LTR version in my case.

.dir-rtl .navbar.fixed-top .dropdown .dropdown-menu {
left: auto;
right: 0;
}