News for hackers. Stuff that matters.
Re:The Tilde is an Amazing CSS Selector by sgdesign on Wednesday May 16, 2012 @10:40PM (#3985101)
Can't say I understood what it does from that post, so here's another description:

http://reference.sitepoint.com/css/generalsiblingselector

Re:The Tilde is an Amazing CSS Selector by latch on Wednesday May 16, 2012 @11:36PM (#3985268)
I had no idea what ~ did after reading that post. Should have simply stated that:

"The tilde (~) selector lets you target a sibling element. That is, an element that shares the same parent"

Could then explain how it's different than the + selector.

"This differs from the + selector which will only find an adjacent sibling (immediately following)."

I'd consider comparing it to the child and descendant selector, if I could word it properly. This is what I have which I'm not happy with:

"In some ways, the differences between + and ~ are like the differences between the child selector (>) and the descendant selector (a space), in that #header > a will only a elements directly under #header, while header a will target all a elements under #header, regardless of depth.

Re:The Tilde is an Amazing CSS Selector by alanh on Thursday May 17, 2012 @01:08AM (#3985535)
“…sibling element. That is, an element that shares the same parent.”

Unfortunately, that is not true. It only matches following siblings.

See my JSFiddle demo: http://jsfiddle.net/alanhogan/sSVCG/

(Also, HTML comments between elements apparently mess up IE7 and IE8.)

Re:The Tilde is an Amazing CSS Selector by StavrosK on Thursday May 17, 2012 @05:23AM (#3986148)
"+ will select the immediately following sibling, ~ will select any (one?) subsequent sibling" is plenty clear, I think?
Re:The Tilde is an Amazing CSS Selector by neduma on Thursday May 17, 2012 @12:15AM (#3985380)
This is far better then original article. +1
Re:The Tilde is an Amazing CSS Selector by bstar77 on Wednesday May 16, 2012 @11:29PM (#3985238)
It looks like it's just taking the place of having to attach an event to the radio button, doing a lookup on the sibling #find_me element and manipulating it's style via JS.

These types of things are great, the more we move away from JS DOM hacks the better.

Re:The Tilde is an Amazing CSS Selector by freditup on Wednesday May 16, 2012 @11:27PM (#3985232)
Thanks, I was confused too :D