CSS Custom Property
CSS 사용자 정의 속성
CSS 사용자 지정 속성은 다시 쓸 수 있는 CSS 값이에요. 보통 CSS 변수라고 불리죠. 캐스케이드를 따르고, 범위나 테마에 따라 변할 수 있어요.
다른 예시
카드는 켜져 있는 밝은 테마나 어두운 테마에서 --surface와 --text 값을 가져와요.
주요 부분
- 01Foundation or token
- 02Applied component
- 03Visible state and rule
사용할 때
테마, 디자인 토큰 및 CSS 전반에서 공유되는 값에 대해 사용자 정의 속성을 사용하십시오.
다음 경우에는 사용하지 마세요
페이지 콘텐츠나 모든 일회성 번호를 전역 사용자 정의 속성에 저장하지 마십시오.
코드에서 사용된 이름
--token-name 출시하기 전에
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 Custom Property)。 User context:카드는 켜져 있는 밝은 테마나 어두운 테마에서 --surface와 --text 값을 가져와요. Design concept to apply:CSS 사용자 정의 속성 (CSS Custom Property)。 Why it fits:테마, 디자인 토큰 및 CSS 전반에서 공유되는 값에 대해 사용자 정의 속성을 사용하십시오. 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 Custom Property) is used now. Definition: CSS 사용자 지정 속성은 다시 쓸 수 있는 CSS 값이에요. 보통 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.