CSS Custom Property
CSS Custom Property
Una CSS custom property es un valor CSS reutilizable, a menudo llamado CSS variable. Sigue la cascada y puede cambiar según el ámbito o el tema.
Otro ejemplo
Una tarjeta obtiene sus valores --surface y --text del tema claro u oscuro que esté activo.
Partes principales
- 01Foundation or token
- 02Applied component
- 03Visible state and rule
Úsalo cuando
Use propiedades personalizadas para temas, tokens de diseño y valores compartidos en CSS.
No lo uses cuando
Nunca almacenes contenido de página o cada número único en propiedades personalizadas globales.
Nombre usado en código
--token-name Antes de lanzarlo
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 Custom Property (CSS Custom Property). User context: Una tarjeta obtiene sus valores --surface y --text del tema claro u oscuro que esté activo. Design concept to apply: CSS Custom Property (CSS Custom Property). Why it fits: Use propiedades personalizadas para temas, tokens de diseño y valores compartidos en CSS. Do not use it when: Nunca almacenes contenido de página o cada número único en propiedades personalizadas globales. 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): Un documento formal aún puede ser un borrador, un release candidate o una versión final. Revisa su estado y la compatibilidad con tu navegador o plataforma. Unknowns to confirm: Brand limits, amount of content, supported themes and languages, target devices, and design-system rules.
Revisa esta petición
Review how CSS Custom Property (CSS Custom Property) is used now. Definition: Una CSS custom property es un valor CSS reutilizable, a menudo llamado CSS variable. Sigue la cascada y puede cambiar según el ámbito o el tema. 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.