CSS Inheritance
CSS 상속
CSS 상속은 일부 속성이 부모 요소로부터 값을 복사할 수 있게 합니다. 이는 자식 요소가 자체 값을 가지지 않을 때 발생합니다.
다른 예시
article은 루트에서 `color`와 `font-family`를 한 번 설정합니다. 내부의 인용문과 단어들은 그 스타일을 상속받습니다. 구매 위젯은 범위가 지정된 토큰으로 상속된 텍스트 스타일을 재설정할 수 있습니다. `border`와 `padding`은 상속되지 않으므로 위젯이 직접 설정합니다.
주요 부분
- 01상위 계산 값
- 02상속된 속성
- 03자식이 사용한 값
사용할 때
섹션 전체에서 일관성을 유지해야 하는 텍스트 스타일, 색상 및 사용자 지정 속성에는 상속을 사용하십시오.
다음 경우에는 사용하지 마세요
모든 속성이 상속되는 것은 아닙니다. 원하는 결과와 일치할 때만 `inherit`, `initial`, `unset`, `revert`, 또는 `revert-layer`를 사용하세요.
코드에서 사용된 이름
inherit, initial, unset, revert, revert-layer, and inherited custom properties 출시하기 전에
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 Inheritance)。 User context:article은 루트에서 `color`와 `font-family`를 한 번 설정합니다. 내부의 인용문과 단어들은 그 스타일을 상속받습니다. 구매 위젯은 범위가 지정된 토큰으로 상속된 텍스트 스타일을 재설정할 수 있습니다. `border`와 `padding`은 상속되지 않으므로 위젯이 직접 설정합니다. Design concept to apply:CSS 상속 (CSS Inheritance)。 Why it fits:섹션 전체에서 일관성을 유지해야 하는 텍스트 스타일, 색상 및 사용자 지정 속성에는 상속을 사용하십시오. Do not use it when:모든 속성이 상속되는 것은 아닙니다. 원하는 결과와 일치할 때만 `inherit`, `initial`, `unset`, `revert`, 또는 `revert-layer`를 사용하세요. 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 Inheritance) 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.