Live data from Hacker News

So you think you know box shadows?

dgerrells.com

31–40 of 130 posts

Re: So you think you know box shadows?

#35

> It also turns out that some smart people figured out maths hacks to draw rounded boxes for super cheap which UI peeps love because with this hack boxes can be so round as to appear as circles Any references to learn more about these hacks?

Some historic articles on software rendering (the original Bill Atkinson stuff) https://www.folklore.org/Round_Rects_Are_Everywhere.html http://wg20.criticalcodestudies.com/index.php?p=/discussion/...

A modern 3D accelerated article (using SDF as another commenter suspected) https://mortoray.com/quickly-drawing-a-rounded-rectangle-wit...

Re: So you think you know box shadows?

#38

I'm totally down for some good old fashioned impractical hacking. But just remember, we already have canvas, which can do all this easier, faster, and better.

But with less comedic value. Doing this with nothing but box-shadow is funny, mostly because it is so impractical.

Re: So you think you know box shadows?

#39
post #9

[flagged]

Come on. It's thanks to articles like these I can finally have LLM write all those bullshit CSS hacks for me, and I even get to keep rejecting its commits until it gets it right! (Though honestly, right now, getting GPT-4o to do responsive layout is an exercise in frustration equivalent to doing it myself.)

Hint: Claude 3.5 sonnet
Post reply on HN