What is the advantage of using “everything” in a media query?

What's the difference between

@media all and (min-width: 500px) { // some css } 

and

 @media (min-width: 500px) { // some css } 

Quite often, I see the first declaration, but is there any benefit in including all ?

+7
css media-queries
source share
1 answer

There is no use. According to MDN :

If you do not use not or only statements, the media type is optional and the type is all .

The type is all , therefore @media (min-width: 500px) interpreted as @media all and (min-width: 500px) , and both statements are equivalent. The latter is just uselessly specific.

+4
source share

All Articles