本文へスキップ
Skillpedia
インターフェース(UI/UX)28k · #9875

rtl-aware-development

できること

左から右と右から左の両方の方向で、アプリやレイアウトが動くためのルールを示します。論理的なCSS、テキストの分離、アイコンの反転を含みます。アラビア語やヘブライ語などRTLの言語に対応するインターフェースを作る開発者向けです。

使う場面

  • ✓右から左の言語に対応しなければならないレイアウトを作成、またはレビューしているとき。
  • ✓RTLのテキストで左右の値を反転させるべきCSSがあるとき。
  • ✓英語とRTLのテキストやファイルパスが、メニューやリストでおかしく見えるとき。

スキルのリンク

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

コピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。

使い方

いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。

貼り付け用メッセージ

このスキルを使って手伝ってください:https://github.com/Kilo-Org/kilocode/blob/main/.opencode/skills/rtl-aware-development/SKILL.md このリンクのSKILL.mdファイルを読んで、私の作業でその指示に従ってください。
こういうスキルを、AIが自分で見つけてくれたら?無料のSkillpedia MCPをインストール。1行で、作業の前に15,000+のスキルから探してくれます。1分でインストール →

AIへの頼み方の例

“アラビア語に切り替えるとインターフェースが崩れます。CSSを確認して、レイアウトが正しく反転するように変更すべき点を教えてください。”

毎週5つの新しいスキル。1分で読めます。

仕組み

エージェントは文書の方向を確認し、物理的な左右のCSSを論理的なプロパティに置き換え、方向の混在するテキストを分離します。方向に意味のあるアイコンだけを反転させ、ブランドのロゴ、グラフ、メディアの操作は変えません。

技術的な内容(元のSKILL.md)

作者による元のテキスト(英語)を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

よくある質問

論理的なCSSとは何ですか?

leftやrightの代わりにstartとendを使うCSSで、右から左のテキストでもレイアウトが自動的に反転します。

すべてのアイコンを反転させますか?

いいえ。戻る、次へのような方向の意味を持つアイコンだけを反転させます。

混在するテキストはどう扱いますか?

方向がわからないテキストには方向の属性かbdiタグを付け、コード、URL、パスは左から右のまま扱います。

詳細

作者による元の説明

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

人気

GitHubのスター
28k
ランキング
#9875
ライセンス
MIT
更新日
2026/11/2

このスキルは役に立ちますか?

0

ログイン して投票しましょう。

コメント

  • …

このリポジトリの他のスキル

似ているスキル