Skip to content

Instantly share code, notes, and snippets.

@hagenburger
Created July 8, 2014 16:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hagenburger/349f35994a3050552a58 to your computer and use it in GitHub Desktop.
Save hagenburger/349f35994a3050552a58 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.9)
// Compass (v1.0.0.alpha.20)
// Compass Placeholders (v1.1.1)
// ----
@import "compass";
@import "compass-placeholders";
// @extend helps, when all properties
// can be combined in one selector:
.good-example-2 {
@extend %display-none;
}
.good-example-2 {
color: black;
display: none;
font-size: 2em;
.parent:hover & {
@extend %display-none;
}
}
// When only few properties can be combined,
// @extend is usually a bad idea:
.bad-example {
@extend %display-none;
font-size: 2em;
}
.good-example-2, .parent:hover .good-example-2, .bad-example {
display: none;
}
.good-example-2 {
color: black;
display: none;
font-size: 2em;
}
.bad-example {
font-size: 2em;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment