Patch Bandit

The story / The lab

The lab

CSS experiments, taken apart and rebuilt

These CSS experiments are small techniques we took apart and put back better: each one has a live demo, a plain explanation, and code you can copy. They're the first real things to come out of the stash.

Every snippet is MIT licensed. Take any of them and make it better.

The drop log

Each experiment is a "snack drop": one technique, one working demo, code you can paste. Newest first, on the shelf.

  1. Waffle fry2026-11-22

    CSS container query and style queries

    A resizable component card using @container size breakpoints, cqi fluid type, and Baseline style queries.

  2. Donut hole2026-11-22

    HTML dialog modal with zero JavaScript

    Zero-script native <dialog> modal driven by commandfor, @starting-style transitions, and optional closedby="any".

  3. Cinnamon roll2026-11-22

    CSS accordion with native <details name>

    Exclusive <details name> accordion styled with ::details-content and progressive interpolate-size height animation.

  4. Pretzel2026-11-22

    CSS popover with no JavaScript

    Zero-script popovers: auto vs manual dismiss, backdrop styling, and smooth @starting-style entry.

  5. Popcorn2026-11-22

    CSS text-wrap: balance vs pretty, live

    A live width slider showing headlines and paragraphs reflow between wrap, balance, and pretty.

  6. Apple slice2026-11-22

    Squircle CSS with corner-shape

    A zero-script corner-shape playground with a live @supports check and a plain browser fallback.

  7. Peanut2026-11-22

    CSS parent selector with :has()

    Pure-CSS :has() demos: cards that style themselves on check and quiet down their siblings.

  8. Blueberry2026-11-22

    CSS animate on scroll without JavaScript

    Pure-CSS animation-timeline: view() reveals and scroll progress bars, with reduced-motion fallback.

  9. Gummy bear2026-11-22

    CSS color-mix() playground

    Two color pickers and a ratio slider comparing color-mix() across oklch, oklab, srgb, and hsl.

  10. Cheese puff2026-11-22

    CSS resize handle: the property and a custom one

    The resize property, its little corner, and a custom handle you can steer with arrow keys.

  11. Pickle2026-11-22

    CSS star rating with no JavaScript

    A clickable, keyboard-friendly star rating made of radio buttons and CSS.

  12. Cracker2026-11-22

    HTML vertical divider: six ways to draw one

    Six live ways to draw a line between two things, with code to copy.

Only the experiments above exist. More arrive one snack at a time. Want to know why we give them away? Read the story.

Also in the lab

The CSS art raccoon

The raccoon on the left is not a picture. It is plain boxes, cut with clip-path and outlined with shadows. The page takes it apart, piece by piece, and gives you three tricks to draw your own animal.

Take the raccoon apart