Skip to content

add: Flexbox Frenzy: The Alignment Heist — CSS Flexbox heist quest - #829

Merged
praveenscience merged 1 commit into
praveenscience:mainfrom
setco-website:add/quest-flexbox-frenzy
Jul 31, 2026
Merged

add: Flexbox Frenzy: The Alignment Heist — CSS Flexbox heist quest#829
praveenscience merged 1 commit into
praveenscience:mainfrom
setco-website:add/quest-flexbox-frenzy

Conversation

@setco-website

@setco-website setco-website commented Jul 31, 2026

Copy link
Copy Markdown
Contributor

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 through flex-direction flips to a timed vault-crack boss. Pure vanilla JS — no framework, no build step.

Closes #828

Type of Change

  • New Quest
  • Enhancement to existing tool
  • Bug fix
  • Documentation update
  • Build system / infrastructure

Screenshot

image

Checklist

  • I have read the Contributing Guide
  • My branch follows the naming convention (add/tool-name, feat/description, or fix/description)
  • I have tested my changes locally in at least one modern browser

For new tools:

  • The tool is a single self-contained .html file in the tools/ folder
  • The filename is kebab-case (e.g. json-formatter.html)
  • I added an entry to data/tools.json with all required fields
  • I added a screenshot as tools/flexbox-frenzy.png next to the HTML file
  • No JS frameworks (React, Vue, Angular, etc.) or heavy UI libraries (Bootstrap JS, jQuery, etc.)
  • CDN links for lightweight libraries and fonts are fine — no copy-pasting library source code inline
  • I ran node scripts/sort-norm.js data/tools.json to sort and normalize the tools registry
  • I ran node scripts/build.js and verified the landing page renders correctly

For enhancements / bug fixes:

  • I have not introduced any external dependencies
  • The tool still works as a standalone single HTML file

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

@praveenscience praveenscience left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@praveenscience
praveenscience merged commit 1c7c0ab into praveenscience:main Jul 31, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Idea: Flexbox Frenzy: The Alignment Heist

2 participants