Last active
August 29, 2015 14:06
-
-
Save markwtaylor/7ce64fce770bf14a01db to your computer and use it in GitHub Desktop.
Generated by SassMeister.com.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// ---- | |
// 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"; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* 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