Skip to content

Instantly share code, notes, and snippets.

@tedgrubb
Last active August 29, 2015 14:05
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 tedgrubb/04dfd9e005317e33fa96 to your computer and use it in GitHub Desktop.
Save tedgrubb/04dfd9e005317e33fa96 to your computer and use it in GitHub Desktop.
SASS Property Groups
$property-groups: positioning, box-model, color, text;
@each $property-group in $property-groups {
@mixin $property-group {
@content;
}
}
.selector {
@include positioning {
position: absolute;
z-index: 10;
top: 0;
right: 0;
}
@include box-model {
display: inline-block;
box-sizing: border-box;
overflow: hidden;
width: 100px;
height: 100px;
padding: 10px;
margin: 10px;
border: 10px solid #333;
}
@include color {
color: #fff;
background: #000;
}
@include text {
font-family: sans-serif;
font-size: 16px;
line-height: 1.4;
text-align: right;
}
// Other
cursor: pointer;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment