Skip to content

Instantly share code, notes, and snippets.

@drocarmo
Created July 18, 2014 19:45
Show Gist options
  • Save drocarmo/b442959973c6ba7afd76 to your computer and use it in GitHub Desktop.
Save drocarmo/b442959973c6ba7afd76 to your computer and use it in GitHub Desktop.
font rendering in OSX
// 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