CSS Essentials·Practice drills 13

Drill 20: Recall — Project: a design system

Close the lesson and reproduce the example from memory.

Beginner 5 min read Lesson 336 of 480 Challenge included
What you will be able to do
  • Close the lesson and reproduce the example from memory.

Practice task

Close the lesson and reproduce the example from memory.

design-system.cssCSS
:root {
  --brand: #e4472b;
  --brand-strong: #c93a21;
  --ink: #1c1917;
  --paper: #f7f4ee;
  --surface: #ffffff;
  --line: #e7e2d9;
  --space-2: 12px;
  --space-3: 24px;
  --radius: 12px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

body {
  background: var(--paper);
  color: var(--ink);
  font-family: system-ui, sans-serif;
}

.button {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  background: var(--brand);
  color: white;
  font-weight: 600;
  cursor: pointer;
  transition: transform 180ms var(--ease), background 180ms ease;
}

.button:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

.button:focus-visible {
  outline: 3px solid rgb(228 71 43 / 0.35);
  outline-offset: 2px;
}

.button:disabled {
  background: var(--line);
  color: #8b8580;
  cursor: not-allowed;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--space-3);
}

@media (prefers-reduced-motion: reduce) {
  .button {
    transition: none;
  }
}
Your turn

Write your answer

Easy

Close the lesson and reproduce the example from memory.

TEXT · starter
Your answer…
Study tools

Make it yours.

Keep a private note for this lesson, then turn the key ideas into flashcards you can revisit.

Sign in to save notes and flashcards.Both are private to your account and stay with your progress.
Sign in
Finished reading?

Lock in what you just learned.

Mark this lesson complete to save your place and move one step closer to the certificate.

Lesson 336 of 480 · 0% of course