Skip to content
Skillpedia
Interfaces (UI/UX)28k · #9875

rtl-aware-development

What it does

It gives rules for making apps and layouts work in both left-to-right and right-to-left directions, including logical CSS, text isolation and icon mirroring. It is for developers building interfaces that must support Arabic, Hebrew or other RTL scripts.

When to use it

  • ✓When you are building or reviewing a layout that must support right-to-left languages.
  • ✓When CSS uses left and right values that should flip for RTL text.
  • ✓When mixed English and RTL text or file paths look wrong in a menu or list.

Skill link

https://github.com/Kilo-Org/kilocode/blob/main/.opencode/skills/rtl-aware-development/SKILL.md

Copy it and paste it into your AI (Claude, ChatGPT or Cursor), asking it to follow the instructions.

How to use

The easiest way: copy the message and paste it into your AI. It reads the skill and follows the instructions.

Ready-to-paste message

Use this skill to help me: https://github.com/Kilo-Org/kilocode/blob/main/.opencode/skills/rtl-aware-development/SKILL.md Read the SKILL.md file at that link and follow its instructions for my task.
Want your AI to find skills like this on its own?Install the free Skillpedia MCP: one line, and it searches 15,000+ skills before each task.Install in 1 minute →

Example of what to ask your AI

“My interface breaks when I switch to Arabic. Review the CSS and tell me what to change so the layout flips correctly.”

5 new skills a week. 1 minute to read.

How it works

The agent checks document direction, swaps physical left and right CSS for logical properties, and isolates mixed-direction text. It mirrors only icons with directional meaning and leaves brands, charts and media controls alone.

Technical content (original SKILL.md)

Original text by the author, straight from GitHub.

RTL-Aware Development

Treat direction as independent from language. Test English in both directions as well as real RTL and mixed-script content.

Guidelines

  • Set lang and dir on the document, and propagate direction through component providers used by portaled menus and popovers. Do not change the selected locale merely to force RTL.
  • Keep DOM and focus order semantic. Flexbox and Grid already follow dir; do not add row-reverse, CSS order, or reversed markup just to mirror a layout.
  • Prefer logical CSS for semantic layout. Reserve physical coordinates for pointer positions, canvas geometry, native window controls, and other genuinely physical placement.
/* Avoid */
padding-left: 12px;
right: 0;
border-right: 1px solid;
text-align: left;

/* Prefer */
padding-inline-start: 12px;
inset-inline-end: 0;
border-inline-end: 1px solid;
text-align: start;
  • Isolate mixed-direction text. Use dir="auto" or <bdi> for unknown text; keep code, URLs, IDs, and filesystem paths LTR without forcing the surrounding component LTR.
<span class="file-row"><bdi dir="auto">README.md</bdi></span> <bdi dir="ltr"><code>C:\src\app.ts</code></bdi>
  • Mirror directional meaning, not every image. Back/forward, previous/next, disclosure, indentation, and directional progress may need mirroring. Do not mirror brands, clocks, media controls, charts, or text. Reverse physical gradients, translateX, SVG transforms, and animation deltas explicitly.
  • Map interactions through direction. clientX remains physical; resizing a logical edge needs an RTL-aware delta. Logical previous/next keyboard controls may swap ArrowLeft/ArrowRight. Follow the relevant WAI-ARIA widget pattern.
  • Do not assume LTR scrolling. RTL scrollLeft can start at 0 and become negative. Prefer scrollIntoView({ inline: "nearest" }) or a tested direction-normalizing helper.
  • For Electron title bars, prefer native caption controls and use titleBarOverlay plus env(titlebar-area-*) for the safe content rectangle. Keep Windows/macOS native-control avoidance and trafficLightPosition physical; keep app navigation inside that rectangle logical. Mark interactive titlebar children app-region: no-drag.
  • Verify behavior, not screenshots alone. Check computed styles, pseudo-element geometry, hit zones, focus order, keyboard behavior, submenu direction, zoom/scaling, and both LTR and RTL scroll endpoints.

Test Matrix

  • English + LTR
  • English + forced RTL
  • A real RTL locale + RTL
  • Mixed RTL/LTR content, long labels, numbers, code, and paths
  • Keyboard, pointer resize, scrolling, menus/submenus, and Electron titlebar controls in both directions

References

FAQ

What is logical CSS?

It uses start and end instead of left and right, so layouts flip automatically for right-to-left text.

Should every icon be mirrored?

No. Only icons with directional meaning, such as back or next, are mirrored.

How is mixed text handled?

Unknown text gets a direction attribute or bdi tag, and code, URLs and paths stay left-to-right.

Details

Original description by the author

OpenCode Desktop should be RTL-aware. Use when implementing or reviewing RTL/LTR behavior in the web app, desktop app, CSS, menus, scrolling, resizing, icons, mixed-direction text, or Electron title bars.

repo: Kilo-Org/kilocode

Popularity

GitHub stars
28k
Ranking position
#9875
License
MIT
Updated
11/2/2026

Is this skill useful?

0

Sign in to vote.

Comments

  • …

More skills from this repository

Similar skills