CSS Reset
Do you need a reset.css file? What should yours look like?
Why use a reset.css
Historically the main goal of a CSS reset was to ensure consistency between browsers. But in recent times the differences have drastically decreased and we might want to keep some styling like font-style: italic
for <em>
elements.
So nowadays I use a css reset to start from a blank slate, styles that would get applied to any project regardless of it’s requirements.
CSS reset examples
Different variations of a reset.css:
This is the reset.css
Josh W Comeau uses, included on his blog post are also explanations for his decisions.
The CSS reset I use
So this is my CSS reset.
Explanations and the technical details on these are further explained on the sites I’ve linked to down below in the Sources & References
part at the bottom of this page.
There are some things I also usually use like some way to set the height to fill the screen like this:
A page with helpful utility classes like these is on the CSS Utility Classes page.
Helpful Sources & References
- CSS reset tips by Kevin Powell focussed on newer css features: https://youtu.be/eWmDW4zEXt4 & https://youtu.be/cCAtD_BAHNw
- Blog post by Josh W Comeau on his CSS reset: https://www.joshwcomeau.com/css/custom-css-reset/
- Blog post by Andy Bell on his CSS reset: https://piccalil.li/blog/a-more-modern-css-reset/