0 points
Submitted by Jeremy Ho
about 8 years

The universal selector (*) is know to be slow

What does this warning hint in the CSS file mean?

Answer 51fd5f4a80ff339241003ea3

4 votes

Permalink

Hi.

I saw that, as well, and did a little research. It seems it used to be slow about 10 years ago, but now it isn’t as bad. Basically, the warning hint is just saying using it will slow your browser down and make your website slower.

I’m taking a web design class, and we were told to use the universal selector to reset the margin and border to 0 at the beginning of every project, and I haven’t had a problem using it with only those two values. It may make the page render more slowly if the universal selector is used too much.

Best practice is to be as specific as you can, which would really limit the number of times you would ever need to use the universal selector.

Hope that helps.

points
Submitted by Lexi13
about 8 years