5 comments

  • hyperhello14 minutes ago
    Josh, I was reading, and then a little man slid in from the left side, blocking the text I was reading, and said &quot;Hey, friend! Would you like to subscribe to the newsletter?&quot; 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.<p>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 &#x27;animate&#x27; to your mouse cursor. The file icon should be attached to the cursor location with no delay.<p>However, suppose you drop it somewhere it can&#x27;t go. The interface should then animate the file back to where it belongs; that&#x27;s the computer &#x27;putting it back&#x27;. 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&#x27;ll notice things like this as part of fit and finish; they are communication.<p>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.<p>Then the speech bubble should <i>fade</i> in, indicating that the computer is talking, and you as the user must act, like when a dialog says &quot;Save your work now. I take your laptop away in 30 seconds. Look in my eyes, I am the user now.&quot;
  • EvanAnderson35 minutes 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.
    • zovirl23 minutes 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)
      • toast017 minutes 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&#x27;re serving one request per http connection (but hopefully not for images) . If you&#x27;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&#x27;t think that would be big, but it might be.
  • KaiserPister7 minutes 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.
  • Gualdrapo1 hour ago
    I remember Microsoft Front Page had a feature about doing buttons with image sprites and it spitted a ton of JS gibberish.<p>I don&#x27;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 &lt;symbol&gt; and animate that with CSS.
  • asib1 hour ago
    I love Josh&#x27;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&#x27;s going to be much less common. Maybe it already was like that anyway.
    • zarzavat1 hour ago
      LLM are actually really bad at writing CSS. CSS is 20% logic and 80% art. The machines just don&#x27;t understand what is attractive and what is ugly. I hand write all of my CSS and I don&#x27;t see that changing any time soon.
      • sigseg1v43 minutes 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.