
Hebrew Rtl Best Practices
- 229 installs
- 21 repo stars
- Updated August 3, 2026
- skills-il/localization
hebrew-rtl-best-practices is a localization agent skill that ships correct Hebrew RTL web UIs using logical CSS, bidi text, and Next/React setup for developers building right-to-left interfaces.
About
hebrew-rtl-best-practices is a version 1.3.0 localization skill from skills-il that teaches developers how to build and fix Hebrew right-to-left web interfaces without guessing mirror and typography rules. The skill covers CSS logical properties (margin-inline, padding-inline), the :dir() pseudo-class, Tailwind RTL utilities, Next.js and React RTL configuration, icon mirroring, Hebrew font selection, and bidirectional text handling for numbers, URLs, and emails embedded in Hebrew copy. Triggers include RTL layout questions, Hebrew text direction, bidi bugs, and Hebrew CSS setup. The skill explicitly scopes to Hebrew web UIs and excludes native mobile RTL (React Native I18nManager, SwiftUI) unless shared patterns are requested. Reach for hebrew-rtl-best-practices when converting an LTR site to Hebrew, fixing misaligned components, or setting up next-intl or MUI for Israeli audiences.
- CSS logical properties and :dir() for direction-aware layout without hard-coded left/right
- Tailwind RTL patterns and React/Next.js RTL configuration
- Hebrew typography and font-selection guidance distinct from Arabic RTL
- Icon mirroring and bidirectional (bidi) text handling for mixed Hebrew/Latin UI
- Explicit out-of-scope: native mobile RTL unless user requests shared patterns only
Hebrew Rtl Best Practices by the numbers
- 229 all-time installs (skills.sh)
- Ranked #820 of 2,245 Frontend Development skills by installs in the Skillselion catalog
- Security screen: LOW risk (skills.sh audit)
- Data as of Aug 4, 2026 (Skillselion catalog sync)
npx skills add https://github.com/skills-il/localization --skill hebrew-rtl-best-practicesAdd your badge
Show developers this skill is listed on Skillselion. Paste this into your README.
| Installs | 229 |
|---|---|
| repo stars | ★ 21 |
| Security audit | 3 / 3 scanners passed |
| Last updated | August 3, 2026 |
| Repository | skills-il/localization ↗ |
How do you implement Hebrew RTL layout in React?
Ship Hebrew web UIs with correct RTL layout, bidi text, logical CSS, and Next/React setup without guessing mirror and typography rules.
Who is it for?
Frontend developers shipping Hebrew web apps with React, Next.js, Tailwind, or MUI who need correct RTL without layout bugs.
Skip if: Arabic-only typography projects or native mobile RTL apps outside the skill's web-focused scope.
When should I use this skill?
A developer asks about Hebrew RTL layout, bidi text, logical CSS properties, Tailwind RTL, or converting an LTR site to Hebrew.
What you get
RTL-correct layouts with logical CSS, :dir() rules, mirrored icons, Hebrew typography, and bidi-safe mixed-direction text.
- RTL layout configuration
- Logical CSS and bidi text fixes
- Hebrew typography setup
By the numbers
- Version 1.3.0 localization skill from skills-il
- Covers CSS logical properties, :dir(), and Tailwind RTL utilities
Files
Hebrew RTL Best Practices
Instructions
Step 1: Set Up Document Direction
Always start with the HTML attribute (not just CSS):
<html lang="he" dir="rtl">This tells browsers, screen readers, and CSS to use RTL as the base direction.
Step 2: Use CSS Logical Properties
NEVER use physical directional properties for layout:
| Physical (avoid) | Logical (use) |
|---|---|
margin-left | margin-inline-start |
margin-right | margin-inline-end |
padding-left | padding-inline-start |
padding-right | padding-inline-end |
border-left | border-inline-start |
text-align: left | text-align: start |
text-align: right | text-align: end |
float: left | float: inline-start |
left: 10px | inset-inline-start: 10px |
This ensures the layout automatically mirrors in RTL mode.
When you genuinely need a direction-specific rule that logical properties cannot express, prefer the :dir() pseudo-class over [dir="rtl"] attribute selectors:
/* Modern: matches the resolved direction, including dir="auto" and inheritance */
.chevron:dir(rtl) { transform: scaleX(-1); }
/* Older approach: only matches an explicit dir attribute on/above the element */
[dir="rtl"] .chevron { transform: scaleX(-1); }:dir() is part of Selectors Level 4 and resolves the computed direction, so it also works for elements whose direction comes from dir="auto" or from an ancestor, where an attribute selector would miss them. Browser support: Chrome and Edge shipped it in version 120 (late 2023), Firefox has supported it for years, and Safari added it in 16.4, so it is now Baseline (widely available). For older-browser support, keep an [dir="rtl"] fallback rule or use a logical property instead. Check current support at https://caniuse.com/css-dir-pseudo.
Step 3: Handle Bidirectional Text
When mixing Hebrew and English/numbers:
/* Isolate embedded LTR content */
.ltr-content {
unicode-bidi: isolate;
direction: ltr;
}
/* For inline elements with mixed content */
.bidi-override {
unicode-bidi: bidi-override;
}Common bidi issues:
- Phone numbers appearing reversed: Wrap in
<bdo dir="ltr"> - Punctuation at wrong end of sentence: Use
unicode-bidi: isolate - URLs/emails in Hebrew text: Wrap in
<span dir="ltr">
Numbers and dates: Standalone numbers and DD/MM/YYYY dates inside Hebrew text usually render fine because digits are weak-LTR, but a number that is immediately followed by a sign, currency, or a second number can flip. When a value must keep a fixed visual order, isolate it with <span dir="ltr"> or unicode-bidi: isolate rather than trusting the default bidi resolution.
Format the value, then isolate it. Bidi isolation only stops a correct string from flipping; it does not produce the right string. Use Intl to format, then isolate: Intl.NumberFormat('he-IL', { style: 'currency', currency: 'ILS' }) for shekel amounts and Intl.DateTimeFormat('he-IL') for dates, and wrap the output in <span dir="ltr"> (or unicode-bidi: isolate) if it sits inline in Hebrew prose. Devs commonly conflate the two and apply bidi fixes to a formatting bug (or vice versa).
Form inputs need `dir="auto"`. Put dir="auto" on every <input> and <textarea> so each value resolves its own base direction. This is the most visible end-user RTL bug: an email or an English word typed into a Hebrew form jumps to the wrong side without it. Note that the placeholder does not trigger auto-detection, so set the resting direction with CSS if the empty-field look matters.
`<bdi>` vs `<bdo>`: use <bdo dir="ltr"> only when you want to force a direction (it overrides the bidi algorithm). For user-generated or unknown-direction content, prefer <bdi>, which isolates the content so its direction is auto-detected and cannot leak into the surrounding text:
<!-- User name could be Hebrew or Latin; bdi isolates it either way -->
<p>שלום, <bdi>{{ userName }}</bdi>, ברוך הבא</p>For free-text fields, dir="auto" (or unicode-bidi: plaintext in CSS) lets the browser pick the base direction per value, which is the correct default for comments, names, and search queries where you do not know the language in advance.
Shadows and gradients do not auto-flip. CSS logical properties mirror layout, but box-shadow, text-shadow, and linear-gradient offsets/angles are physical and stay fixed when direction flips. A shadow offset of 4px 4px that looks correct in LTR will point the "wrong" way relative to an RTL layout. The same physical-not-logical trap applies to transform-origin, background-position, and translateX-based keyframe animations (slide-in drawers, carousels, progress shimmer). Flip each explicitly with a :dir(rtl) (or [dir="rtl"]) override when its direction is meaningful.
Step 4: Mirror Directional Icons
Icon mirroring is one of the highest-frequency RTL bugs. The rule: mirror icons whose meaning is tied to reading direction, leave everything else alone.
Mirror these (their direction encodes "forward/back/next/previous" relative to reading order):
- Navigation arrows, back/forward buttons, breadcrumb chevrons
- "Send" / submit arrows, carousel and pagination arrows
- Indentation, list-nesting, and reply arrows
- Progress indicators that imply forward motion
Do NOT mirror these (mirroring makes them wrong or unrecognizable):
- Logos and brand marks
- Checkmarks and X / close icons
- Media play buttons (a play button always points right, it refers to the timeline, not reading direction)
- Clocks and analog-time icons (clockwise is universal)
- Icons depicting real-world objects with a fixed orientation (a phone handset, a magnifying glass with the handle, most product icons)
Technique, mirror with a horizontal flip transform:
/* Flip only when the document direction is RTL */
.icon-directional:dir(rtl) { transform: scaleX(-1); }<!-- Tailwind: rtl: variant for the cases logical properties cannot cover -->
<button class="rtl:-scale-x-100">
<ArrowLeftIcon />
</button>Many icon sets (for example Material Symbols) already ship RTL-aware variants, prefer those over flipping when available, because a flipped icon can mis-render fine detail or embedded text.
Step 5: Hebrew Typography
Recommended font stack:
font-family: 'Heebo', 'Assistant', 'Rubik', 'Noto Sans Hebrew', sans-serif;Typography settings:
body[dir="rtl"] {
font-size: 16px; /* Hebrew needs slightly larger than Latin */
line-height: 1.7;
letter-spacing: normal; /* NEVER add letter-spacing for Hebrew */
word-spacing: 0.05em; /* Slight word spacing improves readability */
}Step 6: Framework-Specific Setup
Tailwind CSS RTL (v4, current; logical utilities since v3.3):
Prefer logical property utilities over rtl:/ltr: variants:
| Physical class | Logical class | CSS property |
|---|---|---|
ml-4 | ms-4 | margin-inline-start |
mr-4 | me-4 | margin-inline-end |
pl-4 | ps-4 | padding-inline-start |
pr-4 | pe-4 | padding-inline-end |
left-4 | inset-s-4 (was start-4) | inset-inline-start |
right-4 | inset-e-4 (was end-4) | inset-inline-end |
rounded-l-lg | rounded-s-lg | border-start-start-radius + border-end-start-radius |
rounded-r-lg | rounded-e-lg | border-start-end-radius + border-end-end-radius |
<!-- Bad: requires two classes, breaks without dir attribute -->
<div class="ltr:ml-4 rtl:mr-4">...</div>
<!-- Good: single class, auto-mirrors based on dir -->
<div class="ms-4">...</div>Reserve rtl: / ltr: variants only for cases logical properties cannot handle (e.g., directional icons, transforms).
Tailwind v4 note: v4 (GA since early 2025, currently v4.3) uses CSS-first configuration (@import "tailwindcss" in CSS) instead of tailwind.config.js. Logical utilities work identically in both v3 and v4. As of v4.3 (May 2026) the logical inset utilities start-*/end-* are deprecated in favor of inset-s-*/inset-e-* (the old names still work); the margin/padding utilities ms-*/me-*/ps-*/pe-* are unaffected.
Next.js App Router:
// app/layout.tsx
import { Heebo } from 'next/font/google';
const heebo = Heebo({
subsets: ['hebrew', 'latin'],
weight: ['400', '500', '700'],
});
export default async function RootLayout({
children,
params,
}: {
children: React.ReactNode;
params: Promise<{ locale: string }>;
}) {
const { locale } = await params;
const isRTL = locale === 'he';
return (
<html lang={locale} dir={isRTL ? 'rtl' : 'ltr'}>
<body className={heebo.className}>{children}</body>
</html>
);
}next/font self-hosts the font (no external Google Fonts requests, zero layout shift).
React with MUI:
Current MUI (v9 as of 2026) uses the official fork @mui/stylis-plugin-rtl, not the older community stylis-plugin-rtl package. The official fork fixes CSS-layers issues and supports current Stylis versions; this has been the recommended setup since MUI v6.
import { createTheme, ThemeProvider } from '@mui/material/styles';
import { CacheProvider } from '@emotion/react';
import createCache from '@emotion/cache';
import { rtlPlugin } from '@mui/stylis-plugin-rtl';
import { prefixer } from 'stylis';
const cacheRtl = createCache({
key: 'muirtl',
stylisPlugins: [prefixer, rtlPlugin],
});
const theme = createTheme({ direction: 'rtl' });Confirm the exact import name and setup against the current MUI RTL guide (https://mui.com/material-ui/customization/right-to-left/) for your MUI version.
Portalled UI (modals, dropdowns, tooltips, toasts). Components rendered through a portal (React createPortal, Radix, MUI Menu, Floating UI) mount at document.body and inherit direction from there, but many libraries assume LTR. Set dir on <html> AND pass the library's own direction setting: Radix needs a <DirectionProvider dir="rtl"> wrapper, MUI needs direction: 'rtl' in the theme. Otherwise popovers open on the wrong side even when the rest of the page is correct.
Step 7: Common Pitfalls to Check
1. Directional icons -- mirror them (see Step 4 for which icons to flip and which to leave) 2. Progress bars -- should fill from right to left 3. Sliders/carousels -- swipe direction should reverse 4. Form labels -- should be right-aligned 5. Breadcrumbs -- separator direction should reverse 6. Tables -- columns reorder automatically, but force numeric, code, and date cells back to LTR with <td dir="ltr"> or text-align: end 7. Charts -- x-axis may need to reverse for Hebrew readers (SVG has no logical properties, so use the charting library's reversed/rtl option, not CSS) 8. Shadows and gradients -- physical offsets/angles do not auto-flip (see Step 3) 9. Fixed and sticky chrome (headers, toasts, FABs, drawers) -- hardcoded left: 0 / right: 0 does not flip; use inset-inline-start / inset-inline-end 10. Scrollbars sit on the left in RTL -- reserve space with scrollbar-gutter: stable to avoid reflow; text-wrap: balance improves Hebrew headings
Step 8: Verify the RTL Layout
Authoring rules are not enough, verify before shipping:
- Flip the whole app to
dir="rtl"and scan for anything that did not move (it is still using a physical property). - Test one canonical mixed string in every text surface:
שלום John 050-1234567 ₪1,234exercises Hebrew, Latin, a phone number, and a currency amount at once. - Open every modal, dropdown, tooltip, and toast (portalled UI is the most common RTL miss).
- Check fixed/sticky chrome, charts/SVG, and form fields with
dir="auto".
Examples
Example 1: Convert LTR Component to RTL
User says: "Make this card component work in Hebrew"
Before (LTR-only):
.card {
margin-left: 16px;
padding-right: 12px;
text-align: left;
border-left: 3px solid blue;
}After (RTL-compatible):
.card {
margin-inline-start: 16px;
padding-inline-end: 12px;
text-align: start;
border-inline-start: 3px solid blue;
}With Tailwind, replace ml-4 pr-3 text-left border-l-4 with ms-4 pe-3 text-start border-s-4.
Example 2: Bidi Text Issue
User says: "Numbers are showing backwards in my Hebrew text"
<!-- Wrong: phone number renders as 0544-123-050 -->
<p>התקשרו אלינו: 050-321-4450</p>
<!-- Correct: isolate the LTR content -->
<p>התקשרו אלינו: <span dir="ltr">050-321-4450</span></p>Use unicode-bidi: isolate on the containing span for CSS-only solutions.
Example 3: Tailwind RTL Navigation
User says: "My sidebar is on the wrong side in Hebrew"
<!-- Bad: sidebar stuck on left -->
<aside class="fixed left-0 w-64">...</aside>
<!-- Good: sidebar auto-mirrors (inset-s-0; start-0 is the deprecated alias) -->
<aside class="fixed inset-s-0 w-64">...</aside>
<!-- Back arrow icon still needs rtl: variant (horizontal flip, not rotate-180 which also flips vertically) -->
<button class="rtl:-scale-x-100">
<ArrowLeftIcon />
</button>Bundled Resources
References
references/css-logical-properties.md- Complete physical-to-logical CSS property mapping table (margin, padding, border, positioning, text alignment, sizing) plus Hebrew font stack recommendations for sans-serif, serif, and monospace. Consult when converting any LTR stylesheet to RTL-compatible logical properties or choosing Hebrew web fonts.
Gotchas
- CSS
text-align: leftis wrong for Hebrew. Usetext-align: startwhich respects the document direction. Agents frequently hardcodeleftalignment in CSS. margin-leftandpadding-rightdo not flip in RTL mode. Use CSS logical properties:margin-inline-startandpadding-inline-endinstead. Agents trained on LTR CSS will generate physical properties.- Flexbox
rowdirection auto-reverses in RTL, butrow-reversealso reverses, causing a double-flip back to LTR order. Agents may addrow-reversethinking it creates RTL, but it actually creates LTR within an RTL context. - Phone numbers, credit card numbers, and code snippets must remain LTR even inside RTL containers. Wrap them in
<bdo dir="ltr">or usedirection: ltron the containing element. Agents often let these inherit RTL.
Reference Links
| Source | URL | What to Check |
|---|---|---|
| MDN CSS Logical Properties | https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values | Full property list, browser support tables |
MDN :dir() pseudo-class | https://developer.mozilla.org/en-US/docs/Web/CSS/:dir | Syntax, behavior vs [dir] attribute selectors |
Can I use: :dir() | https://caniuse.com/css-dir-pseudo | Current browser support table |
MDN <bdi> element | https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/bdi | Isolating user-generated bidi content |
| Tailwind CSS RTL Support | https://tailwindcss.com/docs/hover-focus-and-other-states#rtl-support | rtl: / ltr: variant syntax |
| Tailwind Logical Properties | https://tailwindcss.com/docs/margin | ms-*, me-*, ps-*, pe-* utilities |
| MUI Right-to-left | https://mui.com/material-ui/customization/right-to-left/ | @mui/stylis-plugin-rtl setup for current MUI |
| Google Fonts Hebrew | https://fonts.google.com/?subset=hebrew | Available Hebrew font families |
| W3C Internationalization | https://www.w3.org/International/articles/inline-bidi-markup/ | Unicode bidi algorithm, markup best practices |
Troubleshooting
Error: "Text alignment looks wrong"
Cause: Using text-align: left instead of text-align: start Solution: Replace all left/right in text-align with start/end.
Error: "Layout not mirroring"
Cause: Using physical margin/padding instead of logical properties Solution: Replace all margin-left/margin-right with margin-inline-start/margin-inline-end.
{
"schemaVersion": "1.0",
"skill": "hebrew-rtl-best-practices",
"generated_at": "2026-06-21T00:00:00Z",
"claims": [
{
"claim_id": "dir-pseudo-browser-support",
"claim": "The CSS :dir() pseudo-class shipped in Chrome and Edge version 120 (late 2023), Safari 16.4, and Firefox years earlier; it is now Baseline (widely available).",
"source_url": "https://caniuse.com/css-dir-pseudo",
"raw_snippet": "CSS :dir() pseudo-class. Chrome 120, Edge 120, Safari 16.4, Firefox 49. Now Baseline widely available.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "tailwind-v4-current",
"claim": "Tailwind CSS v4 has been GA since early 2025 and the current version is v4.3 (released May 2026); v4 uses CSS-first configuration with @import \"tailwindcss\".",
"source_url": "https://tailwindcss.com/blog/tailwindcss-v4-3",
"raw_snippet": "Tailwind CSS v4.3. May 8, 2026. CSS-first configuration via @import \"tailwindcss\".",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "tailwind-v43-inset-deprecation",
"claim": "As of Tailwind v4.3 (May 2026) the logical inset utilities start-*/end-* are deprecated in favor of inset-s-*/inset-e-* (the old names still work); the margin/padding utilities ms-*/me-*/ps-*/pe-* are unaffected.",
"source_url": "https://tailwindcss.com/blog/tailwindcss-v4-3",
"raw_snippet": "The existing start-* and end-* utilities are still available, but they're now deprecated in favor of inset-s-* and inset-e-* so the whole API lines up with inset-bs-* and inset-be-*.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "tailwind-logical-since-33",
"claim": "Tailwind logical property utilities (ms-, me-, ps-, pe-, start-, end-, text-start, text-end) require Tailwind v3.3+ and are fully supported in v4.",
"source_url": "https://tailwindcss.com/docs/margin",
"raw_snippet": "Use the ms-* and me-* utilities to set the margin-inline-start and margin-inline-end logical properties.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "mui-rtl-plugin",
"claim": "Current MUI (v9 as of 2026) uses the official fork @mui/stylis-plugin-rtl for RTL, recommended since MUI v6.",
"source_url": "https://mui.com/material-ui/customization/right-to-left/",
"raw_snippet": "Right-to-left support. Use the @mui/stylis-plugin-rtl plugin with the prefixer to enable RTL in Material UI.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "nextfont-selfhost",
"claim": "next/font self-hosts Google fonts (Heebo) with no external request and zero layout shift; the API takes subsets and weight options.",
"source_url": "https://nextjs.org/docs/app/getting-started/fonts",
"raw_snippet": "next/font automatically self-hosts any Google Font. Fonts are included in the deployment and served from the same domain, with no requests sent to Google.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "hebrew-google-fonts",
"claim": "Heebo, Assistant, Rubik, and Noto Sans Hebrew are available on Google Fonts with the hebrew subset.",
"source_url": "https://fonts.google.com/?subset=hebrew",
"raw_snippet": "Hebrew fonts on Google Fonts include Heebo, Assistant, Rubik, and Noto Sans Hebrew.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "intl-numberformat-ils",
"claim": "Intl.NumberFormat('he-IL', { style: 'currency', currency: 'ILS' }) formats shekel amounts and Intl.DateTimeFormat('he-IL') formats dates for Hebrew locale.",
"source_url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat",
"raw_snippet": "new Intl.NumberFormat('he-IL', { style: 'currency', currency: 'ILS' }) returns a formatter for Israeli new shekel currency.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "ref-mdn-dir",
"claim": "MDN documents the :dir() pseudo-class behavior and how it differs from the [dir] attribute selector.",
"source_url": "https://developer.mozilla.org/en-US/docs/Web/CSS/:dir",
"raw_snippet": "The :dir() CSS pseudo-class matches elements based on the directionality of the text contained in them.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "ref-mdn-logical-properties",
"claim": "MDN documents CSS logical properties and values (margin-inline-start, padding-inline-end, inset-inline-start, etc.) and their browser support.",
"source_url": "https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values",
"raw_snippet": "CSS logical properties and values are a module of CSS introducing logical properties and values that provide the ability to control layout through logical, rather than physical, direction and dimension mappings.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "ref-mdn-bdi",
"claim": "MDN documents the <bdi> element for isolating user-generated bidirectional content.",
"source_url": "https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/bdi",
"raw_snippet": "The <bdi> HTML element tells the browser's bidirectional algorithm to treat the text it contains in isolation from its surrounding text.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "ref-tailwind-rtl-variant",
"claim": "Tailwind documents the rtl: and ltr: variants for direction-specific styling.",
"source_url": "https://tailwindcss.com/docs/hover-focus-and-other-states#rtl-support",
"raw_snippet": "Use the rtl and ltr variants to conditionally apply styles in right-to-left and left-to-right modes respectively.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "ref-w3c-bidi",
"claim": "W3C Internationalization documents inline bidi markup and the Unicode bidirectional algorithm best practices.",
"source_url": "https://www.w3.org/International/articles/inline-bidi-markup/",
"raw_snippet": "Creating HTML pages in Arabic, Hebrew and other right-to-left scripts: inline markup and bidirectional text.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "illustrative-shekel-testcase",
"claim": "The canonical RTL test string includes a formatted shekel currency amount (such as the example output ₪1,234) to exercise currency rendering inside Hebrew text. This is an illustrative test vector, not a factual price claim; it mirrors the output of Intl.NumberFormat('he-IL', { style: 'currency', currency: 'ILS' }).",
"source_url": "https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Intl/NumberFormat",
"raw_snippet": "new Intl.NumberFormat('he-IL', { style: 'currency', currency: 'ILS' }).format(1234) produces a shekel-formatted string such as ₪1,234.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
},
{
"claim_id": "scrollbar-gutter-baseline",
"claim": "scrollbar-gutter became Baseline (newly available) in December 2024; reserving the gutter avoids content reflow. text-wrap: balance is referenced in the skill only as a heading-readability aid, with no Baseline-date claim.",
"source_url": "https://web.dev/blog/baseline-scrollbar-props",
"raw_snippet": "scrollbar-gutter and the scrollbar-color and scrollbar-width properties are now Baseline newly available as of December 11, 2024.",
"fetched_at": "2026-06-21T00:00:00Z",
"appears_in": ["SKILL.md", "SKILL_HE.md"]
}
]
}
{
"author": "skills-il",
"version": "1.4.0",
"category": "localization",
"tags": {
"he": [
"ימין-לשמאל",
"עברית",
"CSS",
"פריסה",
"טיפוגרפיה",
"דו-כיווני"
],
"en": [
"rtl",
"hebrew",
"css",
"layout",
"typography",
"bidi"
]
},
"display_name": {
"he": "שיטות עבודה מומלצות ל-RTL",
"en": "Hebrew RTL Best Practices"
},
"display_description": {
"he": "בניית פריסות RTL (ימין לשמאל) לאפליקציות ווב בעברית. השתמשו כשהמשתמש שואל על פריסת RTL, כיוון טקסט עברי, טקסט דו-כיווני (bidi), CSS עברי, או כשצריך לבנות ממשק ווב בעברית. מכסה תכונות CSS לוגיות, הפסבדו-קלאס :dir(), Tailwind RTL, הגדרת React/Next.js ל-RTL, שיקוף אייקונים, טיפוגרפיה עברית ובחירת גופנים. אל תשתמשו ל-RTL בערבית (טיפוגרפיה שונה) אלא אם המשתמש מבקש במפורש דפוסי RTL משותפים, או ל-RTL במובייל נייטיב (React Native, SwiftUI, Android) שנמצא מחוץ להיקף.",
"en": "Implement right-to-left (RTL) layouts for Hebrew web applications. Use when user asks about RTL layout, Hebrew text direction, bidirectional (bidi) text, Hebrew CSS, \"right to left\", or needs to build a Hebrew web UI. Covers CSS logical properties, the :dir() pseudo-class, Tailwind RTL, React/Next.js RTL setup, icon mirroring, Hebrew typography, and font selection. Do NOT use for Arabic RTL (similar but different typography) unless user explicitly asks for shared RTL patterns, or for native mobile RTL (React Native I18nManager, SwiftUI, Android) which is out of scope."
},
"supported_agents": [
"claude-code",
"cursor",
"github-copilot",
"windsurf",
"opencode",
"codex",
"antigravity",
"gemini-cli"
]
}
{
"cycles": [
{
"version": "1.4.0",
"date": "2026-06-21",
"lessons": [
"Applied: Tailwind framing -> v4 current (v4.3); flagged v4.3 start-*/end- inset deprecation -> inset-s-*/inset-e-*; MUI version label v6/v7 -> v9 (mechanism @mui/stylis-plugin-rtl unchanged).",
"Applied coverage: Intl produce-vs-display framing, form dir=auto as first-class rule, portalled-UI dir (Radix DirectionProvider / MUI direction), fixed/sticky inset pitfall, mixed-direction tables technique, transform-origin/background-position/animation note, new Step 8 verification checklist.",
"Deferred (MINOR): explicit writing-mode vs direction distinction; clarify lang=he (not dir) drives screen-reader pronunciation; deeper SVG/charting RTL recipe beyond the one-line pitfall. Revisit next cycle.",
"persistent: description unchanged this cycle so Phase 5.7 eval skipped; revisit description trigger phrases if AI-mode routing data shows misroutes.",
"Expert MAJORs deferred to next cycle (non-blocking, gate PASSed): (1) RTL scrollLeft / JS-scroller cross-browser inconsistency for custom carousels; (2) CSS Grid track/line-based placement does NOT follow logical direction like flex row (reference file over-claims 'Grid just works'); (3) add general 'keep code/pre/kbd/file-paths LTR' rule beyond the table-cell case; (4) positive order + :dir(rtl) reorder pattern to complement the row-reverse gotcha; (5) lang+dir pairing on embedded spans for shaping/a11y; (6) typography section is partly folkloric -- word-spacing:0.05em and '16px because Hebrew' are weak; the real wins (Hebrew has no uppercase so text-transform:uppercase is a no-op; Latin webfonts silently lack Hebrew glyphs) are missing. Fixed this cycle: Example 3 rtl:rotate-180 -> rtl:-scale-x-100."
]
}
]
}
CSS Logical Properties Quick Reference for Hebrew RTL
Property Mapping Table
Margin
| Physical | Logical | Notes |
|---|---|---|
margin-left | margin-inline-start | Start of reading direction |
margin-right | margin-inline-end | End of reading direction |
margin-top | margin-block-start | Top in both LTR and RTL |
margin-bottom | margin-block-end | Bottom in both LTR and RTL |
Padding
| Physical | Logical |
|---|---|
padding-left | padding-inline-start |
padding-right | padding-inline-end |
padding-top | padding-block-start |
padding-bottom | padding-block-end |
Border
| Physical | Logical |
|---|---|
border-left | border-inline-start |
border-right | border-inline-end |
border-top | border-block-start |
border-bottom | border-block-end |
Positioning
| Physical | Logical |
|---|---|
left | inset-inline-start |
right | inset-inline-end |
top | inset-block-start |
bottom | inset-block-end |
Text and Alignment
| Physical | Logical |
|---|---|
text-align: left | text-align: start |
text-align: right | text-align: end |
float: left | float: inline-start |
float: right | float: inline-end |
Sizing
| Physical | Logical |
|---|---|
width | inline-size |
height | block-size |
min-width | min-inline-size |
max-width | max-inline-size |
Hebrew Font Stack Recommendations
Sans-Serif (recommended for web)
font-family: 'Heebo', 'Assistant', 'Rubik', 'Noto Sans Hebrew', 'Arial Hebrew', sans-serif;Serif (for formal/print-style content)
font-family: 'Frank Ruhl Libre', 'David Libre', 'Noto Serif Hebrew', serif;Monospace (for code with Hebrew comments)
font-family: 'Cousine', 'Noto Sans Mono', monospace;Browser Support Notes
- CSS Logical Properties are supported in all modern browsers (Chrome 89+, Firefox 66+, Safari 15+, Edge 89+)
- For older browser support, use PostCSS plugin
postcss-logicalas a fallback - Flexbox and Grid automatically respect
dir="rtl"-- no additional CSS needed for basic layout reversal
שיטות עבודה מומלצות ל-RTL בעברית
הנחיות
שלב 1: הגדרת כיוון המסמך
תמיד מתחילים עם תכונת ה-HTML (לא רק עם CSS):
<html lang="he" dir="rtl">זה אומר לדפדפנים, לקוראי מסך ול-CSS להשתמש ב-RTL ככיוון הבסיס.
שלב 2: תכונות CSS לוגיות
אף פעם לא להשתמש בתכונות כיווניות פיזיות לפריסה:
| פיזי (תימנעו) | לוגי (תשתמשו) |
|---|---|
margin-left | margin-inline-start |
margin-right | margin-inline-end |
padding-left | padding-inline-start |
padding-right | padding-inline-end |
border-left | border-inline-start |
text-align: left | text-align: start |
text-align: right | text-align: end |
float: left | float: inline-start |
left: 10px | inset-inline-start: 10px |
ככה הפריסה משתקפת אוטומטית במצב RTL.
כשבאמת צריך כלל שתלוי בכיוון שתכונות לוגיות לא יכולות לבטא, עדיף להשתמש בפסבדו-קלאס :dir() במקום בסלקטורים על תכונת [dir="rtl"]:
/* מודרני: מתאים לכיוון המחושב, כולל dir="auto" וירושה */
.chevron:dir(rtl) { transform: scaleX(-1); }
/* גישה ישנה: מתאים רק לתכונת dir מפורשת על האלמנט או מעליו */
[dir="rtl"] .chevron { transform: scaleX(-1); }הפסבדו-קלאס :dir() הוא חלק מ-Selectors Level 4 והוא פותר את הכיוון המחושב, אז הוא עובד גם לאלמנטים שהכיוון שלהם מגיע מ-dir="auto" או מאב קדמון, איפה שסלקטור תכונה היה מפספס אותם. תמיכת דפדפנים: כרום ו-Edge הוסיפו אותו בגרסה 120 (סוף 2023), פיירפוקס תומך בו כבר שנים, וספארי הוסיף אותו ב-16.4, ולכן הוא כיום Baseline (זמין באופן נרחב בדפדפנים). לתמיכה בדפדפנים ישנים, כדאי לשמור כלל גיבוי עם [dir="rtl"] או להשתמש בתכונה לוגית במקום. אפשר לבדוק תמיכה עדכנית בכתובת https://caniuse.com/css-dir-pseudo.
שלב 3: טיפול בטקסט דו-כיווני
כשמשלבים עברית עם אנגלית/מספרים:
/* Isolate embedded LTR content */
.ltr-content {
unicode-bidi: isolate;
direction: ltr;
}
/* For inline elements with mixed content */
.bidi-override {
unicode-bidi: bidi-override;
}בעיות bidi נפוצות:
- מספרי טלפון מופיעים הפוך: עוטפים ב-
<bdo dir="ltr"> - סימני פיסוק בקצה הלא נכון של המשפט: משתמשים ב-
unicode-bidi: isolate - כתובות URL ואימייל בתוך טקסט עברי: עוטפים ב-
<span dir="ltr">
מספרים ותאריכים: מספרים בודדים ותאריכים בפורמט DD/MM/YYYY בתוך טקסט עברי בדרך כלל מוצגים תקין כי ספרות הן חלשות-LTR, אבל מספר שאחריו מיד סימן, מטבע או מספר שני עלול להתהפך. כשערך חייב לשמור על סדר ויזואלי קבוע, בודדו אותו עם <span dir="ltr"> או unicode-bidi: isolate במקום לסמוך על פתרון ה-bidi הדיפולטי.
עצבו את הערך ואז בודדו אותו: בידוד bidi רק מונע ממחרוזת תקינה להתהפך, הוא לא מייצר את המחרוזת הנכונה. השתמשו ב-Intl לעיצוב ואז בודדו: Intl.NumberFormat('he-IL', { style: 'currency', currency: 'ILS' }) לסכומים בשקלים ו-Intl.DateTimeFormat('he-IL') לתאריכים, ועטפו את הפלט ב-<span dir="ltr"> (או unicode-bidi: isolate) אם הוא יושב בתוך טקסט עברי. מפתחים נוטים לבלבל בין השניים ולהחיל תיקון bidi על באג עיצוב (ולהפך).
שדות טופס צריכים dir="auto": הוסיפו dir="auto" לכל <input> ו-<textarea> כדי שכל ערך יפתור את כיוון הבסיס שלו. זה הבאג הכי בולט למשתמש קצה ב-RTL: אימייל או מילה באנגלית בתוך טופס עברי קופצים לצד הלא נכון בלעדיו. שימו לב שה-placeholder לא מפעיל זיהוי אוטומטי, אז קבעו את כיוון המנוחה ב-CSS אם המראה של שדה ריק חשוב.
האלמנט <bdi> מול <bdo>: השתמשו ב-<bdo dir="ltr"> רק כשרוצים לכפות כיוון (הוא דורס את אלגוריתם ה-bidi). לתוכן שנוצר על ידי משתמשים או תוכן בכיוון לא ידוע, עדיף <bdi>, שמבודד את התוכן כך שהכיוון שלו מזוהה אוטומטית ולא יכול לדלוף לטקסט שמסביב:
<!-- שם המשתמש יכול להיות בעברית או בלטינית; bdi מבודד אותו כך או כך -->
<p>שלום, <bdi>{{ userName }}</bdi>, ברוך הבא</p>לשדות טקסט חופשי, dir="auto" (או unicode-bidi: plaintext ב-CSS) נותן לדפדפן לבחור את כיוון הבסיס לכל ערך, וזו ברירת המחדל הנכונה לתגובות, שמות ומחרוזות חיפוש שבהן לא יודעים מראש את השפה.
צללים וגרדיאנטים לא מתהפכים אוטומטית. תכונות CSS לוגיות משקפות פריסה, אבל היסטים וזוויות של box-shadow, text-shadow ו-linear-gradient הם פיזיים ונשארים קבועים כשהכיוון מתהפך. היסט צל של 4px 4px שנראה תקין ב-LTR יצביע לכיוון "הלא נכון" ביחס לפריסת RTL. אותה מלכודת פיזית-לא-לוגית חלה גם על transform-origin, background-position ואנימציות keyframe מבוססות translateX (מגירות נשלפות, קרוסלות, אפקט נצנוץ התקדמות). הפכו כל אחד במפורש עם דריסת :dir(rtl) (או [dir="rtl"]) כשהכיוון שלו משמעותי.
שלב 4: שיקוף אייקונים כיווניים
שיקוף אייקונים הוא אחד הבאגים הנפוצים ביותר ב-RTL. הכלל: לשקף אייקונים שהמשמעות שלהם קשורה לכיוון הקריאה, ולהשאיר את כל השאר במקום.
לשקף את אלה (הכיוון שלהם מקודד "קדימה/אחורה/הבא/הקודם" ביחס לסדר הקריאה):
- חצי ניווט, כפתורי קדימה ואחורה, שברונים בפירורי לחם
- חצי "שליחה" והגשה, חצי קרוסלה ועימוד
- חצי הזחה, קינון רשימות ותגובה
- מחווני התקדמות שמרמזים על תנועה קדימה
אל תשקפו את אלה (שיקוף הופך אותם לשגויים או לא מזוהים):
- לוגואים וסמלי מותג
- סימני וי וסימני X או סגירה
- כפתורי הפעלה של מדיה (כפתור הפעלה תמיד מצביע ימינה, הוא מתייחס לציר הזמן ולא לכיוון הקריאה)
- שעונים ואייקוני שעון אנלוגי (כיוון השעון אוניברסלי)
- אייקונים שמתארים עצמים מהעולם האמיתי עם כיוון קבוע (שפופרת טלפון, זכוכית מגדלת עם ידית, רוב אייקוני המוצר)
טכניקה, שיקוף עם טרנספורם היפוך אופקי:
/* היפוך רק כשכיוון המסמך הוא RTL */
.icon-directional:dir(rtl) { transform: scaleX(-1); }<!-- Tailwind: variant של rtl: למקרים שתכונות לוגיות לא מכסות -->
<button class="rtl:-scale-x-100">
<ArrowLeftIcon />
</button>הרבה ערכות אייקונים (למשל Material Symbols) כבר מספקות וריאנטים מודעי-RTL, עדיף אותם על פני היפוך כשהם זמינים, כי אייקון הפוך עלול לעוות פרטים עדינים או טקסט מוטמע.
שלב 5: טיפוגרפיה עברית
מחסנית גופנים מומלצת:
font-family: 'Heebo', 'Assistant', 'Rubik', 'Noto Sans Hebrew', sans-serif;הגדרות טיפוגרפיה:
body[dir="rtl"] {
font-size: 16px; /* Hebrew needs slightly larger than Latin */
line-height: 1.7;
letter-spacing: normal; /* NEVER add letter-spacing for Hebrew */
word-spacing: 0.05em; /* Slight word spacing improves readability */
}שלב 6: הגדרה לפי פריימוורק
Tailwind CSS RTL (v4, עדכני; כלים לוגיים מאז v3.3):
עדיף להשתמש בכלי תכונות לוגיות במקום ב-variants של rtl:/ltr::
| קלאס פיזי | קלאס לוגי | תכונת CSS |
|---|---|---|
ml-4 | ms-4 | margin-inline-start |
mr-4 | me-4 | margin-inline-end |
pl-4 | ps-4 | padding-inline-start |
pr-4 | pe-4 | padding-inline-end |
left-4 | inset-s-4 (בעבר start-4) | inset-inline-start |
right-4 | inset-e-4 (בעבר end-4) | inset-inline-end |
rounded-l-lg | rounded-s-lg | border-start-start-radius + border-end-start-radius |
rounded-r-lg | rounded-e-lg | border-start-end-radius + border-end-end-radius |
<!-- רע: דורש שני קלאסים, נשבר בלי תכונת dir -->
<div class="ltr:ml-4 rtl:mr-4">...</div>
<!-- טוב: קלאס אחד, משתקף אוטומטית לפי dir -->
<div class="ms-4">...</div>תשאירו את ה-variants של rtl: / ltr: רק למקרים שתכונות לוגיות לא מכסות (אייקונים כיווניים, transforms וכדומה).
הערה ל-Tailwind v4: גרסה 4 (זמינה רשמית מתחילת 2025, כיום v4.3) משתמשת בקונפיגורציה מבוססת CSS (@import "tailwindcss" ב-CSS) במקום tailwind.config.js. התכונות הלוגיות עובדות זהה בגרסאות 3 ו-4. החל מ-v4.3 (מאי 2026) כלי ה-inset הלוגיים start-*/end-* הוצאו משימוש לטובת inset-s-*/inset-e-* (השמות הישנים עדיין עובדים); כלי ה-margin/padding ms-*/me-*/ps-*/pe-* לא הושפעו.
Next.js App Router:
// app/layout.tsx
import { Heebo } from 'next/font/google';
const heebo = Heebo({
subsets: ['hebrew', 'latin'],
weight: ['400', '500', '700'],
});
export default async function RootLayout({
children,
params,
}: {
children: React.ReactNode;
params: Promise<{ locale: string }>;
}) {
const { locale } = await params;
const isRTL = locale === 'he';
return (
<html lang={locale} dir={isRTL ? 'rtl' : 'ltr'}>
<body className={heebo.className}>{children}</body>
</html>
);
}החבילה next/font שומרת את הגופן מקומית (בלי בקשות חיצוניות ל-Google Fonts, בלי הזזת פריסה).
React עם MUI:
גרסת MUI עדכנית (v9 נכון ל-2026) משתמשת בפיצול הרשמי @mui/stylis-plugin-rtl, ולא בחבילת הקהילה הישנה stylis-plugin-rtl. הפיצול הרשמי מתקן בעיות עם CSS layers ותומך בגרסאות Stylis עדכניות; זו ההגדרה המומלצת מאז MUI v6.
import { createTheme, ThemeProvider } from '@mui/material/styles';
import { CacheProvider } from '@emotion/react';
import createCache from '@emotion/cache';
import { rtlPlugin } from '@mui/stylis-plugin-rtl';
import { prefixer } from 'stylis';
const cacheRtl = createCache({
key: 'muirtl',
stylisPlugins: [prefixer, rtlPlugin],
});
const theme = createTheme({ direction: 'rtl' });כדאי לאמת את שם הייבוא המדויק ואת ההגדרה מול מדריך ה-RTL העדכני של MUI (https://mui.com/material-ui/customization/right-to-left/) לגרסת ה-MUI שלכם.
ממשק ב-Portal (מודלים, תפריטים נפתחים, tooltips, הודעות toast): רכיבים שמרונדרים דרך portal (React createPortal, Radix, MUI Menu, Floating UI) נטענים תחת document.body ויורשים כיוון משם, אבל הרבה ספריות מניחות LTR. קבעו dir על <html> וגם העבירו את הגדרת הכיוון של הספרייה עצמה: ב-Radix צריך עטיפת <DirectionProvider dir="rtl">, ב-MUI צריך direction: 'rtl' ב-theme. אחרת חלוניות קופצות נפתחות בצד הלא נכון גם כשכל שאר העמוד תקין.
שלב 7: מלכודות נפוצות שכדאי לבדוק
1. אייקונים כיווניים - צריך לשקף (ראו שלב 4 לאילו אייקונים להפוך ואילו להשאיר) 2. פסי התקדמות - צריכים להתמלא מימין לשמאל 3. סליידרים וקרוסלות - כיוון ההחלקה צריך להתהפך 4. תוויות טפסים - צריכות להיות מיושרות לימין 5. פירורי לחם (breadcrumbs) - כיוון המפריד צריך להתהפך 6. טבלאות - העמודות מסתדרות מחדש אוטומטית, אבל הכריחו תאים של מספרים, קוד ותאריכים חזרה ל-LTR עם <td dir="ltr"> או text-align: end 7. גרפים - יכול להיות שציר ה-X צריך להתהפך לקוראים בעברית (ל-SVG אין תכונות לוגיות, אז השתמשו באפשרות reversed/rtl של ספריית הגרפים, לא ב-CSS) 8. צללים וגרדיאנטים - היסטים וזוויות פיזיים לא מתהפכים אוטומטית (ראו שלב 3) 9. אלמנטים קבועים (fixed) ודביקים (sticky) כמו כותרות, toasts, כפתורי FAB ומגירות - ערכי left: 0 / right: 0 קשיחים לא מתהפכים; השתמשו ב-inset-inline-start / inset-inline-end 10. פסי הגלילה יושבים משמאל ב-RTL - שמרו מקום עם scrollbar-gutter: stable כדי למנוע קפיצת תוכן; text-wrap: balance משפר כותרות בעברית
שלב 8: אימות פריסת ה-RTL
כללי כתיבה לא מספיקים, אמתו לפני שילוח:
- הפכו את כל האפליקציה ל-
dir="rtl"וסרקו אם משהו לא זז (סימן שהוא עדיין משתמש בתכונה פיזית). - בדקו מחרוזת מעורבת אחת בכל משטח טקסט:
שלום John 050-1234567 ₪1,234מפעילה עברית, לטינית, מספר טלפון וסכום מטבע בבת אחת. - פתחו כל מודל, תפריט נפתח, tooltip ו-toast (ממשק ב-portal הוא הפספוס הנפוץ ביותר ב-RTL).
- בדקו אלמנטים קבועים/דביקים, גרפים/SVG, ושדות טופס עם
dir="auto".
דוגמאות
דוגמה 1: המרת רכיב LTR ל-RTL
המשתמש אומר: "התאם את רכיב הכרטיס הזה לעבודה בעברית"
לפני (LTR בלבד):
.card {
margin-left: 16px;
padding-right: 12px;
text-align: left;
border-left: 3px solid blue;
}אחרי (תואם RTL):
.card {
margin-inline-start: 16px;
padding-inline-end: 12px;
text-align: start;
border-inline-start: 3px solid blue;
}ב-Tailwind, מחליפים ml-4 pr-3 text-left border-l-4 ב-ms-4 pe-3 text-start border-s-4.
דוגמה 2: בעיית טקסט דו-כיווני
המשתמש אומר: "מספרים מוצגים הפוך בטקסט העברי שלי"
<!-- שגוי: מספר הטלפון מוצג כ-0544-123-050 -->
<p>התקשרו אלינו: 050-321-4450</p>
<!-- נכון: מבודדים את תוכן ה-LTR -->
<p>התקשרו אלינו: <span dir="ltr">050-321-4450</span></p>אפשר להשתמש ב-unicode-bidi: isolate על ה-span המכיל לפתרון מבוסס CSS בלבד.
דוגמה 3: ניווט RTL ב-Tailwind
המשתמש אומר: "הסיידבר שלי בצד הלא נכון בעברית"
<!-- רע: סיידבר תקוע בשמאל -->
<aside class="fixed left-0 w-64">...</aside>
<!-- טוב: סיידבר משתקף אוטומטית (inset-s-0; start-0 הוא הכינוי המיושן) -->
<aside class="fixed inset-s-0 w-64">...</aside>
<!-- אייקון חץ חזרה עדיין דורש variant של rtl: (היפוך אופקי, לא rtl:rotate-180 שמהפך גם אנכית) -->
<button class="rtl:-scale-x-100">
<ArrowLeftIcon />
</button>משאבים מצורפים
קובצי עזר
references/css-logical-properties.md- טבלת מיפוי מלאה מתכונות CSS פיזיות ללוגיות (margin, padding, border, מיקום, יישור טקסט, גדלים) בתוספת המלצות למחסניות גופנים עבריים ל-sans-serif, serif ו-monospace. תסתכלו בו כשממירים גיליון סגנונות LTR לתכונות לוגיות תואמות RTL או בוחרים גופני ווב עבריים.
מלכודות נפוצות
- הכלל
text-align: leftשגוי לעברית. תשתמשו ב-text-align: startשמכבד את כיוון המסמך. סוכנים נוטים לקודד יישורleftב-CSS. - התכונות
margin-leftו-padding-rightלא מתהפכות במצב RTL. תשתמשו בתכונות CSS לוגיות:margin-inline-startו-padding-inline-endבמקום. סוכנים שאומנו על CSS של LTR ייצרו תכונות פיזיות. - כיוון
rowב-Flexbox מתהפך אוטומטית ב-RTL, אבלrow-reverseגם מתהפך, מה שגורם להיפוך כפול וחזרה לסדר LTR. סוכנים עלולים להוסיףrow-reverseכי הם חושבים שזה יוצר RTL, אבל בפועל זה יוצר LTR בתוך הקשר RTL. - מספרי טלפון, מספרי כרטיסי אשראי וקטעי קוד חייבים להישאר LTR גם בתוך מיכלים RTL. תעטפו אותם ב-
<bdo dir="ltr">או תשתמשו ב-direction: ltrעל האלמנט המכיל. סוכנים לפעמים נותנים להם לרשת RTL.
קישורי עזר
| מקור | כתובת | מה לבדוק |
|---|---|---|
| MDN תכונות CSS לוגיות | https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_logical_properties_and_values | רשימת תכונות מלאה, טבלאות תמיכת דפדפנים |
MDN פסבדו-קלאס :dir() | https://developer.mozilla.org/en-US/docs/Web/CSS/:dir | תחביר, התנהגות מול סלקטורים על תכונת [dir] |
Can I use: :dir() | https://caniuse.com/css-dir-pseudo | טבלת תמיכת דפדפנים עדכנית |
MDN אלמנט <bdi> | https://developer.mozilla.org/en-US/docs/Web/HTML/Reference/Elements/bdi | בידוד תוכן דו-כיווני שנוצר על ידי משתמשים |
| תמיכת RTL ב-Tailwind CSS | https://tailwindcss.com/docs/hover-focus-and-other-states#rtl-support | תחביר variants של rtl: / ltr: |
| תכונות לוגיות ב-Tailwind | https://tailwindcss.com/docs/margin | כלי ms-*, me-*, ps-*, pe-* |
| MUI ימין לשמאל | https://mui.com/material-ui/customization/right-to-left/ | הגדרת @mui/stylis-plugin-rtl ל-MUI עדכני |
| Google Fonts עברית | https://fonts.google.com/?subset=hebrew | משפחות גופנים עבריים זמינות |
| W3C בינלאומיות | https://www.w3.org/International/articles/inline-bidi-markup/ | אלגוריתם bidi של Unicode, שיטות עבודה מומלצות |
פתרון בעיות
שגיאה: "יישור הטקסט נראה שגוי"
סיבה: שימוש ב-text-align: left במקום ב-text-align: start פתרון: תחליפו כל left ו-right ב-text-align ל-start ו-end.
שגיאה: "הפריסה לא משתקפת"
סיבה: שימוש ב-margin ו-padding פיזיים במקום בתכונות לוגיות פתרון: תחליפו כל margin-left ו-margin-right ב-margin-inline-start ו-margin-inline-end.
Related skills
How it compares
Pick hebrew-rtl-best-practices over generic i18n skills when Hebrew-specific typography, bidi edge cases, and Tailwind/Next.js RTL setup are the blockers.
FAQ
What does hebrew-rtl-best-practices cover for Hebrew web apps?
hebrew-rtl-best-practices covers CSS logical properties, the :dir() pseudo-class, Tailwind RTL utilities, Next.js/React RTL setup, icon mirroring, Hebrew typography, and bidi handling for mixed Hebrew-Latin content on web interfaces.
Does hebrew-rtl-best-practices support mobile RTL apps?
hebrew-rtl-best-practices focuses on Hebrew web UIs. Native mobile RTL via React Native I18nManager, SwiftUI, or Android is out of scope unless the developer explicitly requests shared RTL patterns applicable to both.
When should developers use hebrew-rtl-best-practices?
hebrew-rtl-best-practices applies when building new Hebrew web apps, converting LTR sites to RTL, fixing bidirectional text bugs, or configuring Tailwind, Next.js, or MUI for Israeli Hebrew interfaces.
Is Hebrew Rtl Best Practices safe to install?
skills.sh reports 3 of 3 security scanners passed. Review the Security Audits panel on this page before installing in production.