CSS style reset

Usually, in order for the style to be the same for each browser, you see that on some sites there is something like this:

html, body, div, span, object, ... { margin: 0; padding: 0; border: 0; font-size: 100%; font: inherit; vertical-align: baseline; }

Is there a reason they are not just using:

*, html { ... }

+3
source share
2 answers

The wider the set of CSS rules, the more processing will be required to load them. The best set of rules is also the most specific.

+4
source

You can use something along the lines

* {
  margin: 0;
  padding: 0;
  ...
}

to reset everything, a big flaw, it does just that. Then the paragraphs have no spacing, etc. I would rather have a universal style without having a style starting from scratch.

, "A reset, ..."

0

All Articles