News for hackers. Stuff that matters.
Re:Show HN: A CSS-Only Terrain Generator by senfiaj on Tuesday November 04, 2025 @12:17PM (#45813436)
When I turn off JS, it shows a loader instead of the terrain. Is this really CSS-Only? I mean it's still a high achievement even with JS, but was expecting it would also work without JS. This one, for example, truly works without JS https://benjaminaster.com/css-minecraft/ .
Re:Show HN: A CSS-Only Terrain Generator by arbll on Tuesday November 04, 2025 @12:22PM (#45813495)
I'm assuming it's the render engine that is in pure CSS. You could display a static map in CSS but things like the tools to modify the terrain definitely need JS.
Re:Show HN: A CSS-Only Terrain Generator by thih9 on Tuesday November 04, 2025 @03:10PM (#45815351)
I wanted to check if your assumption is correct but I couldn’t find the source code.

Why do you think the renderer is pure css and not e.g. mostly css?

Re:Show HN: A CSS-Only Terrain Generator by embedding-shape on Tuesday November 04, 2025 @03:23PM (#45815477)
The top right button has a "Download code" which gives you a .zip file. That .zip file doesn't have any JS in it, and renders the terrain just like in the online editor, except you can turn off JS and it still works.

Edit: someone else wrote basically the same an hour ago: https://news.ycombinator.com/item?id=45814791

Re:Show HN: A CSS-Only Terrain Generator by thih9 on Tuesday November 04, 2025 @03:37PM (#45815609)
Looks like it’s a “(css-only terrain) generator” - a generator that lets the user create and download a css only terrain.

As opposed to a “css-only (terrain generator)” - a terrain creation studio built with css only.

Re:Show HN: A CSS-Only Terrain Generator by psygn89 on Tuesday November 04, 2025 @01:07PM (#45814014)
You might not need it using the new :has() and different inputs as modifiers. Though that's a lot of :has() and probably would kill performance.
Re:Show HN: A CSS-Only Terrain Generator by nightpool on Tuesday November 04, 2025 @01:08PM (#45814016)
GP linked an example of a similar project that allowed you to modify the terrain without any JS at all
Re:Show HN: A CSS-Only Terrain Generator by decimaldesign on Tuesday November 04, 2025 @02:13PM (#45814791)
I think what's intended is that the completed and downloaded solution doesn't require any javascript.

Build something then hit the Download Code button - that packaged HTML solution doesn't require any javascript to render locally.

Re:Show HN: A CSS-Only Terrain Generator by senfiaj on Tuesday November 04, 2025 @03:30PM (#45815545)
Yeah, it worked, it seems to be a static rendered html with no interactivity though.