Hacker News new | ask | show | jobs
by dmazzoni 704 days ago
Canvas is better...if you're trying to do something that stays within a fixed-size box.
1 comments

Canvas would still be faster even if you used a full-screen box. Just the string concatenation overhead of doing this with box-shadows is insanely wasteful.

Which isn't to demerit the hackish creativity of taking one thing and running with it! But if you wanted to do a ball painting effect like that outside this "what if" context, it would be technically irresponsible to do it with box-shadows.