Post

Ready for the first cool demo of the year? A mini Mario world with keyboard control. Yes, you can move Mario and also jump! 👀 Demo: codepen.io/t_afif/full/... via @codepen.io ✔️ 100% CSS Magic ✔️ Minimal HTML ❌ 0% JavaScript A Chrome-only experimentation using modern CSS.

26 reposts145 likes

I have a comment that is in no way related to the (undeniably impressive) code: It feels strange to see a SNES Mario sprite against the original 8-bit Super Mario Bros. background. It gives a sort of "uncanny valley" vibe. I wonder if there's a reason you chose against the sprite from the game?

No particular reason 😅 I picked a Mario that looks good to me and easy to manipulate (Didn't want to spend a lot of times with image editing to get the correct sizing) and I already had the background/block sprites I used before ... Then I combined both 🙃

Yeah, that would also work as animation-range is not used anywhere else in CSS :) The reason why I add it, is that you can later (when Firefox officially ships) just remove the addition instead of needing to replace the check.