frontpage.
newsnewestaskshowjobs

Made with ♥ by @iamnishanth

Open Source @Github

fp.

Open in hackernews

Sprites on the Web

https://www.joshwcomeau.com/animation/sprites/
30•vinhnx•3d ago

Comments

asib•1h ago
I love Josh's blog and writing. I have to wonder what place this kind of content has in an age where agents are writing all the CSS. It sort of feels like hand tool woodworking now - there are people that will still get a kick out of designing things themselves, but it's going to be much less common. Maybe it already was like that anyway.
zarzavat•1h ago
LLM are actually really bad at writing CSS. CSS is 20% logic and 80% art. The machines just don't understand what is attractive and what is ugly. I hand write all of my CSS and I don't see that changing any time soon.
sigseg1v•54m ago
I had this opinion recently until I started using the Figma MCP with Claude to import my live app into Figma Make, get it to edit things where it actually understands layout and margins and what looks good, and then pull it back into the app with MCP. I was shocked at how good it works. Sure, Claude sucks at CSS, but Figma nails it even for the worst designed pages.
Gualdrapo•1h ago
I remember Microsoft Front Page had a feature about doing buttons with image sprites and it spitted a ton of JS gibberish.

I don't think the example of the trophy in the article is a good use case this days, you could draw that trophy as a SVG and animate the flames with GSAP or something, or draw each flame frame as a <symbol> and animate that with CSS.

EvanAnderson•46m ago
I think animation was the less common use case. Sprites were a nice way to get multiple images in a single HTTP request. Latency on dialup was murder and getting more in a single round trip was better. If you have a bunch of similarly-sized elements stick them all in a single file and use CSS to make multiple references to the same file display different images.
zovirl•34m ago
Additionally, the file size of the sprite sheet image is often smaller than the combined file sizes of the individual images. (I never looked into why but expect it has to do with sharing overhead and the compression dictionary)
toast0•28m ago
Yeah. If your images have similarity at all, being in the same compression container helps a bit; and there is some per file overhead, smallest PNG is reportedly 67 bytes, plus http overhead, and maybe you're serving one request per http connection (but hopefully not for images) . If you're feeling really optimizy, you can probably shuffle the order of the sprites and get bigger or smaller sprite sheets. But then you also need to consider the impact on your css when you shift the sprite sheet around, I don't think that would be big, but it might be.
hyperhello•25m ago
Josh, I was reading, and then a little man slid in from the left side, blocking the text I was reading, and said "Hey, friend! Would you like to subscribe to the newsletter?" I believe the site used CSS animation-timing-function:ease-in-out. My intuition told me that the slide was completely wrong for the situation.

First, the most important signal that any animation provides is this: the computer is doing this for you. This goes in the negative too: if you click and drag a file icon, the drag sprite may be translucent or highlighted somehow, but it should not 'animate' to your mouse cursor. The file icon should be attached to the cursor location with no delay.

However, suppose you drop it somewhere it can't go. The interface should then animate the file back to where it belongs; that's the computer 'putting it back'. Now, the timing function; how should the file go back? Slowly back away from the cursor? Accelerate to the return location, then slow back down again? No, it should very quickly snap away from the cursor, then settle where it belongs. You'll notice things like this as part of fit and finish; they are communication.

The man coming from the left eased in and then slowly stopped. This is profoundly wrong, like a person sneaking out of a dark place, then slowly coming to rest in front of you staring into your eyes, it is very much threat behavior. You want the person to come in a friendly way, so he can sell you something or convince you to smash the subscribe button. The correct animation is to simply appear halfway in, far enough you can see his smile; stop for 0.5s, indicating he is occupying the space; then slowly ease-in-ease-out the rest of the way.

Then the speech bubble should fade in, indicating that the computer is talking, and you as the user must act, like when a dialog says "Save your work now. I take your laptop away in 30 seconds. Look in my eyes, I am the user now."

KaiserPister•18m ago
I built 8bitsmith.com as a tool to make controlled sprite sheets. It was an experiment in vibe-coding and controlled asset creation, so pricing is basically a pass-through cost of using Gemini.

We deserve a better streams API for JavaScript

https://blog.cloudflare.com/a-better-web-streams-api/
174•nnx•3h ago•67 comments

We gave terabytes of CI logs to an LLM

https://www.mendral.com/blog/llms-are-good-at-sql
38•shad42•1h ago•27 comments

Statement from Dario Amodei on our discussions with the Department of War

https://www.anthropic.com/news/statement-department-of-war
2619•qwertox•18h ago•1398 comments

The Pentagon is making a mistake by threatening Anthropic

https://www.understandingai.org/p/the-pentagon-is-making-a-mistake
107•speckx•2h ago•77 comments

Tenth Circuit: 4th Amendment Doesn't Support Broad Search of Protesters' Devices

https://www.eff.org/deeplinks/2026/02/victory-tenth-circuit-finds-fourth-amendment-doesnt-support...
162•hn_acker•2h ago•16 comments

Show HN: RetroTick – Run classic Windows EXEs in the browser

https://retrotick.com/
97•lqs_•4h ago•33 comments

Show HN: Badge that shows how well your codebase fits in an LLM's context window

https://github.com/qwibitai/nanoclaw/tree/main/repo-tokens
42•jimminyx•2h ago•25 comments

Can you reverse engineer our neural network?

https://blog.janestreet.com/can-you-reverse-engineer-our-neural-network/
200•jsomers•2d ago•127 comments

F-Droid Board of Directors nominations 2026

https://f-droid.org/2026/02/26/board-of-directors-nominations.html
118•edent•7h ago•64 comments

Experts sound alarm after ChatGPT Health fails to recognise medical emergencies

https://www.theguardian.com/technology/2026/feb/26/chatgpt-health-fails-recognise-medical-emergen...
73•simonebrunozzi•1h ago•57 comments

An interactive intro to quadtrees

https://growingswe.com/blog/quadtrees
144•evakhoury•2d ago•15 comments

Get free Claude max 20x for open-source maintainers

https://claude.com/contact-sales/claude-for-oss
159•zhisme•8h ago•91 comments

The Hunt for Dark Breakfast

https://moultano.wordpress.com/2026/02/22/the-hunt-for-dark-breakfast/
422•moultano•13h ago•159 comments

The normalization of corruption in organizations (2003) [pdf]

https://gwern.net/doc/sociology/2003-ashforth.pdf
208•rendx•11h ago•109 comments

Sprites on the Web

https://www.joshwcomeau.com/animation/sprites/
30•vinhnx•3d ago•9 comments

Breaking Free

https://www.forbrukerradet.no/breakingfree/
124•Aissen•7h ago•21 comments

NASA announces major overhaul of Artemis program amid safety concerns, delays

https://www.cbsnews.com/news/nasa-artemis-moon-program-overhaul/
8•voxadam•55m ago•3 comments

The quixotic team trying to build a world in a 20-year-old game

https://arstechnica.com/gaming/2026/02/inside-the-quixotic-team-trying-to-build-an-entire-world-i...
79•nxobject•2d ago•15 comments

Vibe coded Lovable-hosted app littered with basic flaws exposed 18K users

https://www.theregister.com/2026/02/27/lovable_app_vulnerabilities/
14•nottorp•41m ago•0 comments

How to Allocate Memory

https://geocar.sdf1.org/alloc.html
39•tosh•2d ago•1 comments

Ubicloud (YC W24): Software Engineer – $95-$250K in Turkey, Netherlands, CA

https://www.ycombinator.com/companies/ubicloud/jobs/j4bntEJ-software-engineer
1•ozgune•8h ago

Modeling Cycles of Grift with Evolutionary Game Theory

https://www.oranlooney.com/post/grifters-skeptics-marks/
3•ibobev•3d ago•2 comments

Reading English from 1000 Ad

https://lewiscampbell.tech/blog/260224.html
61•LAC-Tech•3d ago•24 comments

What Claude Code chooses

https://amplifying.ai/research/claude-code-picks
549•tin7in•23h ago•208 comments

Working on Pharo Smalltalk: BPatterns: Rewrite Engine with Smalltalk Style

http://dionisiydk.blogspot.com/2026/02/bpatterns-rewrite-engine-with-smalltalk.html
51•mpweiher•8h ago•4 comments

80386 Protection

https://nand2mario.github.io/posts/2026/80386_protection/
112•nand2mario•3d ago•27 comments

What does " 2>&1 " mean?

https://stackoverflow.com/questions/818255/what-does-21-mean
383•alexmolas•21h ago•224 comments

AirSnitch: Demystifying and breaking client isolation in Wi-Fi networks [pdf]

https://www.ndss-symposium.org/wp-content/uploads/2026-f1282-paper.pdf
394•DamnInteresting•1d ago•173 comments

The complete Manic Miner disassembly

https://skoolkit.ca/disassemblies/manic_miner/
51•sandebert•9h ago•7 comments

Layoffs at Block

https://twitter.com/jack/status/2027129697092731343
852•mlex•20h ago•967 comments