Reputation: 888
I inherited this and was wondering what does a media query without a "media type" do?
@media (min-width: 768px) {
.commentlist-item .commentlist-item {
padding: 0 0 0 2em;
}
}
Standard syntax per www.w3schools.com/css/css3_mediaqueries.asp
@media not|only mediatype and (expressions) {
CSS-Code;
}
Upvotes: 9
Views: 1550
Reputation: 371173
If the media type is not explicitly given it is
all
. ~ W3C Media Queries
In other words, an @media rule without a media type is shorthand syntax, where all
is implied.
More from the spec:
A shorthand syntax is offered for media queries that apply to all media types; the keyword
all
can be left out (along with the trailingand
). I.e. if the media type is not explicitly given it isall
.EXAMPLE 5
I.e. these are identical:
@media all and (min-width: 500px) { ... } @media (min-width: 500px) { ... }
As are these:
@media (orientation: portrait) { ... } @media all and (orientation: portrait) { ... }
...
EXAMPLE 7
I.e. these are equivalent:
@media all { ... } @media { ... }
Upvotes: 13