Reset the field and add for each item. The most effective way

I’ve lost my mind on most CSS reset stylesheets (e.g. Eric Mayer worksheet , Yahoo reset). They essentially all do the same thing. However, what is the most efficient way to select each item on a page?

html, body, div, span, applet, object, iframe,
h1, h2, h3, h4, h5, h6, p, blockquote, pre,
a, abbr, acronym, address, big, cite, code,
del, dfn, em, img, ins, kbd, q, s, samp,
small, strike, strong, sub, sup, tt, var,
b, u, i, center,
dl, dt, dd, ol, ul, li,
fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td,
article, aside, canvas, details, embed, 
figure, figcaption, footer, header, hgroup, 
menu, nav, output, ruby, section, summary,
time, mark, audio, video { margin: 0; padding: 0; }

against

* { margin: 0; padding: 0 }

I can say intuitively that this is the last, but all these reset sheets use the first.

+5
source share
3 answers

I would agree that the Asterisk will be the most effective. However, after some research, I found another post on this site about how harmful it is to use an asterisk.

(why) is a CSS starlet selector considered harmful?

+2

, * {}, css ( 20 30 ( ) html, , , , *, node ?

0

This is not a performance issue, this is compatibility. You will notice that not all HTML elements are included in this list. It is noteworthy that form elements such as radioand textareaare not included. This is due to the fact that it is incompatible with how the response and margin are applied to these elements, depending on the platform, therefore it is better to leave the default values ​​in these cases. I found this forum topic that contains links to some discussions on this issue.

0
source

All Articles