Skip to content

Instantly share code, notes, and snippets.

@koycarraway
Last active August 29, 2015 14:04
Show Gist options
  • Save koycarraway/cc5e08c042d425e3fd0e to your computer and use it in GitHub Desktop.
Save koycarraway/cc5e08c042d425e3fd0e to your computer and use it in GitHub Desktop.
Font rendering on OS X
// Mixin
@mixin font-smoothing($value: on) {
@if $value == on {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@else {
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: auto;
}
}
// Usage
.dark-on-light {
@include font-smoothing(off);
}
.light-on-dark {
@include font-smoothing(on);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment