Skip to main content

Rendering Verification

When to use: After deploying. After changing CSS tokens, themes, or framework versions. When something "looks wrong" but you can't pinpoint why.

The test: Every element you intended to be visible is visible. Every color you intended to render actually renders.


Token Resolution

Every CSS custom property and design token must resolve to a concrete value.

CheckThresholdHow to Measure
Custom properties resolveZero unset/initial/empty valuesDevTools: Computed tab, filter for custom properties
Background colors produce visible valuesComputed background-color is not transparent or rgba(0,0,0,0)DevTools: select element, check Computed styles
Text colors differ from backgroundsDelta E (CIEDE2000) between text and background greater than 20Browser contrast checker or getComputedStyle() comparison
Border colors renderComputed border-color is not same as background-colorDevTools: compare computed values

Token Audit Checklist

  • Every var(--token) in use has a defined value in the active theme
  • No fallback values masking missing definitions (e.g., var(--missing, transparent))
  • Tokens defined in the correct layer for your framework version
  • Dark mode tokens tested separately from light mode

CSS Cascade

Framework defaults, resets, and utility classes can silently override each other.

CheckThresholdHow to Measure
Utility classes winYour utility has higher specificity than framework defaultsDevTools: Styles panel shows utility not struck through
No !important warsZero instances of !important overriding !importantSearch codebase: count !important occurrences
Reset doesn't zero your valuesElements retain intended padding, margin, font-sizeCompare computed values against your design tokens

Cascade Checklist

  • Framework CSS loads before custom CSS
  • Utility layer has correct specificity for your framework version
  • No global selectors (*, body, html) overriding component styles
  • Scoped styles don't leak into or out of components

Visual Rendering

Elements exist in the DOM but produce no visual output more often than you think.

CheckThresholdHow to Measure
Images render with visible dimensionsWidth and height both greater than 0pxDevTools: element inspector, check computed dimensions
SVGs render with fill or strokefill is not none/transparent when content expectedDevTools: check computed fill and stroke
Icons have visible sizeMinimum 16x16px rendered dimensionsDevTools: computed width/height
Fonts loadedRendered font-family matches intended fontDevTools: Computed tab, check font-family

Rendering Checklist

  • No zero-height containers hiding content
  • overflow: hidden not clipping intended content
  • opacity greater than 0.1 on all informational elements
  • visibility is visible (not hidden or collapse)
  • display is not none on intended elements
  • z-index stacking shows elements in correct order

Overflow and Layout

CheckThresholdHow to Measure
No horizontal overflowPage width equals viewport width at every breakpointScroll horizontally - if you can, it fails
No text overflowAll text visible, no unintended ... truncationVisual scan at each breakpoint
Containers contain their childrenNo child elements visually outside parent boundsDevTools: hover parent, check child positions
Flex/grid items wrap correctlyNo items hidden off-screenResize browser, watch for disappearing elements

Automated Audit

Run this in the browser console to catch common rendering failures:

// Check for invisible text (same color as background)
document.querySelectorAll("p, h1, h2, h3, h4, span, a, li, td, th, label, button").forEach((el) => {
const styles = getComputedStyle(el);
const color = styles.color;
const bg = styles.backgroundColor;
if (color === bg && el.textContent.trim()) {
console.warn("Invisible text:", el.textContent.substring(0, 50), el);
}
});

// Check for zero-dimension elements that have content
document.querySelectorAll("div, section, article, main, aside, nav").forEach((el) => {
const rect = el.getBoundingClientRect();
if ((rect.width === 0 || rect.height === 0) && el.children.length > 0) {
console.warn("Zero-dimension container with children:", el);
}
});

// Check for unresolved CSS variables
document.querySelectorAll("*").forEach((el) => {
const styles = getComputedStyle(el);
for (const prop of styles) {
const value = styles.getPropertyValue(prop);
if (value.includes("var(") && value.includes(")")) {
console.warn("Unresolved CSS variable on", el, prop, value);
}
}
});

Quick Diagnosis

SymptomLikely CauseFix
White-on-white textToken defined in wrong layer/formatCheck framework version, register token correctly
Elements missingdisplay: none or zero dimensionsCheck computed display, width, height
Colors all the sameTokens resolve to same valueAudit computed values, check theme definition
Borders invisibleBorder color matches backgroundSet explicit border color different from background
Icons missingSVG fill is none or font not loadedCheck computed fill, verify font loading
Layout broken after deployCSS load order changedVerify stylesheet order in build output

Context