PHPnews.io

My Custom CSS Reset

Written by Bram.us / Original link on Nov. 25, 2021

josh-custom-css-reset.png

Josh W. Comeau shares (and explains) his CSS Reset.

/*
  Josh's Custom CSS Reset
  https://www.joshwcomeau.com/css/custom-css-reset/
*/
*, *::before, *::after {
  box-sizing: border-box;
}
* {
  margin: 0;
}
html, body {
  height: 100%;
}
body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img, picture, video, canvas, svg {
  display: block;
  max-width: 100%;
}
input, button, textarea, select {
  font: inherit;
}
p, h1, h2, h3, h4, h5, h6 {
  overflow-wrap: break-word;
}
#root, #__next {
  isolation: isolate;
}

Great to put this one next to Andy’s CSS Reset and Elad’s Reset (that leverages :where()‘s special Specificity)

My Custom CSS Reset →

bram link tutorialzine gabrielaio bram

« Radix UI - ECMAScript Proposals Overview »