CSS Selector
CSS 선택자
CSS 선택자는 페이지에서 요소를 찾아 스타일을 적용할 수 있도록 하는 패턴입니다.
다른 예시
디자인 시스템은 `.blue-chevron` 대신 공개(disclosure)에서 `[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` 대신 공개(disclosure)에서 `[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.