A Pen by Thomas Francis Wrenn on CodePen.
Last active
August 29, 2015 14:13
-
-
Save thomaswrenn/83dd06e4d9f5f721fe27 to your computer and use it in GitHub Desktop.
GgWvLK
This file contains 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
<div class="example" id="one"> | |
<div class="parent" id="one"> | |
Parent | |
<div class="child" id="one"> | |
Child | |
<div class="grandchild" id="one"> | |
Grandchild | |
</div> | |
<div class="grandchild" id="two"> | |
Grandchild | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="example" id="two"> | |
<div class="parent" id="one"> | |
Parent | |
<div class="child" id="one"> | |
Child | |
<div class="grandchild" id="one"> | |
Grandchild | |
</div> | |
<div class="grandchild" id="two"> | |
Grandchild | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="example" id="one"> | |
<div class="parent" id="one"> | |
Parent<br/>Test | |
<div class="child" id="one"> | |
Child | |
<div class="grandchild" id="one"> | |
Grandchild | |
</div> | |
<div class="grandchild" id="two"> | |
Grandchild | |
</div> | |
</div> | |
</div> | |
</div> | |
<div class="example" id="two"> | |
<div class="parent" id="one"> | |
Parent<br/>Test | |
<div class="child" id="one"> | |
Child | |
<div class="grandchild" id="one"> | |
Grandchild | |
</div> | |
<div class="grandchild" id="two"> | |
Grandchild | |
</div> | |
</div> | |
</div> | |
</div> |
This file contains 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
#parent { | |
background: red; | |
} | |
#child { | |
background: blue; | |
} |
This file contains 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
html { | |
position: relative; | |
} | |
.example { | |
padding: 10px; | |
.parent, | |
.child, | |
.grandchild { | |
padding: 5px; | |
color: white; | |
} | |
.parent { | |
background: red; | |
position: relative; | |
} | |
.child { | |
background: blue; | |
} | |
.grandchild { | |
&#one { | |
background: #440; | |
} | |
&#two { | |
background: orange; | |
} | |
} | |
&#one { | |
.child { | |
/* position: relative;*/ | |
.grandchild { | |
&#one {} | |
&#two { | |
position: absolute; | |
top: 70px; | |
} | |
} | |
} | |
} | |
&#two { | |
.child { | |
position: relative; | |
.grandchild { | |
&#one {} | |
&#two { | |
position: absolute; | |
top: 50px; | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment