News for hackers. Stuff that matters.
Re:Just another awesome CSS3 buttons by huhtenberg on Monday September 05, 2011 @06:20PM (#2963478)
With all due respect, this still lacks the polish of traditional well-crafted raster buttons. Having looked at (what seems like) all CSS buttons in existence, I am not entirely convinced that CSS is actually capable of pixel perfect replication of Photoshop goodness. At least not at the moment.

More importantly though - scaling the button up or down while keeping it exact visual appearance typically requires readjustment of its accentuating details - the transparency %ages, stroke weights and colors and what not. This effectively renders the very idea of CSS buttons void - they can be scaled, but it will distort them, so the scaled up/down versions are basically no good.

-- Gallery of buttons that I yet to see CSS versions to match up to --

[1] http://dribbble.com/shots/239089-Dialoggs-Login-Animated

[2] http://dribbble.com/shots/201485-Yo-check-it-iOS-UI-

[3] http://dribbble.com/shots/173658-To-project

[4] http://dribbble.com/shots/191108-Let-there-be-sense-

[5] http://dribbble.com/shots/199327-iPad-app-sneak-peak

[6] http://dribbble.com/shots/98510-Starred-Checked-Action-Butto...

(edit) - shortened list a bit, it is easy to get carried away with this stuff.

Re:Just another awesome CSS3 buttons by ppog on Monday September 05, 2011 @06:37PM (#2963502)
When I see people getting breathless about "awesome CSS-only buttons" or "cool CSS-only wallpaper," I am always reminded of the old proverb of the dancing bear: "The marvel is not that the bear dances well, but that the bear dances at all."
Re:Just another awesome CSS3 buttons by mixmastamyk on Monday September 05, 2011 @06:46PM (#2963514)
I think they're analogous to SVG/Illustrator rather than Photoshop. Many (don't know if all) the scaling issues could be remedied by using em instead of px in the stylesheet.
Re:Just another awesome CSS3 buttons by elii on Monday September 05, 2011 @06:02AM (#2961752)
From the technical aspect this is well done because it shows the power of CSS. From a designer's point of view it is quite far from perfect. The icons look weird and the active state looks quite uninspired with only showing an inner shadow. We shouldn't over hype such things just because "there are no graphics used". The user doesn't care if there are graphics used or not. Also the user won't recognize a difference in loading time because the icons wouldn't weight many bytes.
Re:Just another awesome CSS3 buttons by ig1 on Monday September 05, 2011 @07:16AM (#2961887)
Depends how it's done, if the images are all in separate files (as opposed to using a grid mechanism) it will make a noticeable difference.
Re:Just another awesome CSS3 buttons by mikeleeorg on Monday September 05, 2011 @11:19AM (#2962427)
I'm kind of surprised by the active state too.

I'd probably use this code and change the active state to use a different color (all in CSS of course). It might even be possible to have the text and icon shift slightly down and to the right (all in CSS of course). Those changes would give it a satisfactory active state IMO.

Re:Just another awesome CSS3 buttons by mikeleeorg on Monday September 05, 2011 @01:14PM (#2962765)
I decided to put my money where my mouth was. Here's an attempt at a modified active state that, at least in my eyes, looks more like what I would expect out of an active state:

http://bizthoughts.mikelee.org/a-modified-active-state-for-s...

Re:Just another awesome CSS3 buttons by jetbean on Monday September 05, 2011 @10:22AM (#2962260)
From a programmer's point of view, they look good. I think they would look great on a minimal-like design.
Re:Just another awesome CSS3 buttons by ile on Thursday September 08, 2011 @01:46PM (#2974876)
Could you elaborate on the weirdness issue? I'm not a designer but but would like to learn about the flaws these may have. The active state doesn't look so good though, agreed.
Re:Just another awesome CSS3 buttons by DenisM on Monday September 05, 2011 @03:26PM (#2963125)
No discussion of CSS buttons will ever be complete without this fantastic tutorial: http://news.ycombinator.com/item?id=1255023

It actually explains how light reflections create this or that color/brightness and uses CSS to demonstrate the natural-looking layout.

Re:Just another awesome CSS3 buttons by atirip on Monday September 05, 2011 @09:53AM (#2962187)
I think the word "awesome" is not proper in this context. Those buttons are merely good enough and look rather shitty for my pixel perfect eye. Sorry.
Re:Just another awesome CSS3 buttons by thevivekpandey on Monday September 05, 2011 @12:35PM (#2962656)
ok...So I did find these button "awesome", but then I do not claim to have a great eye for design. Can you point me to some buttons which you can classify as "awesome"
Re:Just another awesome CSS3 buttons by atirip on Monday September 05, 2011 @12:59PM (#2962721)
As pure CSS buttons, those at http://www.kurat.com/ are real nice.
Re:Just another awesome CSS3 buttons by thevivekpandey on Monday September 05, 2011 @07:32AM (#2961909)
Funny that their "View Demo" button does not use the buttons that the article is advocating. And ditto for the subscribe button on the right.
Re:Just another awesome CSS3 buttons by revorad on Monday September 05, 2011 @08:47AM (#2962045)
Why do they even need a View Demo button? Almost every article about CSS/JS scripts for cool effects does this, instead of just using whatever they want to demo in the blog post itself.
Re:Just another awesome CSS3 buttons by waitwhat on Monday September 05, 2011 @09:49AM (#2962178)
This way the demo pages are as succinct as possible, the code isn't confusingly intertwined with the html/css/js generated by their CMS (in this case WordPress) and matches as closely as possible what was described in the corresponding article.

It's also a fraction easier (saves finding a per-post css/js plugin), you don't have to worry about wierd interactions with the CMS code, and it will continue to work even if you change the CMS or theme.

Re:Just another awesome CSS3 buttons by pbhjpbhj on Monday September 05, 2011 @08:55AM (#2962064)
I didn't see it as advocating the use of the buttons just as presenting the possibility. Presumably they keep consistent buttons across the site and probably they have other button demos?
Re:Just another awesome CSS3 buttons by ramanujam on Monday September 05, 2011 @09:50AM (#2962179)
As an experimental effort, i don't see a reason why the author would change the style of the demo button in the post. The demo button here is an anchor tag with a class name and he has used that style across the site for all demo/download buttons.

Creating a separate demo page where all the html/css can be dumped looks like a better option rather than messing up with the php template.

Re:Just another awesome CSS3 buttons by muxxa on Monday September 05, 2011 @07:01AM (#2961859)
Something that has been overlooked: 1px offset in the :active state
Re:Just another awesome CSS3 buttons by gvkv on Monday September 05, 2011 @06:39AM (#2961810)
Small bug: If you click and hold and then drag outside the borders of the button, the button stays in its ':active' state until you click somewhere (anywhere) else.
Re:Just another awesome CSS3 buttons by nawariata on Monday September 05, 2011 @11:44AM (#2962497)
This is expected behavior. Browsers follow the link on mouse up event, if you try to drag it away then mouse up happens outside of the button area and link won't be followed. Button remains active as last clicked element, this behavior is also consistent with operating systems.
Re:Just another awesome CSS3 buttons by gvkv on Monday September 05, 2011 @01:55PM (#2962889)
Not really. While I agree that the link should not be followed, the button should still return to its normal pre-mouse-down, pre-hover state. Only the focus should remain with the button.
Re:Just another awesome CSS3 buttons by bluesnowmonkey on Monday September 05, 2011 @12:24PM (#2962627)
These CSS buttons seem inferior to plain old sprited buttons, which give designers complete control and work perfectly in all browsers.
Re:Just another awesome CSS3 buttons by fatalerrorx3 on Monday September 05, 2011 @05:11PM (#2963355)
I hate how IE butchers these new CSS tricks, it always looks good in every other browser besides IE and it just so happens that the person that I'm working for now is an avid IE user and expects rounded corners on just about everything and the layout has to be pixel-perfect in IE. Annoying to say the least
Re:Just another awesome CSS3 buttons by ladon86 on Monday September 05, 2011 @06:30AM (#2961798)
It would be great if someone could put together a collection of links to these different CSS3 button examples.
Re:Just another awesome CSS3 buttons by rbreve on Monday September 05, 2011 @07:55AM (#2961957)
Here you can find more examples http://html5snippets.com/snippets?tag=button
Re:Just another awesome CSS3 buttons by neoveller on Monday September 05, 2011 @05:38AM (#2961718)
Not really sold on the :active box-shadow--looks tacky and unnatural. Try more of a blur radius on it?
Re:Just another awesome CSS3 buttons by josteink on Monday September 05, 2011 @10:03AM (#2962209)
They behave differently when clicking on the icon vs the text. IMO that is a design flaw, but I can see how some people would argue it's a matter of taste.

But to be completely fair so is the term "awesome". Submission could have been toned down a wee bit.

Re:Just another awesome CSS3 buttons by yters on Monday September 05, 2011 @05:06PM (#2963343)
And should have used correct grammar.
Re:Just another awesome CSS3 buttons by bane on Monday September 05, 2011 @01:02PM (#2962732)
Sadly, looks significantly different in different browsers, IE most notably looks terrible.
Re:Just another awesome CSS3 buttons by FreshCode on Monday September 05, 2011 @07:03AM (#2961864)
The border and the distance separating the icon from the text makes it look like two distinct buttons. Don't make me think: remove the unnecessary design element.
Re:Just another awesome CSS3 buttons by mixmastamyk on Monday September 05, 2011 @06:52PM (#2963522)
Does anyone know why these type of buttons seem to always use the anchor (a) tag instead of the the button tag? Or even perhaps form input?
Re:Just another awesome CSS3 buttons by SolarUpNote on Monday September 05, 2011 @10:48AM (#2962336)
Very nicely done. I like the use of the character icons instead of images. Not pixel-perfect, but surprisingly good.
Re:Just another awesome CSS3 buttons by jetbean on Monday September 05, 2011 @10:34AM (#2962287)
Does anyone else think that they should have made a "Previous" button as well?
Re:Just another awesome CSS3 buttons by wlievens on Monday September 05, 2011 @08:24AM (#2961996)
I like how they use glyph icons. Haven't seen that often before.