Skip to content

Instantly share code, notes, and snippets.

@lnfel
Forked from hsleonis/better-font-smoothing.css
Created May 21, 2021 03:27
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save lnfel/3727ed734526eb84df0430d492f33678 to your computer and use it in GitHub Desktop.
Save lnfel/3727ed734526eb84df0430d492f33678 to your computer and use it in GitHub Desktop.
Better font smoothing in cross browser
html {
/* Adjust font size */
font-size: 100%;
-webkit-text-size-adjust: 100%;
/* Font varient */
font-variant-ligatures: none;
-webkit-font-variant-ligatures: none;
/* Smoothing */
text-rendering: optimizeLegibility;
-moz-osx-font-smoothing: grayscale;
font-smoothing: antialiased;
-webkit-font-smoothing: antialiased;
text-shadow: rgba(0, 0, 0, .01) 0 0 1px;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment