Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This is fiendishly clever, and really quite elegant.

I made some of my own notes on how this works here: https://simonwillison.net/2025/May/26/css-minecraft/



This is how CSS CAPTCHAs are made (for Tor websites), and sign up / login modals, and many other stuff.


good write up, thanks. talk about a combinatorial explosion!


But highly impractical and far beyond what CSS should be used for.


Obviously...

That's why it was done

For fun and to see whether it could be done


My point is that there will be too many who will look at this and start using CSS in ways it is not intended. Even today, far too many people attempt to use CSS for things best left for SVG.


These sorts of CSS experiments have been around for as long as CSS. There even used to be a site where an entire community would take basic markup and use CSS to turn it into something else.

(I just googled that phrase - the site is CSS Zen Garden. It’s impressive Google found it because that was a bad search.)

Some people did create monstrosities, others learned the limits of CSS and used that knowledge to advance CSS. So my point is that I believe in the ability of people to advance through discovering all the things they shouldn’t do.


CSS Zen Garden is not an experiment as shown in the title of this post. The Garden shows how CSS can style the HTML elements in many different ways but it is not there to create or manipulate images as shown in the subject of this post.

That said, I have not looked at the Garden in many years so if you fine one, then you found .... one ... and I loop back to my original comment: that such things are impractical, it's not what CSS is for, and should be avoided.


In other words, you don’t learn through experimentation and your learning style is the only valid one? Okay…this isn’t worth debating but science has proven that to be wrong.

It may be worth reading some cognitive psych.


This is basically the same take as "violent videogames cause school shootings"


CSS Minecraft, or CSS CAPTCHAs, or sign up / login modals cannot be done via SVG. This is needed for JS-less websites (e.g. Tor). CSS with HTML is perfect for this use-case.


If anything these tricks enable people to build stuff without JS.

I'm still here waiting for someone at W3C to get their stuff together and provide a spec for something that could enable an accessible hamburger menu with plain HTML + CSS.

Or a sane details element that DOES NOT REQUIRE JS TO CHANGE STATE (without interaction). Jesus.


If you really wanna get your blood boiling how about some Doom with HTML checkboxes - https://healeycodes.com/doom-rendered-via-checkboxes




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: