Skip to content
Learn Netverks

Lesson

Step 26/32 81% through track

theme-config

Theme configuration

Last reviewed May 28, 2026 Content v20260528
Track mode
iframe_html
Means
HTML preview sandbox
Reading
~1 min
Level
advanced

This lesson

This lesson teaches Theme configuration—the ideas, syntax, and habits you need before moving on in Tailwind CSS.

Config-driven utilities are how most greenfield product CSS is written today.

You will apply Theme configuration in contexts like: React/Vue/Next apps, marketing sites, design systems, and rapid prototypes where consistency and speed matter.

Read the lesson, edit HTML/CSS in the playground, press Run to preview, then answer the lesson MCQs.

When intermediate lessons feel comfortable and you are ready for production-style trade-offs.

tailwind.config.js defines design tokens: colors, spacing extensions, fonts, breakpoints, and plugins. Extend defaults rather than replacing them unless you intend a full retheme.

Example extend

theme: {
  extend: {
    colors: { brand: { DEFAULT: '#4f46e5', dark: '#4338ca' } },
    fontFamily: { sans: ['Inter', 'system-ui', 'sans-serif'] },
  },
}

Generated utilities: bg-brand, text-brand-dark, font-sans.

Important interview questions and answers

  1. Q: extend vs override in theme?
    A: extend merges with defaults; top-level keys replace Tailwind’s default scale entirely.
  2. Q: Where do content paths go?
    A: Top-level content: [] array—required for purge in production builds.

Self-check

  1. How do you add a brand color without losing indigo defaults?
  2. Why must content paths be accurate?

Interview prep

Why extend theme instead of arbitrary values everywhere?

Tokens stay consistent, purge-safe, and designers can reason about one scale—not one-off hex in markup.

Interview tip Lesson completion confidence

Can you explain this lesson in 30 seconds without reading notes?

Not saved yet.

Playground

Runs in your browser in a sandboxed frame. Backend runners appear when this track’s profile allows them.

Check yourself

Multiple choice — immediate feedback.

Discussion

Past discussion is visible to everyone. Only logged-in users can post comments and replies.

Starter discussion topics

  • Which token would you extend first—color or spacing?
  • What belongs in theme vs arbitrary values?

Sign up or log in to post comments and sync lesson progress across devices.

No discussion yet. Be the first to ask a question.

Jump