Choosing Tailwind CSS Dark Mode: Media vs Class Strategy
Tailwind dark mode forces a choice: media query or class toggle. This guide compares both strategies, their trade-offs, and a concrete class-based implementation with flash prevention.
ReadMeFeed / Community knowledge
Real questions. Useful conversations. Find the people who know your stack.
Tailwind dark mode forces a choice: media query or class toggle. This guide compares both strategies, their trade-offs, and a concrete class-based implementation with flash prevention.
A decision guide for Less design tokens: when a variable is the right reuse mechanism, when a parameterized mixin earns its output duplication, and how to verify the compiled result with lessc.
Learn how to use CodePen's forking mechanism to prototype components rapidly without the overhead of local environment setup.
Sass's @use module system replaces @import with namespaced, load-once modules and a with() configuration API. Here's how to structure a themeable library and what migration costs.
IE10 implements the 2012 Flexbox draft, not the modern spec. Learn the -ms- dialect, its property mappings, its limits, and a strategy for shipping layouts that actually render.
How Safari's :focus-visible support differs by version and platform, plus a CSS pattern that keeps keyboard focus visible everywhere while hiding the ring for mouse clicks.
Learn why Tailwind JIT misses dynamically generated class names and how to fix it with safelists or literal strings, plus a quick checklist to keep your CSS small and predictable.
Decide when to use Bulma's built‑in visibility helper classes versus writing your own media queries, with a comparison table, trade‑offs, and a code example you can test in the browser.
Learn how React-Bootstrap’s Container, Row, and Col components let you build responsive layouts with pure JSX, avoiding custom CSS while retaining Bootstrap’s flexbox grid.