Skip to content

Instantly share code, notes, and snippets.

@markwtaylor
Last active August 29, 2015 14:06
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 markwtaylor/7ce64fce770bf14a01db to your computer and use it in GitHub Desktop.
Save markwtaylor/7ce64fce770bf14a01db to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
// ----
// Sass (v3.4.4)
// Compass (v1.0.1)
// ----
/* EXAMPLE */
.benefits {
.icon {
font-family:"IconFont";
}
.benefit {
margin-right:15px;
}
.benefit-food i:before {
content: "\f2a8";
}
.benefit-merchandise i:before {
content: "\f110";
}
.benefit-credit i:before {
content: "\f349";
}
}
/* SASS REFACTOR */
.benefit {
margin-right:15px;
& > .icon {
font-family:"IconFont";
}
}
.icon:before {
.benefit-food > & {
content: "\f2a8";
}
.benefit-merchandise > & {
content: "\f110";
}
.benefit-credit > & {
content: "\f349";
}
}
/* SELECTOR REFACTOR */
.benefit {
margin-right:15px;
}
.icon {
font-family:"IconFont";
}
.icon-food:before {
content: "\f2a8";
}
.icon-merchandise:before {
content: "\f110";
}
.icon-credit:before {
content: "\f349";
}
/* EXAMPLE */
.benefits .icon { font-family: "IconFont"; }
.benefits .benefit { margin-right: 15px; }
.benefits .benefit-food i:before { content: "\f2a8"; }
.benefits .benefit-merchandise i:before { content: "\f110"; }
.benefits .benefit-credit i:before { content: "\f349"; }
/* SASS REFACTOR */
.benefit { margin-right: 15px; }
.benefit > .icon { font-family: "IconFont"; }
.benefit-food > .icon:before { content: "\f2a8"; }
.benefit-merchandise > .icon:before { content: "\f110"; }
.benefit-credit > .icon:before { content: "\f349"; }
/* SELECTOR REFACTOR */
.benefit { margin-right: 15px; }
.icon { font-family: "IconFont"; }
.icon-food:before { content: "\f2a8"; }
.icon-merchandise:before { content: "\f110"; }
.icon-credit:before { content: "\f349"; }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment