Back to list
dvorkinguy

rtl-css

by dvorkinguy

Claude Code skills, agents, commands, MCP configs, plugins, and settings

0🍴 0📅 Dec 17, 2025

SKILL.md


name: rtl-css description: RTL (Right-to-Left) CSS for Hebrew and Arabic. Use when building UI that needs RTL support, fixing RTL layout issues, or auditing CSS for RTL compliance.

RTL CSS with Logical Properties

The Golden Rule

NEVER use physical properties. ALWAYS use logical properties.

Property Mapping

Physical (❌)Logical (✅)Tailwind
padding-leftpadding-inline-startps-*
padding-rightpadding-inline-endpe-*
margin-leftmargin-inline-startms-*
margin-rightmargin-inline-endme-*
leftinset-inline-startstart-*
rightinset-inline-endend-*
text-align: lefttext-align: starttext-start
text-align: righttext-align: endtext-end
border-leftborder-inline-startborder-s-*
border-rightborder-inline-endborder-e-*

Tailwind Examples

// ❌ WRONG - Breaks in RTL
<div className="pl-4 pr-2 ml-auto text-left border-l-2">

// ✅ CORRECT - Works everywhere
<div className="ps-4 pe-2 ms-auto text-start border-s-2">

Next.js Layout with RTL

// app/[locale]/layout.tsx
import { isRtlLang } from 'rtl-detect';

export default function LocaleLayout({
  children,
  params: { locale },
}) {
  const dir = isRtlLang(locale) ? 'rtl' : 'ltr';

  return (
    <html lang={locale} dir={dir}>
      <body>{children}</body>
    </html>
  );
}

Icon Flipping

// Directional icons need flip
<ChevronRight className="rtl:rotate-180" />
<ArrowRight className="rtl:rotate-180" />
<ArrowLeft className="rtl:rotate-180" />

// Universal icons - don't flip
<Check /> <X /> <Search /> <Menu /> <Home />

Audit Command

Run scripts/audit_rtl.sh to find violations in your codebase.

Checklist

  • All padding uses ps-/pe-
  • All margins uses ms-/me-
  • Positioning uses start-/end-
  • Text uses text-start/text-end
  • Directional icons have rtl:rotate-180
  • Layout has dir attribute

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon