add: Flexbox Frenzy: The Alignment Heist — CSS Flexbox heist quest - #829
Merged
praveenscience merged 1 commit intoJul 31, 2026
Merged
Conversation
A heist caper where every vault lock is a Flexbox puzzle: write real CSS on a container to slide gold bars onto their target slots. The CSS is applied to actual DOM elements and measured live with getBoundingClientRect, so the browser's own layout engine is the referee — the game is honest by construction, the same way the real RegExp engine judged Regex Golf. CSS isn't simulated; it is both the render engine and the judge. Five escalating floors: - Floor 1 (The Lobby Job): main-axis only — justify-content. - Floor 2 (The Cross-Axis Caper): add align-items for vertical control. - Floor 3 (Direction Reversal): flex-direction flips the axes, so the same properties behave differently — teaching which axis each acts on. - Floor 4 (The Gap & Grow Vault): gap, flex-grow, and per-item align-self. - Floor 5 (The Vault-Crack Finale): a timed heist with a rising alarm where finesse (fewest properties) buys time. Design notes: - Finesse scoring (golf for CSS): validity is the entry fee; score is how few properties were used, rewarding shorthands like place-content over separate declarations — the "there's always a cleaner answer" replay hook. - Procedural vaults are generated from a known-achievable property set, so par is real, difficulty scales, and no two heists repeat. - Seating is measured, not assumed: each gold bar's getBoundingClientRect is compared against its target slot within a tolerance, so the browser's actual layout — not a lookup table — decides success. Presentation: real flex containers with CSS-transitioned gold bars, laser-outline target slots, Canvas particle bursts on a vault opening, synthetic Web Audio (chip placement, bar-seat click, vault-open chord, boss alarm), a finesse gauge, and a heist scorecard. Heist palette (vault-steel blue, gold, laser red) kept distinct from the other quests. prefers-reduced-motion supported throughout. Verified via jsdom: full five-floor clear to the scorecard, the finesse/par scoring path, the boss-timer flow, and the layout-measurement seating check, all green. - tools/flexbox-frenzy.html (single-file quest, Vanilla JS, no frameworks) - tools/flexbox-frenzy.png (screenshot) - data/tools.json entry (sorted via scripts/sort-norm.js) Closes praveenscience#828
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What does this PR do?
A heist caper where every vault lock is a Flexbox puzzle: ghostly target outlines show where gold bars must land, and the player writes real CSS on the container to slide them into position. The CSS is applied to actual DOM elements and measured live with
getBoundingClientRect, so the browser's own layout engine is the referee — the game cannot misrepresent what a Flexbox property does. Finesse scoring rewards solving with fewer properties (shorthands over separate declarations), procedural vaults with verified solutions keep every heist fresh, and five floors escalate from main-axis basics throughflex-directionflips to a timed vault-crack boss. Pure vanilla JS — no framework, no build step.Closes #828
Type of Change
Screenshot
Checklist
add/tool-name,feat/description, orfix/description)For new tools:
.htmlfile in thetools/folderjson-formatter.html)data/tools.jsonwith all required fieldstools/flexbox-frenzy.pngnext to the HTML filenode scripts/sort-norm.js data/tools.jsonto sort and normalize the tools registrynode scripts/build.jsand verified the landing page renders correctlyFor enhancements / bug fixes: