CSS Selector
CSSセレクター
CSSセレクターは、ページ上の要素を見つけてスタイルを適用できるようにするパターンです。
もう一つの例
デザインシステムは、`.blue-chevron`ではなく、ディスクロージャの`[data-state='open']`を選択します。ビジュアルの再設計はこれを壊しません。サポートされている場合、`:has(> input:invalid)`は無効な入力があるフィールドグループをスタイルします。サーバーからのエラーテキストは、引き続き動作するフォールバックとして残ります。
主な部分
- 01複合セレクタ
- 02結合子
- 03一致する対象
以下の場合に使用します
意味を記述する安定したフックを選択します。具体性は有用な範囲で低く保ち、正確な DOM 深さに依存しないようにしてください。
以下の場合は使用しないでください
外観、生成されたマークアップ、または長い子チェーンに基づくセレクタを避ける。これにより、後の変更がリスクを伴う。
コードで使用する名前
type, class, ID, attribute, combinator, pseudo-class, and pseudo-element selectors 出荷前に
Check content order, shared design values, component consistency, contrast, zoom, and layout changes by screen size. Verify every theme, language, and state. If there is motion, offer an equal reduced-motion experience.
Outcome:Complete the task with CSSセレクター (CSS Selector)。 User context:デザインシステムは、`.blue-chevron`ではなく、ディスクロージャの`[data-state='open']`を選択します。ビジュアルの再設計はこれを壊しません。サポートされている場合、`:has(> input:invalid)`は無効な入力があるフィールドグループをスタイルします。サーバーからのエラーテキストは、引き続き動作するフォールバックとして残ります。 Design concept to apply:CSSセレクター (CSS Selector)。 Why it fits:意味を記述する安定したフックを選択します。具体性は有用な範囲で低く保ち、正確な DOM 深さに依存しないようにしてください。 Do not use it when:外観、生成されたマークアップ、または長い子チェーンに基づくセレクタを避ける。これにより、後の変更がリスクを伴う。 Design requirements: Set the content order, shared design values, and reusable components. Define how the layout changes by screen size and state. Keep useful design choices separate from decoration. Inclusion and resilience: Check contrast, zoom, languages, themes, and reduced motion when needed. Do not use color or effects as the only way to show meaning. Acceptance criteria: The design stays clear on phones and desktops, at zoom, in every theme, and in all supported languages. Interactive states stay clear and consistent. Evidence and limits (evidence boundary):きちんとした書類でも、まだドラフトやリリース候補、あるいは最終版かもしれません。ステータスや、ブラウザやプラットフォームの対応状況を確認しましょう。 Unknowns to confirm: Brand limits, amount of content, supported themes and languages, target devices, and design-system rules.
このリクエストを確認する
Review how CSSセレクター (CSS Selector) is used now. Definition: CSSセレクターは、ページ上の要素を見つけてスタイルを適用できるようにするパターンです。 Release checks: Check content order, shared design values, component consistency, contrast, zoom, and layout changes by screen size. Verify every theme, language, and state. If there is motion, offer an equal reduced-motion experience. Before changing code, list the evidence, gaps, severity, and the smallest safe fix.