Recap: Theme and Dark Mode
Part of the Fundamentals section of Coddy's Tailwind CSS journey. Lesson 50 of 55.
Challenge
MediumBuild an exhibition guide by combining the four skills from this chapter. Complete every panel so the guide works as a whole.
#part1: a theme token--color-featureof#446688, applied with the corresponding utility.#part2: a theme token--spacing-featureof30px, applied with the corresponding utility.#part3: a theme token--radius-featureof18px, applied with the corresponding utility.#part4: 85 percent opacity at rest and 45 percent in dark mode.
Preserve the supplied content and structure.
Keep the supplied content and element IDs. Edit the HTML utility classes or the requested CSS. Click Run preview to refresh the preview after edits, then use Check/Run code to grade your work.
Try it yourself
<!doctype html>
<html lang="en"><head><meta charset="utf-8"><meta name="viewport" content="width=device-width,initial-scale=1"><title>Practice studio</title><link rel="stylesheet" href="./styles.css"></head><body>
<button id="toggle">Theme</button>
<div id="part1" class="">Booking panel</div>
<div id="part2" class="">Exhibition panel</div>
<div id="part3" class="bg-black text-white p-4">Schedule panel</div>
<div data-theme-root><div id="part4" class="">Reading panel</div></div>
<script src="./controls.js"></script>
</body></html>
All lessons in Fundamentals
1Meet Tailwind
A Styled First RunChoosing UtilitiesCombining UtilitiesThe Local StylesheetRecap: Meet Tailwind7Sizing and Overflow
Element WidthElement HeightMaximum WidthOverflow BehaviorRecap: Sizing and Overflow10Theme and Dark Mode
Theme Color TokensTheme Spacing TokensTheme Radius TokensClass-Based Dark ModeRecap: Theme and Dark Mode