Skip to content

Instantly share code, notes, and snippets.

@chriseppstein
Created May 8, 2014 18:33
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 chriseppstein/95c723d3c0975a71a65e to your computer and use it in GitHub Desktop.
Save chriseppstein/95c723d3c0975a71a65e to your computer and use it in GitHub Desktop.
%relative { position: relative; }
%absolute { position: absolute; }
.something { @extend %absolute; }
.something-else { @extend %relative; }
// Given an html element with class .something and class .something-else
// The cascade will resolve to position absolute instead of position relative as you'd expect.
// This is because the position aspect of these classes is not an essential inheritance relationship.
// It is simply composition -- so only mixins should be used.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment