Layout e CSS Più dettagli A2 · Specifica formale

CSS Custom Property

Proprietà personalizzata CSS

Una CSS custom property è un valore CSS riutilizzabile, spesso chiamato variabile CSS. Segue la cascata e può cambiare in base allo scope o al tema.

Vedi come funziona
Potresti chiamarlo CSS Custom Propertyvariabile CSSproprietà personalizzata

Vedi come funziona

Esempio originale svoltoProprietà personalizzata CSS

Un altro esempio

Una scheda prende i suoi valori --surface e --text dal tema chiaro o scuro attivo in quel momento.

Parti principali

  1. 01Foundation or token
  2. 02Applied component
  3. 03Visible state and rule

Usalo quando

Usa proprietà personalizzate per temi, token di design e valori condivisi nel CSS.

Non usarlo quando

Non memorizzare mai il contenuto della pagina o ogni numero usa e getta nelle proprietà personalizzate globali.

Nome usato nel codice

--token-name

Prima di spedire

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.

Puoi copiare la richiesta

Outcome: Complete the task with Proprietà personalizzata CSS (CSS Custom Property). User context: Una scheda prende i suoi valori --surface e --text dal tema chiaro o scuro attivo in quel momento. Design concept to apply: Proprietà personalizzata CSS (CSS Custom Property). Why it fits: Usa proprietà personalizzate per temi, token di design e valori condivisi nel CSS. Do not use it when: Non memorizzare mai il contenuto della pagina o ogni numero usa e getta nelle proprietà personalizzate globali. 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 formale può ancora essere una bozza, un release candidate o la versione finale. Controlla il suo stato e il supporto per browser o piattaforma. Unknowns to confirm: Brand limits, amount of content, supported themes and languages, target devices, and design-system rules.

Controlla questa richiesta

Review how Proprietà personalizzata CSS (CSS Custom Property) is used now. Definition: Una CSS custom property è un valore CSS riutilizzabile, spesso chiamato variabile CSS. Segue la cascata e può cambiare in base allo scope o al 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.

A2
Quanto è ufficiale questo termine?

Specifica formale

Una specifica formale pubblicata e con versione definisce questo termine per lo scope tecnico elencato.

Un documento formale può ancora essere una bozza, un release candidate o la versione finale. Controlla il suo stato e il supporto per browser o piattaforma.

Ambito
Solo ciò che la sorgente copre:nome canonico、definizione、Semantica、implementazione
stato del documento
bozza
Selezionato attivato
2026-07-30

Fonti e ambito delle prove

Fonte dell'autorità + Riferimento del termine · W3C CSS Working Group · bozza CSS Custom Properties for Cascading Variables Level 1 — Defining custom properties Defining custom properties Ambito: nome canonico、definizione、Semantica、implementazione Ruolo qui: Riferimento diretto al termine La fonte copre: nome canonico, definizione, Semantica, implementazione Fonte dell'autorità · W3C CSS Working Group · bozza CSS Custom Properties for Cascading Variables Level 1 Ambito: nome canonico、definizione、Semantica、implementazione Ruolo qui: Autorità entro i limiti dichiarati La fonte copre: nome canonico, definizione, Semantica, implementazione

Copia tu stesso

Il browser non è riuscito a copiare questo. Seleziona la richiesta qui sotto e copiala tu stesso.