Skip to content

Instantly share code, notes, and snippets.

@krry
Last active February 19, 2018 00:31
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 krry/5559f5fd12fab0e94ba82067d4b12388 to your computer and use it in GitHub Desktop.
Save krry/5559f5fd12fab0e94ba82067d4b12388 to your computer and use it in GitHub Desktop.
Global Preset Styles for Each and Every Web App/Page/Site
* {
/* de-pixelates light text on dark backgrounds */
-moz-osx-font-smoothing: grayscale;
-webkit-font-smoothing: subpixel-antialiased;
text-rendering: geometricPrecision;
/* optimizeSpeed turns kerning & ligatures off, optimizeLegibility turns them on */
/* geometricPrecision prevents browsers from rounding partial font sizes */
}
*,
*::before,
*::after {
box-sizing: border-box; /* a more intuitive box model, padding pushes in and doesn't add to width or height */
}
html {
font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
-webkit-text-size-adjust: 100%; /* stops iOS Safari from normalizing small fonts */
}
body {
margin: 0; /* full bleed!!! */
}
/* if you want a sub-element of the body to scroll with similar inertia on all touchscreens */
.scroll-smooth {
overflow-y: scroll;
-webkit-overflow-scrolling: touch;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment