Skip to content

Instantly share code, notes, and snippets.

@passcod
Created Feb 21, 2012
Embed
What would you like to do?
SCSS font-feature Mixin
@mixin font-features($features: (liga, rlig)) {
$feature_string: "";
$moz_feature_string: "";
@each $feature in $features {
$feature_string: $feature_string + " \"" + $feature + "\" 1";
$moz_feature_string: $moz_feature_string + " \"" + $feature + "=1\"";
@if nth($features, length($features)) != $feature {
$feature_string: $feature_string + ",";
$moz_feature_string: $moz_feature_string + ",";
}
}
-moz-font-features: #{$moz_feature_string};
@each $bro in ("-webkit-", "-ms-", "-o-", "") {
#{$bro}font-features: #{$feature_string};
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment