Skip to main content

Learn CSS Variables

A bite-sized Scrimba course with Per Borgen: under half an hour on CSS custom properties, the native variables that make stylesheets far easier to maintain.

Quick answer

Learn CSS Variables is a Pro-tier, intermediate course: about 29 minutes and 12 lessons, taught by Per Borgen. It covers CSS custom properties (commonly called CSS variables): declaring them, using them, and scoping them. It is a quick, high-value top-up rather than a course you set aside an afternoon for, and it slots neatly into any front-end developer's toolkit.

Is it worth your time?

For 29 minutes, the return is excellent. CSS custom properties are one of those features that quietly improve everything you write afterward: theming, consistent spacing, values you change in one place instead of twenty. The topic is small enough that the interactive format covers it completely, and you walk away using the feature properly rather than half-remembering it from a blog post.

The honest caveat is simply that it is tiny. This is not a destination course; it is a single technique. Do not expect it to anchor a learning plan. Treat it as a quick addition once your broader CSS is in place, the kind of thing you finish in one sitting and apply the same day.

What you'll learn

The course covers declaring custom properties (typically on :root), reading them with var(), scoping them to specific selectors, and the patterns that make them useful: theming, design tokens, and reducing repetition. Per Borgen keeps it concrete, so you see each idea applied to real styles rather than described abstractly. By the end you can introduce variables into an existing stylesheet without guesswork.

It is deliberately narrow. It teaches one feature thoroughly and stops, which is exactly right for the subject.

Who it's for, and who should skip it

It fits any developer who writes CSS and has not yet adopted custom properties, or who uses them by copy-paste without quite understanding scope. Half an hour fixes that.

Skip it if you already use CSS variables confidently, or if you are still learning CSS basics, in which case Learn HTML and CSS is the better starting point.

Prerequisites

Basic working CSS: selectors and the box model. No JavaScript required.

Where it fits

This is a small enhancement course on the Frontend Developer Path and the Fullstack Developer Path. It is a top-up, not a milestone, best added whenever you want it. The fuller CSS grounding lives in Learn Responsive Web Design.

Free or Pro

This is a Pro course, so it needs a Scrimba subscription. Pro also covers the career paths, challenges, certificates, and Discord. See current plans for what Pro costs in your region.

Strengths and limits

What it does well: it covers a genuinely useful feature completely, in very little time, and the format suits a small, hands-on topic perfectly.

Where it is limited: it is one technique. It will not carry a study plan on its own, and there is little to it beyond the single subject.

View Learn CSS Variables on Scrimba (opens in a new tab)