I use a compass to manage some sass files on mac osx. I have these files:
sass/ screen.scss partials folder/ ... _fonts.scss _functions.scss ...
In fonts, I have this rule that I would like to reuse @extend.
//fonts.scss .icon-ab-logo, { font-family: 'icomoon'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; -webkit-font-smoothing: antialiased; } .icon-ab-logo:before { //i want to reuse this. content: "\e000"; }
In functions, I have this screen.scss:
.logo { position: absolute; top: 0; bottom: 0px; z-index: 500; width: 9.5em; background: $logo; @include transition(all 0.2s); &:after{ @include icon( ".icon-ab-logo" ); } }
Finally, in functions.scss, I call this:
@mixin icon( $icon ){ font-family: 'icomoon'; speak: none; font-style: normal; font-weight: normal; font-variant: normal; text-transform: none; line-height: 1; -webkit-font-smoothing: antialiased; @extend
Is there a way to reference .icon-ab-logo: before using mixin? Workarounds? Thank you for reading.
source share