Created
June 1, 2012 05:03
-
-
Save anonymous/2848961 to your computer and use it in GitHub Desktop.
The first commented line is your dabblet’s title
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* The first commented line is your dabblet’s title | |
*/ | |
h1 span{ | |
color:Red /* I only target <span> tags nested within a h1 */ | |
} | |
h1 ~ span{ | |
color:blue /* I dont taget <span> tags nest within a h1, but any <span> tag that follows a h1 on the same nested level */ | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- | |
The H1, span and h3, are all siblings | |
The spans within the h1, and h3, and descendants of their parent tags | |
--> | |
<h1> | |
<span>I am a descendant because I am nested within the h1</span> | |
</h1> | |
<span> I am a sibling, because I am at the same nested level as the h1</span> | |
<h3> | |
<span> I am not a sibiling of the h1, but I am a decedant of the h3</span> | |
</h3> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{"view":"split","fontsize":"100","seethrough":"","prefixfree":"1","page":"all"} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment