LESS download button with CSS3
May 7th, 2011
I was browsing the LESS.js website a last week, marvelling at the ideas behind it. I scrolled back up to the top of the page to find the download button. I spotted it and instantly assumed it was a purely HTML and CSS3 creation due to it’s simplicity, but it turned out it was an image:

I was struck by an idea: recreate this button using only markup and CSS3, no images allowed! I knew from spending basically my entirely adult life studying web development a button of this design was perfectly possible: multiple CSS3 gradients for background, use of outline and border for the, well, borders, CSS triangles for the arrow, and box-shadows for the flourishes.
The result of a few hours well spent can be seen in the result tab of the iFrame below. Whilst not a perfect match due to typefaces, the image version and the markup version are pretty much identical. This shows just how powerful CSS3 can be (it even degrades nicely in IE).
One downside is the button is a little markup heavy due to the arrow section. This could easily be remedied if you included this as a background image if you ignored the ‘no images’ rule, but otherwise the markup isn’t that obtrusive.
6 Responses to LESS download button with CSS3
Ryan Heath
May 9th, 2011 at 5:44 pm
Ahhh… so close. You forgot the font! It looks like a courier/monaco of some sort.
Haha, just kidding… nice job.
Luke
May 12th, 2011 at 2:41 pm
Ha I know, couldn’t track down what it was. Plus I really should have been doing university work so details like that got swept over ha
Creating CSS3 Buttons: Techniques, Tutorials, Tools | Splashnology
May 26th, 2011 at 4:30 pm
[...] LESS download button with CSS3 [...]
Nicholas Young
July 13th, 2011 at 10:09 pm
Nice! I’m not sure how I stumbled onto this post, but I’m glad that I did.
If you want to trim down the text a bit more (and, to my eyes, make it look slightly embossed, you could always add -webkit-font-smoothing: antialiased; to the text).
Pewee
January 12th, 2012 at 5:52 pm
You forgot the hover state, mate
Luke
January 15th, 2012 at 2:15 pm
There wasn’t one on the original so I didn’t bother