14Resetting CSS

A common technique to reset a style sheet is to override all of the default styles that browsers provide before you begin styling a site. This way, you won’t accidentally assume—for instance—that all <h1> tags are the same font and font size between browsers. The default <h1> is different in Internet Explorer, Firefox, Safari… it’s so annoying! To get around this frustration, designers often employ a “reset CSS” file.

On the right, we’ve provided a Sass version of the most famous reset CSS file by Eric Meyer. It’s slightly shorter than the original CSS version.

You probably don’t want to add all that boilerplate to the top of your master style sheet, so it’s often more useful to employ the importing technique. Put the reset ...

Get Pragmatic Guide to Sass now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.