Skip to content

Instantly share code, notes, and snippets.

@jhned
Last active October 19, 2015 14:49
Show Gist options
  • Save jhned/f7d1f895a8107586fafe to your computer and use it in GitHub Desktop.
Save jhned/f7d1f895a8107586fafe to your computer and use it in GitHub Desktop.
<div class="parent">
<div class="generic-child-element">
</div>
<div class="unique-child-element">
<h3 class="title">This Block's Title</h3>
</div>
<div class="another-child-element">
Some text…
</div>
</div>
.parent {
width: 50%;
float: left;
&:before, &:after {
content: "";
}
&:first-child {
color: red;
}
&:hover {
color: blue;
.generic-child-element {
display: inline-block;
}
.unique-child-element {
display: block;
}
}
&.open {
height: 100%;
.unique-child-element {
color: red;
}
.another-child-element {
color: green;
}
}
}
.parent .generic-child-element {
display:none;
}
.unique-child-element {
display: none;
//[lots of CSS lines…]
}
.another-child-element {
//[lots of CSS lines…]
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment