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 ?
all
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 .
not
only
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.
@media (min-width: 500px)
@media all and (min-width: 500px)