The Tilde is an Amazing CSS Selector
nicholsonws.com
The Tilde is an Amazing CSS Selector
1–10 of 31 posts
Re: The Tilde is an Amazing CSS Selector
#2Re: The Tilde is an Amazing CSS Selector
#3Can'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
#4Can't say I understood what it does from that post, so here's another description: http://reference.sitepoint.com/css/generalsiblingselector
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
#5Can't say I understood what it does from that post, so here's another description: http://reference.sitepoint.com/css/generalsiblingselector
"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
#6This post could be improved by using classes:
#container input:checked ~ .main > .findMe { ... }
But really, the sibling selector is powerful enough that you might not need classes at all. I think the following selector makes a much more powerful statement of the kind of thing you can do now that you couldn't before: input:checked ~ div span { ... }Re: The Tilde is an Amazing CSS Selector
#7Can't say I understood what it does from that post, so here's another description: http://reference.sitepoint.com/css/generalsiblingselector
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 c…
Re: The Tilde is an Amazing CSS Selector
#8Re: The Tilde is an Amazing CSS Selector
#9http://cssdeck.com/item/348/pure-css3-content-slider
http://cssdeck.com/item/308/awesome-rotating-css-image-slide...
http://cssdeck.com/item/153/solitary-css3-slider-rotation-tr...
http://cssdeck.com/item/363/simply-css-image-slide
http://cssdeck.com/item/364/pure-css3-slideshow-without-page...
Re: The Tilde is an Amazing CSS Selector
#10Am I missing something, but that isn't valid CSS. You can't have selectors inside of a selector block in CSS...