A custom property can be declared in a stylesheet and still be unavailable where a declaration needs it. Another property can be present yet contain tokens that are invalid for the receiving CSS property. Those failures look similar on screen, but their repairs differ. This guide uses the CSS variable inspector to map references, then verifies the result in the element-level context that a static stylesheet summary cannot reconstruct.

Begin with a missing design token

Consider a card that declares padding using var(--space-card, 12px). If --space-card is missing on that element and through its applicable inheritance, the fallback can supply 12px. That is a useful local default. Now imagine that the card inherits a token whose value is the word tomato. The token exists, but tomato is not a valid padding length.

.card {
  --space-card: tomato;
  padding: var(--space-card, 12px);
}

The fallback is not a type-validation branch for the final padding value. With an ordinary unregistered custom property in this example, substitution produces an invalid padding declaration at computed-value time. The browser does not substitute 12px merely because the resulting value is unsuitable for padding. Inspect the computed padding rather than assuming that a fallback guarantees a usable length.

Separate tokens from their consumers

List the custom properties your component defines, the properties it inherits and the declarations that consume them. A token such as --brand can legitimately contain a color while --space-card should contain a spacing value. Their names suggest intent, but names do not enforce types for ordinary unregistered custom properties. Follow the actual value into the consuming declaration.

Paste the relevant stylesheet into the local inspector. It lists declared names, undeclared references and dependencies between custom properties. It includes references inside fallback arguments. This gives you an inventory to investigate, not a computed-style result. The tool supports ASCII custom-property names and does not evaluate your DOM, media conditions, cascade or registered-property syntax.

Read an undeclared reference as a question

Use this small dependency example:

:root { --surface: var(--brand, #eeeeee); }
.card { background: var(--surface); }

The inspector should report --surface as declared and --brand as undeclared. That report does not prove the background is broken: the fallback may be intentional. Decide whether --brand should be supplied by a theme or whether the neutral default is the desired behavior. The useful follow-up is checking the computed value on the card under the active theme.

Also check spelling and case. Custom-property names are case-sensitive, so --Brand and --brand are different names. A similarly named declaration in another component is not necessarily available to this one. Keep the producer and consumer near each other in a reduced reproduction until you can explain which value reaches the selected element.

Investigate cycles on the actual element

For an obvious cycle, declare --a: var(--b) and --b: var(--a) on the same element. The references form a loop. Ordinary unregistered properties participating in that cycle become invalid; a consuming declaration may then use its applicable fallback. The inspector reports a possible cycle because it sees both dependency edges.

Its graph is a union across stylesheet rules. If declarations live on different elements, mutually exclusive conditions or different cascade paths, a union can suggest a cycle that does not exist in the computed dependency graph of one element. Conversely, runtime styles that were not pasted cannot appear in its report. Reproduce the suspected loop with the selected element's applicable declarations before treating a warning as a diagnosis.

Fallback references also matter to dependency analysis. A fallback is not invisible simply because you expect the preferred variable to be available. When a report identifies a loop involving a fallback reference, read the corresponding declarations carefully and check the specification's dependency rules. Avoid removing the fallback without considering what should happen when the primary value is unavailable.

Test the invalid-value case separately

Create an empty card with no other padding rule and run the tomato example in the browser. Its computed padding should be zero, the initial padding value, rather than 12px. Then remove the --space-card declaration: the fallback should supply 12px. These two observations isolate presence from suitability without involving the rest of the design system.

Adding a preceding padding: 12px declaration does not generally rescue an invalid substituted declaration by restarting the cascade. Fix the token, use an appropriate registration where supported and suitable, or restructure the declarations deliberately. Test registered properties separately because their syntax, initial value and inheritance settings change the situation; this example intentionally uses an unregistered property.

Leave a usable token contract

When repairing the component, document the expected token kind, its inheritance boundary and its default. Include a missing-token test and an invalid-token test if consumers can supply arbitrary styles. Check light and dark themes on the actual element, especially when their token definitions live in separate scopes.

The inspector is most useful as a map of places to look. Browser computed styles decide what the element receives. Combining a reference map with a small reproduction helps distinguish a misspelled token, an intentional fallback, an actual cycle and a value that survives substitution but fails the receiving property's grammar.