234 points · by 720kb · 10y ago · 100 comments
A couple of use cases I can think of:
* Attracting attention to options in a demo
* A game for kids, or otherwise 'wacky' pages
If we restricted web browsers to what developers think we should use, we'd still be using plain green text on black terminals.
Be still, my beating heart ;)
That's basically what AMP and Facebook Pages are. They're far nicer to browse on mobile than 'unrestricted' news sites.
Still, I agree these have valid uses.
* making it more obvious that it's a CSS-only solution (which is a very good thing)
* showing how to add them - i.e. you just include a CSS file and add a class to the label
* show which browsers are supported, including touchscreens
And possibly a feature request: can you animate as an event? For example, I might want to draw attention to a radio element without checking it.
I'd wager that there are more developers scared of the commandline than are comfortable with it.
Also, because flashy web gimmics receive disproportionate amount of attention compared to less glamorous but practical concepts. Even here, on an ostensibly technical website.
I do, because I can guarantee that some self-proclaimed web designer will use them for absolutely no reason at all.
> The fact that it's possible is good to know as one day it might be a good solution for a problem I'm facing, and then I'll be happy that it exists.
This argument is so useless. "Well maybe someone wants to shoot themselves in the foot. Nobody can come up with any examples, but maybe."
> Attracting attention to options in a demo
None of the effects are really useful for that. Apart from them being too wacky ("did something break?"), anything transitive is bad for that anyway, because what if the user gets distracted for the split-second your animation runs? Fade in some persistent element for that.
> If we restricted web browsers to what developers think we should use, we'd still be using plain green text on black terminals.
Command-line tools are popular for a reason: They get shit done, and don't distract people with useless crap.
If a designer mis-uses them... well that's the designer's fault. People mis-use hammers, but it makes no sense to blame the hammer.
Some people do like to see 'useless crap' on some websites, and their opinions are just as valid as yours.
One can use these, for example, as an easter egg or to add some emotion to the selected item. Sparingly, of course. Surprise people when they are bored of all those forms :)
I think you should keep a list of all the sites using these, so that people can get inspired.
I'm on mobile and wanted to zoom but you've used this in the demo page:
meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, width=device-width"
I'm curious why? The hit targets were too small for me initially, hence the desire to zoom.On topic: I like them, used sparingly or in the right context I think they'd be very good. Thanks for sharing.
Realistically, I may only use something like this in a situation where one of the radio selection options has an effect that you want to call extra attention to.
I can't come up with a representative example right now, but I'm sure there's one out there.
Your point is well taken though... for the vast majority of cases where this could remotely be useful there exist better ways to encode the information you are trying to convey.
It is a fun set of experiments, so I give the author props for that.
If you have ideas, specially on how to improve it, feel free to open an issue on github, it's just more comfortable to discuss code things.
[1] https://github.com/720kb/radiobox.css/blob/master/lib/scss/b...
Why?
What about the inconsistency factor? If my radio boxes get animations, all other form fields should get them too.
If not, no one should get them.
You know how it's with kids.
( ) launch nuclear missile
( ) send flowers
You probably want to really draw attention to which radio button is selected so the user doesn't absentmindedly choose the wrong one.
I always find lack of good non-animation css for radio buttons and drop down select elements to be lacking.
e.g.
%focus { ... }
%boing { ... }
.some-label { @extends %focus; }