Skip to content

Instantly share code, notes, and snippets.

@csakiistvan
Forked from adamstac/_font-smoothing.scss
Created April 26, 2014 05:54
Show Gist options
  • Save csakiistvan/11312803 to your computer and use it in GitHub Desktop.
Save csakiistvan/11312803 to your computer and use it in GitHub Desktop.
// WebKit font-smoothing
//------------------------------------------------
// References:
//
// 1. http://maxvoltar.com/sandbox/fontsmoothing/
// 2. http://maxvoltar.com/archive/-webkit-font-smoothing
//
// Values: none, antialiased (default), subpixel-antialiased
//
@mixin font-smoothing($value: antialiased) {
@if $value == antialiased {
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
}
@else {
-webkit-font-smoothing: subpixel-antialiased;
-moz-osx-font-smoothing: auto;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment