Skip to content

Instantly share code, notes, and snippets.

@alice-liu
Created December 20, 2013 01:31
Show Gist options
  • Save alice-liu/8049140 to your computer and use it in GitHub Desktop.
Save alice-liu/8049140 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
.parent
.child boo
.child baz
.foo
.child blah
.child
bar
// ----
// Sass (v3.3.0.rc.1)
// Compass (v0.13.alpha.10)
// ----
// Sibling selector diff
.child {
~ .child {
color: blue;
}
+ .child {
color: red;
}
}
.child ~ .child {
color: blue;
}
.child + .child {
color: red;
}
<div class='parent'>
<div class='child'>boo</div>
<div class='child'>baz</div>
<div class='foo'>
<div class='child'>blah</div>
</div>
<div class='child'>
bar
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment