Loading tutorials
dark: variant does before you configure anything. It assumes you can read basic HTML and CSS, know Tailwind utilities and variants such as hover: and md:, and have a project with Tailwind installed. Basic JavaScript (the DOM and localStorage) is only needed for t7 min readdark: compiles to, and how to configure it in Tailwind v3 and v4. The chapter assumes you know basic HTML and CSS, Tailwind utility classes and variants such as hover: and md:, and basic JavaScri7 min readdark: utilities apply, and how to change that rule in Tailwind v3 and v4. It assumes you can write utility classes and variants such as hover: and md:, and that a Tailwind project already builds. Earlier chapters introduced the dark: variant, the6 min readhover: and md: work. It also assumes dark mode is already configured in your project, either through the default prefers-color-scheme behavior or through a class or selector strategy. The e7 min readhover: and md:, and the DOM and localStorage in JavaScript. It also assumes a project with Tailwind already installed. Earlier chapter6 min readdark class from the previous chapters into a three-way theme setting that survives page reloads. It assumes you have a project where dark: utilities already respond to a .dark class on <html>. In Tailwind v3 that means darkMode: 'selector'. In v4 it means the `@custo6 min readdarkMode: 'selector' or a v4 @custom-variant), and a script that toggles the dark class on <html> from localStorage. You should be comfortable with the DOM, localStorage, and the order in which browsers7 min readdark:, you have chosen a strategy (system preference or a .dark class), and you know basic CSS custom properties. If your dark: classes still do nothing, finish the configuration chapter first. This chapter is about what happens after it6 min readdark: variant, have a working class-based or selector-based dark mode, and know basic CSS custom properties. You will learn why styling your own elements is not enough for a complete dark theme, and how the color-scheme property fixes the parts of the pag6 min readdark: classes, have a working light, dark and system toggle, and know the basics of the WCAG (Web Content Accessibility Guidelines). The goal is to confirm that the dark theme you built is readable and usable, not just that it switches.6 min readdark: variant, and you have read the earlier chapters on the media and class strategies, the v3 and v4 configuration, and the theme toggle script. You will learn to find out why a dark: utility ha8 min read