Note:

If you want to create a new page for developers, you should create it on the Moodle Developer Resource site.

RTL SCSS suggested instructions

From MoodleDocs
Revision as of 13:03, 14 July 2021 by David Mudrak (talk | contribs) (Text replacement - "<code>" to "<syntaxhighlight lang="php">")

Suggested modifications and updates to the CSS_Coding_Style#Right-to-left page sections

Caveats

It is important to note that the special comments must NOT end a file or a rule block. All comments not preceding a block, or a rule are ignored. Or in other words: currently the comments must always precede a statement, they will not work if they are not followed by anything.

Also note that comments in SCSS or LESS will often not produce the desired effect. When dealing with SCSS and LESS, ensure that your special RTL comments are attached to pure CSS statements: no <syntaxhighlight lang="php">@extend, indented rules, etc...

Forcing the text direction

Whilst <syntaxhighlight lang="php">.dir-rtl should not be used any more, we've added <syntaxhighlight lang="php">.text-ltr which allows developers to force the direction of the text to left-to-right. This is especially needed for forms fields like: URLs, OS level Folders paths & apps, theme hex colors, English DB field names, emails, English text, numbers, regular expression patterns, symbols, code snippets or configuration samples.