Skip to content

Instantly share code, notes, and snippets.

@wolffe
Last active December 30, 2015 18:59
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 wolffe/7871261 to your computer and use it in GitHub Desktop.
Save wolffe/7871261 to your computer and use it in GitHub Desktop.
CSS normalization addon (fonts, box sizing and hardware acceleration).
* {
/**
* Improve font rendering and readability/legibility on MacOS and Windows
*/
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
-moz-font-feature-settings: "liga=1, dlig=1";
-ms-font-feature-settings: "liga", "dlig";
-webkit-font-feature-settings: "liga", "dlig";
-o-font-feature-settings: "liga", "dlig";
font-feature-settings: "liga", "dlig";
/* END */
/**
* Activate hardware acceleration
*/
-webkit-transform: translate3d(0, 0, 0);
-moz-transform: translate3d(0, 0, 0);
-ms-transform: translate3d(0, 0, 0);
-o-transform: translate3d(0, 0, 0);
transform: translate3d(0, 0, 0);
-webkit-backface-visibility: hidden;
-moz-backface-visibility: hidden;
-ms-backface-visibility: hidden;
-o-backface-visibility: hidden;
backface-visibility: hidden;
-webkit-perspective: 1000;
-moz-perspective: 1000;
-ms-perspective: 1000;
-o-perspective: 1000;
perspective: 1000;
/* END */
/**
* Reset fix padding/margin/border sizing
*/
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
/* END */
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment