Idea · Aug 29, 2026
CSS Cascade Combat
A browser puzzle game where players write CSS selectors to beat the cascade. Real-time rendering shows which rules win and why, turning CSS specificity from a perennial frustration into a learnable skill.
What it would do
CSS specificity and cascade order frustrate developers at every level, yet no gamified tool for mastering them exists. CSS Cascade Combat presents a live DOM element already styled by a set of opponent rules, and the player must write a new CSS rule (selector plus declaration) that achieves a target style by winning the cascade. Each puzzle level focuses on one concept: pseudo-class weight, !important, cascade layers, :is() specificity normalization, or inline styles. An in-panel breakdown walks through the exact resolution steps after each attempt, so failure teaches as much as success. A sandbox mode lets players experiment freely with instant computed-style feedback, and a streak-based scoring system rewards concise, elegant selectors over brute-force !important spam.
Key features
- 30+ puzzle levels organized by specificity concept (type selectors, class, ID, pseudo-class, layers, !important)
- Live browser rendering with specificity score displayed for every competing rule side by side
- Post-attempt cascade walkthrough explaining the resolution order using the actual cascade algorithm steps
- Sandbox mode for free-form selector experimentation with instant computed-style and specificity feedback