Tutorials
Elementor
Build your website with Elementor — no code needed
16 tutorials
WordPress
Learn how to build a professional website on WordPress
14 tutorials
AWS Lightsail
Beginner-friendly AWS Lightsail guides
12 tutorials
View all tutorials →
Tools
Website Platforms & Tools
Tools to build, host, and optimize fast, reliable, and professional websites.
8 tools
Web Hosting Providers
Fast, secure web hosting with reliable uptime to power and scale your website.
7 tools
VoIP / Communications
Business phone tools with virtual numbers, call routing, and auto-attendants for a professional pres
4 tools
Website Security
Security tools to protect your site from threats, malware, and unauthorized access.
2 tools
Branding & Logo Design
Create a strong brand identity with custom logo and professional design services.
1 tool
View all tools →

How to Build a Clean Dark & Light Theme System in Elementor (Without Per-Widget Styling)

Gerry Manzari Written by Gerry Manzari · December 28, 2025 · 2 min read

One of the biggest mistakes Elementor users make is manually setting colors on every widget. It works at first — but it becomes unmaintainable fast.

In this tutorial, I’ll show you how to build a surface-based theme system using just two CSS classes:

  • surface-dark
  • surface-light

Using my approach, you can:

  • You change colors once in CSS
  • Containers decide the theme
  • Text widgets simply inherit
  • No more widget-by-widget color changes
  • Works perfectly with Elementor Global Colors

The Core Idea (This Is the Key)

Containers choose the theme.
Text widgets just inherit.

You should never be picking text colors on individual widgets for normal content.

When to Apply surface-dark (and When Not To)

If your Elementor Global Colors are already dark (like on manzari.com/), you don’t need to apply surface-dark. Dark is already the default.

In this setup, you only apply surface-light when you intentionally want to switch context — such as for articles, documentation, or other reading-heavy sections.

If you don’t have default colors set, or you want explicit control everywhere, you can use both surface-dark and surface-light.

Step 1: Define Your Color Variables (One Place Only)

Add this to Appearance → Customize → Additional CSS:

CSS
:root {
  /* Dark surface */
  --surface-dark-bg: #0F1A40;
  --surface-dark-text: #C9D2F0;
  --surface-dark-heading: #FFFFFF;

  /* Light surface */
  --surface-light-bg: #FFFFFF;
  --surface-light-text: #333333;
  --surface-light-heading: #202124;

  /* Links */
  --link-dark: #6FA8FF;
  --link-light: #2563EB;
  --link-light-hover: #1D4ED8;
}

If you ever want to change colors later, you do it here — once.

Step 2: Create the Surface Classes

These are the only classes you’ll ever apply in Elementor.

Dark Surface

CSS
.surface-dark {
  background-color: var(--surface-dark-bg) !important;
  color: var(--surface-dark-text);
}

.surface-dark h1,
.surface-dark h2,
.surface-dark h3,
.surface-dark h4,
.surface-dark h5,
.surface-dark h6 {
  color: var(--surface-dark-heading);
}

.surface-dark a {
  color: var(--link-dark);
}

Light Surface

CSS
.surface-light {
  background-color: var(--surface-light-bg) !important;
  color: var(--surface-light-text);
}

.surface-light h1,
.surface-light h2,
.surface-light h3,
.surface-light h4,
.surface-light h5,
.surface-light h6 {
  color: var(--surface-light-heading);
}

.surface-light a {
  color: var(--link-light);
}

.surface-light a:hover {
  color: var(--link-light-hover);
}

Step 3: How to Use This in Elementor

Apply classes ONLY to containers (sections)

In Elementor:

  1. Click the container
  2. Go to Advanced → CSS Classes
  3. Add:
    • surface-light for white / reading sections
    • surface-dark only if you explicitly need it

Note: Do not apply these classes to text, heading or paragraph widgets.

Step 4: How to Set Widget Colors in Elementor

For Text and Heading widgets:

  • Leave Color = Default
  • Or use Elementor Global Colors
  • Do NOT manually pick hex values per widget

Your surface classes override them automatically.

Keep Reading

Tools We Recommend

Recommended Tools

Shopify

Shopify is one of the most powerful all-in-one eCommerce platforms available today, designed to help anyone—from beginners to…

4.7
Updraft

UpdraftPlus Review – The Easiest Way to Back Up Your WordPress Website If you’re running a WordPress site…

4.7
Free / Pro from $70/yr (2 sites)
Zillion Designs

At Manzari.com, we’ve been using Zillion Designs since 2015 as our go-to platform for logo design and brand…

4.5
From $199 (+ 20% processing fee)

Affiliate links — we may earn a commission at no extra cost to you.