News for hackers. Stuff that matters.
Re:CSS Click Events by bluetidepro on Monday December 17, 2012 @08:31AM (#4932166)
> "This blog post is about showing the possibilities of CSS and some clever hacks. It’s clearly not for “real life” use cases. Please, consider the whole article as a playground for experimenting, not as a tutorial to handle click events on your website or application."

I just want to make sure people see that part of the post. Great post, but as the disclaimer says, there are many reasons you should not do this for a client website, your application, etc.

Other than that, this has some really neat concepts in it. I have always been a big fan of the work done by Codrops! :)

Re:CSS Click Events by Svip on Monday December 17, 2012 @07:57AM (#4932073)
You don't have to hide the checkbox like that; display: none; is fine. Also looks better code-wise.

And apparently performance wise: http://www.zeldman.com/2012/03/01/replacing-the-9999px-hack-...

Re:CSS Click Events by denzeldenzel on Monday December 17, 2012 @08:18AM (#4932129)
display:none will be problematic for mobile Safari since the label click won't trigger the checkbox to be checked. The 100% text-indent snippet from that article on zeldman.com does not seem to work when applied to a checkbox... it remains visible.
Re:CSS Click Events by talmand on Monday December 17, 2012 @10:44AM (#4932699)
Another way is to put the checkbox within the label and absolute position it to the outside of the label's box. With the label having a relative position and hidden overflow you shouldn't see the checkbox. But this may not be suitable based on the design and other factors. Plus I haven't browser checked it since I would normally do such things with Javascript.