Pular para o conteúdo
Skillpedia
Interfaces (UI/UX)28 mil · #9875

rtl-aware-development

O que ela faz

Ela traz regras para fazer apps e layouts funcionarem tanto da esquerda para a direita quanto da direita para a esquerda, incluindo CSS lógico, isolamento de texto e espelhamento de ícones. É para desenvolvedores que criam interfaces que precisam suportar árabe, hebraico ou outros idiomas RTL.

Quando usar

  • ✓Quando você está criando ou revisando um layout que precisa suportar idiomas da direita para a esquerda.
  • ✓Quando o CSS usa valores de esquerda e direita que deveriam se inverter para texto RTL.
  • ✓Quando textos misturados em inglês e RTL, ou caminhos de arquivo, parecem errados em um menu ou lista.

Link da skill

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

Copie e cole na sua IA (Claude, ChatGPT ou Cursor) pedindo para seguir as instruções.

Como usar

O jeito mais fácil: copie a mensagem e cole na sua IA. Ela lê a skill e segue as instruções.

Mensagem pronta para colar

Use esta skill para me ajudar: https://github.com/Kilo-Org/kilocode/blob/main/.opencode/skills/rtl-aware-development/SKILL.md Leia o arquivo SKILL.md desse link e siga as instruções dele na minha tarefa.
Quer que a sua IA encontre skills como esta sozinha?Instale o MCP grátis do Skillpedia: uma linha, e ela pesquisa entre 15.000+ skills antes de cada tarefa.Instalar em 1 minuto →

Exemplo do que pedir para a IA

“Minha interface quebra quando mudo para o árabe. Revise o CSS e me diga o que mudar para que o layout inverta corretamente.”

5 skills novas por semana. 1 minuto de leitura.

Como funciona

O agente verifica a direção do documento, troca os valores físicos de esquerda e direita do CSS por propriedades lógicas e isola o texto de direção mista. Ele espelha apenas ícones com significado direcional e deixa marcas, gráficos e controles de mídia de fora.

Conteúdo técnico (SKILL.md original)

Texto original do autor, em inglês, direto do 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

Perguntas frequentes

O que é CSS lógico?

Ele usa start e end em vez de left e right, então os layouts se invertem automaticamente para texto da direita para a esquerda.

Todo ícone deve ser espelhado?

Não. Apenas ícones com significado direcional, como voltar ou avançar, são espelhados.

Como o texto misto é tratado?

Texto desconhecido recebe um atributo de direção ou a tag bdi, e código, URLs e caminhos continuam da esquerda para a direita.

Detalhes

Descrição original do autor

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

Popularidade

Estrelas no GitHub
28 mil
Posição no ranking
#9875
Licença
MIT
Atualizada em
02/11/2026

Essa skill é útil?

0

Entre para votar.

Comentários

  • …

Mais skills deste repositório

Skills parecidas