Skip to content
SiteMonk Learn
Esc
↑ ↓ navigate ↵ open ⌘J preview
On this page
  1. How one setting affects several places
  2. A theme changes related rules together
  3. How a small business can decide

From design rules to web pages: CSS variables and themes

See how design tokens reach the browser and what light, dark, and brand themes require beyond changing a background.

Shared design rules must reach the website code to affect what customers see. CSS controls presentation. CSS custom properties , also called CSS variables, store named settings that different parts of a page can reference.

They are one way to implement design tokens. You do not need to write the code, but updating a design file and updating a live website are separate actions. Someone must implement and check the rules.

How one setting affects several places

Suppose the homepage and service-page inquiry buttons reference the same primary action color. Updating that setting changes the buttons using it. Older buttons that do not reference it still need attention.

This optional code example is illustrative, not the site’s actual palette. It defines a setting, then references it in a button.

:root {
  --action-primary: #1457a6;
}

.primary-button {
  background-color: var(--action-primary);
  color: #fff;
}

Variables can take different values in particular areas or themes. Developers manage their scope, code structure, and fallback values. One successful color change does not establish that the whole site has been checked.

A theme applies a different set of visual settings to the same purposes, as in light and dark modes. Body text and backgrounds retain their jobs, but their values need coordinated changes.

Theme change What also needs checking
Light to dark Text, links, boundaries, fields, and messages remain clear
Brand or campaign theme Main actions and statuses remain identifiable
User-selected theme Initial display, saved choices, and behavior without an explicit choice

Dark mode requires more than a black background and does not automatically make a website more professional. Images, logos, charts, and external tools may need separate attention. Another theme also adds design, testing, and maintenance work.

How a small business can decide

Start with customer circumstances and actual demand. A service-and-contact website can first make one theme work well. Longer reading sessions or clear user needs may justify evaluating another.

You explain brand constraints and customer needs; the team implements and tests. Before approval, review real pages and important states rather than only palette boards. See color roles and the acceptance guide .

Our website design and development work connects shared design rules to the browser implementation. Additional themes are assessed in the project scope, including the pages and states that need checking.