logical-properties
できること
このスキルは、left や right などの固定された方向を使うCSSを、読む方向に従う論理プロパティに変換します。複数の言語に対応したいサイトの開発者向けです。
使う場面
- ✓右から左に読む言語のためにスタイルシートを準備してほしいとき。
- ✓アラビア語、ヘブライ語、ペルシア語のサポートを追加し、レイアウトが崩れているとき。
- ✓CSSを確認し、margin-left などを自動的に調整される形に置き換えたいとき。
スキルのリンク
https://github.com/thedaviddias/Front-End-Checklist/blob/main/skills/logical-properties/SKILL.mdコピーしてAI(Claude、ChatGPT、Cursor)に貼り付け、指示に従うよう頼んでください。
使い方
いちばん簡単な方法:メッセージをコピーしてAIに貼り付けるだけ。AIがスキルを読んで指示に従います。
貼り付け用メッセージ
Claude Code、Codex、Cursorの場合:プロジェクトのフォルダで実行するとスキルがインストールされます。
SKILL.mdをダウンロードして、エージェントのスキル用フォルダに入れてください。
AIへの頼み方の例
“アラビア語とヘブライ語の利用者にレイアウトが正しく表示されるよう、私のCSSを更新してもらえますか。”
毎週5つの新しいスキル。1分で読めます。
仕組み
エージェントは、固定方向を使う余白や配置のルールを見つけ、インラインとブロックの論理的な同等のプロパティに置き換えます。その結果、テキストの方向が変わるとレイアウトも自動的に反転します。
技術的な内容(元のSKILL.md)
作者による元のテキスト(英語)をGitHubからそのまま表示しています。
Use CSS logical properties for i18n and RTL support
Physical CSS properties (margin-left, padding-right) are hardcoded to screen directions. In right-to-left languages (Arabic, Hebrew, Persian), what should be margin-left becomes margin-right. Without logical properties, supporting RTL requires maintaining duplicate stylesheets or complex overrides with [dir=rtl] selectors. Logical properties handle this automatically.
Quick Reference
- Logical properties adapt to writing direction — margin-inline-start is left in LTR, right in RTL
- Replace left/right margin and padding with inline-start/inline-end equivalents
- Replace top/bottom with block-start/block-end equivalents
- Logical properties also work correctly for vertical writing modes
Check
Find all uses of margin-left, margin-right, padding-left, padding-right, border-left, border-right, left, right (as positioning) that should be converted to logical equivalents.
Fix
Convert physical direction properties to their CSS logical property equivalents for RTL and internationalization support.
Explain
Explain CSS logical properties, the difference between physical and logical directions, and how they enable RTL language support.
Code Review
Review stylesheets, component styles, and responsive states related to Use CSS logical properties for i18n and RTL support. Flag exact selectors, declarations, or breakpoints that violate the rule in the rendered UI.
For full implementation details, code examples, and framework-specific guidance,
see references/rule.md.
Rule page: https://frontendchecklist.io/rules/css/logical-properties
よくある質問
右から左の表示には、まだ別のスタイルが必要ですか?
通常は必要ありません。論理プロパティが方向を自動的に扱うため、重複したスタイルシートや追加の上書きは不要になることが多いです。
縦書きにも役立ちますか?
はい。このスキルは、論理プロパティが縦書きモードでも正しく動作すると説明しています。
変更後にレイアウトを確認すべきですか?
はい。このスキルは、さまざまな画面サイズと操作状態で、描画後のレイアウトを確認することを勧めています。
詳細
作者による元の説明
Use when reviewing stylesheets, component styles, and responsive behavior related to Use CSS logical properties for i18n and RTL support. Check the rendered layout across breakpoints and interaction states before proposing a fix.
人気
- GitHubのスター
- 75k
- ランキング
- #2931
- ライセンス
- MIT
- 更新日
- 2026/10/31
コメント
- …
このリポジトリの他のスキル
frontendchecklist
75kコマンドラインツールを使って、フロントエンドのコードとライブページを、アクセシビリティ、速度、SEO、セキュリティに関する380以上のルールと照らし合わせて確認します。
frontend-checklist-global
75kフロントエンドのプロジェクトを、386のFront-End Checklistのルールすべてと照らし合わせて監査し、見つかった問題ごとに具体的な修正方法を示します。
404-page
75k見つからないページの画面に役立つリンクがあり、本物の404ステータスを返すかを確認し、迷った訪問者が目的のページを見つけられるようにします。
about-page
75kサイトの運営者が誰かを説明する、分かりやすいAboutページがあるかを確認し、訪問者と検索エンジンからの信頼を高めます。
似ているスキル
angular-developer
280kエージェントがAngularのコードを作成し、プロジェクト構成についてアドバイスできるようにします。新しいプロジェクトの開始、コード部品の作成、パフォーマンスやアクセシビリティの改善に役立ちます。
frontend-a11y
280kエージェントが Web インターフェースを誰にとっても使いやすくするよう支援します。スクリーンリーダーやキーボード操作に対応し、サイトやアプリが適切に動作するようにします。
frontend-patterns
280kエージェントがフロントエンド開発の最新パターンを適用できるようにします。React と Next.js において、パフォーマンスの最適化、状態管理、ベストプラクティスの遵守を行います。