Skip to content

Instantly share code, notes, and snippets.

@lucaong
Created February 18, 2014 16:19
Show Gist options
  • Save lucaong/9074130 to your computer and use it in GitHub Desktop.
Save lucaong/9074130 to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.3.0.rc.4)
// Compass (v1.0.0.alpha.18)
// ----
// Start with a class .foo
%foo {
line-height: 150%;
font-size: 2em;
}
.foo {
@extend %foo;
}
// Now @extend it
@mixin green-foo {
@extend %foo;
color: green;
}
// Use the mixin somewhere
.xxx .yyy {
@include green-foo;
}
.www .zzz {
@include green-foo;
}
.xyz .vwx {
@include green-foo;
}
/*
Much better now!
*/
.abc .def .foo {
color: red;
}
.some .selector .foo, .or .some .other .selector .foo {
line-height: 2em;
}
.see .if .i .actually .style .foo .then .pretty .bad .things .happen {
background: pink;
}
.foo, .xxx .yyy, .www .zzz, .xyz .vwx {
line-height: 150%;
font-size: 2em;
}
.xxx .yyy {
color: green;
}
.www .zzz {
color: green;
}
.xyz .vwx {
color: green;
}
/*
Much better now!
*/
.abc .def .foo {
color: red;
}
.some .selector .foo, .or .some .other .selector .foo {
line-height: 2em;
}
.see .if .i .actually .style .foo .then .pretty .bad .things .happen {
background: pink;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment