Rounded Corners in Rails: The Easy Way
A few days ago I learned about Curvy Corners, an incredible JavaScript that lets you put rounded corners on your DIV elements that can do anti-aliasing and handle any size border. It's the best rounded corner script so far.
Craig Webster saw it too and has created a Curvy Corners in Rails helper method that means you can do stuff like:
<% curvy_div(:tl => false, :br => false) do -%> Oyy, stylish. <% end -%>
Very neat.
June 13, 2006 at 8:49 am
Curvy Corners seems to use a *lot* of DIVs in accomplishing some of the best rounded corners I have seen. I'm a little hesistant to add ~220 divs to my page for each rounded corner.
June 13, 2006 at 10:37 am
Unfortunately so. It's just a shame this workaround is required. One DIV for each pixel? It's funny in a sad way!
That said, I feel similarly about the thousands of lines of JavaScript being thrown into almost every pageload nowadays, and browsers seem to be coping with it (just), so it might not be so bad after all.