RTL SCSS suggested instructions: Difference between revisions
Line 10: | Line 10: | ||
=== Forcing the text direction === | === Forcing the text direction === | ||
Whilst <code>.dir-rtl</code> should not be used any more, we've added <code>.text-ltr</code> which allows developers to force the direction of the text to left-to-right. This is especially | Whilst <code>.dir-rtl</code> should not be used any more, we've added <code>.text-ltr</code> 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. |
Revision as of 12:33, 2 December 2016
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 @extend
, indented rules, etc...
Forcing the text direction
Whilst .dir-rtl
should not be used any more, we've added .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.