Skip to content

Instantly share code, notes, and snippets.

@tomhodgins
Last active September 3, 2019 20:07
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 tomhodgins/37eb3839190f647d1059dcf0aff492a6 to your computer and use it in GitHub Desktop.
Save tomhodgins/37eb3839190f647d1059dcf0aff492a6 to your computer and use it in GitHub Desktop.
Generate a simple reset/preset for an element and it's children. Run with node, supply your selector as the command line argument.
let selector
// Deno CLI support
if (typeof Deno !== 'undefined') {
[selector] = Deno.args.slice(1)
}
// Node CLI support
if (typeof process !== 'undefined') {
[selector] = process.argv.slice(2)
}
console.log(`
${selector || 'selector'},
${selector || 'selector'} * {
box-sizing: border-box;
text-rendering: optimizeLegibility;
-webkit-font-smoothing: antialiased;
-moz-osx-font-smoothing: grayscale;
font-kerning: auto;
}
`.trim())
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment