Skip to content

Instantly share code, notes, and snippets.

@hsleonis
Last active June 13, 2024 18:26
Show Gist options
  • Save hsleonis/55712b0eafc9b25f1944 to your computer and use it in GitHub Desktop.
Save hsleonis/55712b0eafc9b25f1944 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;
}
@CorinLUSI
Copy link

would this still be considered the best cross browser font smoothing?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment