/home GitHub 12★
7

Normalize CSS

Each browser provides a set of default styles which are applied for every web page it renders. The default style sheet is also known as the user-agent style sheet. For example, here is the default styles provided by popular browsers:

Since they aren't the same as each other, a web page looks differently on each browser. Normalizing CSS is a technique to fix the issue. It tries to make the default styles of native elements consistently cross browsers.

For example, we can use the HTML 5 hidden attribute to hide an element completely:

<input type="text" hidden />

However, the attribute isn't supported on IE 10. So we should include the following declaration:

[hidden] {
display: none;
}

normalize.css is a popular library providing these kinds of fixes. If you take a look at its source code, you'll realize that there are lot of bug fixes for different browsers such as IE, Chrome, Firefox, Safari there.

Popular CSS libraries include or build their normalized CSS on top of normalize.css, for example:

Follow me on and to get more useful contents.