Skip to content

Instantly share code, notes, and snippets.

@JohnAlbin
Created September 10, 2013 12:42
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 JohnAlbin/6508879 to your computer and use it in GitHub Desktop.
Save JohnAlbin/6508879 to your computer and use it in GitHub Desktop.
Sass & Compass, Chapter 1: Design inheritance
// Sass (v3.2.10)
// Compass (v0.13.alpha.4)
.button {
padding: 2px;
border: 1px solid #666;
border-radius: 5px;
color: #000;
background-color: #00adee;
}
/* This is how inheritance works in Sass! */
.button--secondary {
@extend .button;
color: #ccc;
}
.button, .button--secondary {
padding: 2px;
border: 1px solid #666;
border-radius: 5px;
color: #000;
background-color: #00adee;
}
/* This is how inheritance works in Sass! */
.button--secondary {
color: #ccc;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment