Skip to the posts
Buffalo's neighborhood journals since 2003 🍀 Patrick Spicy Devil Logan🌭 Sahlen🥨 Weber Spank🥟 Pierogi🐸 Scaj🍺 Labatt Utica Pink Cherio❄️ Snow Murder

paul’s journal

border-radius rounding corner drama

· · 🌡️ 55°F

Rounded corners have been really annoying the last 10 years. Everyone loves them but there was really no easy, efficient way to produce them.

In order to make them work you needed all kinds of extra markup or images cut out and stuck on all the corners. The problem with the markup up is that even when you create a function to auto generate it serverside or with clientside javascript you end up with a ton of unnecessary markup that make managing the DOM that much harder. With the images it is even worse in that they don't scale well because they are bitmap graphics and everyone zooms now on they many devices from mobile phones to televisions.

CSS3 brought support for a new style called border-radius and the browsers began to accept it but only with their own proprietary prefixes. I don't understand why browsers do this. Before they accept the new styles they always add their own prefixes.

e.g. -webkit is safari/chrome, -moz is firefox, i.e. has nothing to do with this yet.

So in order to get the comment bubbles to appear rounded on the front page I need this.

border-radius:15px 15px 15px 15px;

Seems simple enough, but no stable browser supports that yet. Instead I need that, for when they do, and then these custom prefixed values of the same thing. Here is the mozilla one.

-moz-border-radius:15px 15px 15px 15px;

Then to make it even more stupid, chrome can't handle the shortcut of adding all the corners on one line which makes it require these four lines.
-webkit-border-top-right-radius:15px;
-webkit-border-top-left-radius:15px;
-webkit-border-bottom-right-radius:15px;
-webkit-border-bottom-left-radius:15px;

This article covers it all

💬 0 comments

💬 Write a comment