Detect and style RTL CSS font choices

tim.at.ast@gmail.com's Avatar

tim.at.ast@gmail.com

28 Jun, 2018 10:38 AM

Hi Brett,

I use the "Detect and style RTL" a lot. What is the easiest way to adjust my CSS so that when RTL is detected it uses a font X, but otherwise uses font Y.

  1. Support Staff 1 Posted by Brett on 28 Jun, 2018 11:07 AM

    Brett's Avatar

    Marked adds the classes mk-rtl and mk-ltr as appropriate. You can target those classes, but add the wrapper id to ensure specificity:

    #wrapper .mk-rtl { font-family:... }

    - Brett

  2. 2 Posted by tim.at.ast@gmai... on 28 Jun, 2018 12:37 PM

    tim.at.ast@gmail.com's Avatar

    Works great.

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac