Many e-commerce themes claim "RTL ready," yet the moment you switch a store to Arabic (ar), slide-out cart drawers jump offscreen, breadcrumbs point backwards, and serif letter-spacing disconnects Arabic characters.

While engineering our bilingual Shopify OS 2.0 and WooCommerce FSE themes at CodeKit Studio, here are the 5 non-negotiable CSS and template rules that eliminated every RTL layout bug:

1. Derive dir Dynamically in layout/theme.liquid

Never hardcode dir="ltr". Detect RTL locales automatically:

{% assign is_rtl = false %} {% if request.locale.iso_code == 'ar' or request.locale.iso_code == 'he' or request.locale.iso_code == 'fa' %} {% assign is_rtl = true %} {% endif %} <html lang="{{ request.locale.iso_code }}" dir="{% if is_rtl %}rtl{% else %}ltr{% endif %}"> 

(In WordPress/WooCommerce FSE block themes, WordPress automatically enqueues rtl.css and loads compiled languages/<domain>-ar.mo whenever Site Language is Arabic.)

2. Reset letter-spacing to 0 on Arabic Headings

Uppercase English luxury typography often uses letter-spacing: 0.12em. In Arabic, positive letter-spacing breaks ligatures completely:

html[dir="rtl"] h1, html[dir="rtl"] h2, html[dir="rtl"] .btn { letter-spacing: 0 !important; text-transform: none; font-family: "IBM Plex Sans Arabic", sans-serif; } 

3. Use CSS Logical Properties Everywhere

Replace margin-left, padding-right, and border-left with margin-inline-start, padding-inline-end, and border-inline-start so layouts mirror automatically with zero duplicated rules.

4. Match CSS Specificity on RTL Slide-Out Cart Drawers

A subtle trap: html[dir="rtl"] .drawer { left: 0; transform: translateX(-100%); } has higher specificity (0,2,1) than .drawer.is-open (0,2,0)! Always pair them:

.drawer.is-open, html[dir="rtl"] .drawer.is-open { transform: translateX(0); } 

5. Never scaleX(-1) Product Photos That Contain Bottle or Brand Labels

Mirroring abstract backgrounds works cleanly, but flipping a product bottle reverses the label text! Let CSS Grid naturally flip text and media columns in RTL instead.

Live Interactive Bilingual Demos (EN + Arabic RTL)

You can inspect all 5 rules live across our 3 validated bilingual themes:

Drop a comment if you run into any tricky Arabic RTL edge cases on Shopify or WooCommerce!