Skip to content

Instantly share code, notes, and snippets.

@lgraubner
Last active January 23, 2018 19:51
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 lgraubner/6641753089d88dbb54cd00d5dab8eb61 to your computer and use it in GitHub Desktop.
Save lgraubner/6641753089d88dbb54cd00d5dab8eb61 to your computer and use it in GitHub Desktop.
CSS in JS base styles
html {
box-sizing: border-box;
font-size: 100%;
}
*,
*:before,
*:after {
box-sizing: inherit;
}
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
-webkit-font-smoothing: antialiased;
-mox-osx-font-smoothing: grayscale;
text-rendering: optimize-legibility;
}
const base = () => ({
html {
boxSizing: 'border-box',
fontSize: '100%'
},
[`*, *:after, *:before`] {
boxSizing: inherit
},
body {
fontFamily: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol"',
'-webkit-font-smoothing': 'antialiased',
'-moz-osx-font-smoothing': 'grayscale',
textRendering: optimizeLegibility
}
})
export default base
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment