Author: @skills-il
Configure Tailwind CSS v4 for Hebrew RTL applications with dir variants, Hebrew font stacks, and logical property utilities. Use when user asks about Tailwind RTL setup, Hebrew Tailwind config, "Tailwind ivrit", RTL utility classes, logical properties in Tailwind, ms-/me- utilities, or Tailwind Hebrew font configuration. Covers Tailwind v4 dir variants, Hebrew font stack presets, logical property utilities, RTL-first component patterns, and Hebrew typography tokens. Do NOT use for general CSS RTL patterns (use hebrew-rtl-best-practices) or full design systems (use israeli-ui-design-system instead).
npx skills-il add skills-il/localization --skill hebrew-tailwind-presetSee references/rtl-config.md for complete configuration reference.
Tailwind v4 (CSS-first configuration):
/* app.css */
@import "tailwindcss";
@theme {
/* Hebrew font stacks */
--font-hebrew: 'Heebo', 'Assistant', 'Noto Sans Hebrew', sans-serif;
--font-hebrew-serif: 'Frank Ruhl Libre', 'David Libre', serif;
--font-mono: 'Fira Code', 'Source Code Pro', monospace;
/* Hebrew-optimized type scale */
--text-xs: 0.8125rem;
--text-sm: 0.875rem;
--text-base: 1rem;
--text-lg: 1.125rem;
--text-xl: 1.25rem;
--text-2xl: 1.5rem;
--text-3xl: 1.875rem;
/* Hebrew line heights (taller than Latin defaults) */
--leading-tight: 1.4;
--leading-normal: 1.7;
--leading-relaxed: 1.9;
}Tailwind v3 (JavaScript configuration):
// tailwind.config.js
module.exports = {
content: ['./src/**/*.{html,js,jsx,tsx}'],
theme: {
extend: {
fontFamily: {
hebrew: ['Heebo', 'Assistant', 'Noto Sans Hebrew', 'sans-serif'],
'hebrew-serif': ['Frank Ruhl Libre', 'David Libre', 'serif'],
},
lineHeight: {
'hebrew': '1.7',
'hebrew-tight': '1.4',
'hebrew-relaxed': '1.9',
},
},
},
plugins: [],
};Always prefer logical utilities over physical directional ones:
| Physical (avoid) | Logical (use) | RTL Behavior |
|---|---|---|
ml-4 |
ms-4 |
Right margin in RTL |
mr-4 |
me-4 |
Left margin in RTL |
pl-4 |
ps-4 |
Right padding in RTL |
pr-4 |
pe-4 |
Left padding in RTL |
left-0 |
start-0 |
Right: 0 in RTL |
right-0 |
end-0 |
Left: 0 in RTL |
border-l |
border-s |
Right border in RTL |
border-r |
border-e |
Left border in RTL |
rounded-l-lg |
rounded-s-lg |
Right rounded in RTL |
rounded-r-lg |
rounded-e-lg |
Left rounded in RTL |
text-left |
text-start |
Right-aligned in RTL |
text-right |
text-end |
Left-aligned in RTL |
scroll-ml-4 |
scroll-ms-4 |
Right scroll margin in RTL |
When you need direction-specific overrides:
<!-- Root setup -->
<html lang="he" dir="rtl">
<!-- Dir variant usage -->
<div class="flex rtl:flex-row-reverse">
<span class="rtl:rotate-180">→</span>
<span>הבא</span>
</div>
<!-- Icon mirroring for directional icons -->
<button class="flex items-center gap-2">
<svg class="rtl:scale-x-[-1]"><!-- arrow icon --></svg>
<span>חזרה</span>
</button>
<!-- Conditional spacing that differs by direction -->
<div class="ltr:ml-auto rtl:mr-auto">
<!-- Push to end in both directions -->
</div><!-- Hebrew body text with proper settings -->
<body dir="rtl" class="font-hebrew text-base leading-hebrew
tracking-normal">
<!-- Hebrew heading -->
<h1 class="text-3xl font-bold leading-hebrew-tight">
כותרת ראשית
</h1>
<!-- Hebrew paragraph -->
<p class="text-base leading-hebrew [word-spacing:0.05em]">
טקסט גוף עם ריווח מותאם לקריאות עברית.
</p>
<!-- Mixed Hebrew + English content -->
<p class="text-base leading-hebrew">
פריט מספר <span dir="ltr" class="font-mono">ORD-12345</span> אושר
</p>
</body>RTL-first card:
<div class="rounded-lg border border-gray-200 p-6">
<div class="flex items-center justify-between mb-4
border-b border-gray-100 pb-4">
<h3 class="text-lg font-bold">כותרת הכרטיס</h3>
<span class="text-sm text-gray-500">פעיל</span>
</div>
<p class="text-base leading-hebrew text-gray-700">
תוכן הכרטיס עם טקסט בעברית.
</p>
<div class="mt-4 flex gap-3">
<button class="bg-blue-600 text-white px-4 py-2 rounded-md">
אישור
</button>
<button class="border border-gray-300 px-4 py-2 rounded-md">
ביטול
</button>
</div>
</div>RTL-first navigation:
<nav dir="rtl" class="flex items-center justify-between
px-6 py-4 bg-white border-b">
<div class="flex items-center gap-3">
<img src="/logo.svg" alt="לוגו" class="h-8">
<span class="font-bold text-xl">שם האתר</span>
</div>
<ul class="flex gap-6 text-sm font-medium">
<li><a href="/" class="text-blue-600">ראשי</a></li>
<li><a href="/about" class="text-gray-600">אודות</a></li>
<li><a href="/contact" class="text-gray-600">צור קשר</a></li>
</ul>
</nav>RTL-first sidebar layout:
<div class="grid grid-cols-[280px_1fr] min-h-screen">
<!-- Sidebar: appears on right in RTL automatically -->
<aside class="border-e border-gray-200 pe-6 p-4">
<nav class="space-y-2">
<a href="#" class="block ps-4 py-2 rounded-md
bg-blue-50 text-blue-700 border-s-4
border-blue-600">לוח בקרה</a>
<a href="#" class="block ps-4 py-2 rounded-md
text-gray-600">הגדרות</a>
</nav>
</aside>
<!-- Main content -->
<main class="p-6">
<h1 class="text-2xl font-bold mb-6">לוח בקרה</h1>
</main>
</div><form dir="rtl" class="max-w-lg space-y-6">
<div>
<label for="name" class="block text-sm font-medium
text-gray-700 mb-2">שם מלא</label>
<input id="name" type="text"
class="w-full px-4 py-3 border border-gray-300
rounded-md text-base font-hebrew
focus:outline-none focus:ring-2
focus:ring-blue-500">
</div>
<div>
<label for="phone" class="block text-sm font-medium
text-gray-700 mb-2">טלפון</label>
<input id="phone" type="tel" dir="ltr"
placeholder="05X-XXXXXXX"
class="w-full px-4 py-3 border border-gray-300
rounded-md text-base
focus:outline-none focus:ring-2
focus:ring-blue-500">
</div>
<div>
<label for="message" class="block text-sm font-medium
text-gray-700 mb-2">הודעה</label>
<textarea id="message" rows="4"
class="w-full px-4 py-3 border border-gray-300
rounded-md text-base font-hebrew
leading-hebrew
focus:outline-none focus:ring-2
focus:ring-blue-500"></textarea>
</div>
<button type="submit"
class="w-full bg-blue-600 text-white py-3
rounded-md font-medium text-base
hover:bg-blue-700 transition-colors">
שליחה
</button>
</form>User says: "Configure Tailwind for my Hebrew web app"
Result: Add Hebrew font families to Tailwind theme, configure Hebrew-optimized line heights, set up dir="rtl" on root HTML element, and demonstrate using logical utilities (ms-/me-/ps-/pe-) instead of physical ones (ml-/mr-/pl-/pr-).
User says: "Make this Tailwind component work in Hebrew RTL" Result: Replace all physical utility classes with logical equivalents (ml- to ms-, pl- to ps-, text-left to text-start, border-l to border-s, rounded-l to rounded-s), add rtl: variants for directional icons, and set font-hebrew class on text elements.
User says: "Create a Hebrew admin dashboard layout with Tailwind" Result: Build grid layout with RTL sidebar (border-e, pe-6), navigation with Hebrew font and RTL flow, card components using logical spacing, and form elements with proper Hebrew typography (font-hebrew, leading-hebrew).
references/rtl-config.md -- Complete Tailwind CSS RTL configuration reference: v4 CSS-first and v3 JavaScript config examples, full physical-to-logical utility mapping table, dir variant usage patterns, Hebrew font stack presets, typography token definitions, and migration guide from physical to logical utilities.Cause: Using older Tailwind version without logical property support
Solution: Logical utilities (ms-, me-, ps-, pe-, start-, end-) require Tailwind v3.3+. For v3.0-3.2, use rtl:/ltr: variants instead (e.g., rtl:mr-4 ltr:ml-4). Tailwind v4 has full logical property support built in.
Cause: Hebrew font family not defined in Tailwind configuration Solution: Add the Hebrew font stack to your Tailwind theme under fontFamily.hebrew. Ensure the font CSS is imported (Google Fonts link or local @font-face). Verify the class name matches your config key.
Cause: Grid or flex layout not respecting dir attribute
Solution: CSS Grid and Flexbox automatically respect dir="rtl". Ensure dir="rtl" is set on the html element. Use logical properties for borders (border-e instead of border-r) and padding (pe- instead of pr-). Do not use direction: rtl in CSS; use the HTML attribute instead.
Supported Agents
Trust Score
Generate professional Hebrew documents including PDF, DOCX, and PPTX with full RTL support and proper Hebrew typography. Use when user asks to create Hebrew PDF, generate Israeli business documents, "lehafik heshbonit", "litstor hozeh", build Hebrew Word document, create Hebrew PowerPoint, or produce Israeli templates such as Heshbonit Mas (tax invoice), Hozeh (contract), Hatza'at Mechir (proposal), or Protokol (meeting minutes). Covers reportlab, WeasyPrint, python-docx, and pptxgenjs with bidi paragraph support. Do NOT use for OCR or reading existing documents (use hebrew-ocr-forms instead).
Schedule meetings, deployments, and events respecting Shabbat, Israeli holidays (chagim), and Hebrew calendar constraints. Use when user asks to schedule around Shabbat, "zmanim", check Israeli holidays, plan around chagim, set Israeli business hours, or needs Hebrew calendar-aware scheduling logic. Includes halachic times (zmanim) via HebCal API, full Israeli holiday calendar, and Israeli business hour conventions. Do NOT use for religious halachic rulings (consult a rabbi) or diaspora 2-day holiday scheduling.
Write and edit professional content in Hebrew including marketing copy, UX text, articles, emails, and social media posts. Use when user asks to write in Hebrew, "ktov b'ivrit", create Hebrew marketing content, edit Hebrew text, write Hebrew UX copy, or optimize Hebrew content for SEO. Covers grammar rules, formal vs informal register, gendered language handling, and Hebrew SEO best practices. Do NOT use for Hebrew NLP/ML tasks (use hebrew-nlp-toolkit) or translation (use a translation skill).
Want to build your own skill? Try the Skill Creator · Submit a Skill