css - What's a @media rule without a media type do? -
i inherited , wondering media query without "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 , (expressions) { css-code; }
if media type not explicitly given
all
. ~ w3c media queries
in other words, @media rule without media type shorthand syntax, all
implied.
more spec:
a shorthand syntax offered media queries apply media types; keyword
all
can left out (along trailingand
). i.e. if media type not explicitly givenall
.example 5
i.e. these identical:
@media , (min-width: 500px) { ... } @media (min-width: 500px) { ... }
as these:
@media (orientation: portrait) { ... } @media , (orientation: portrait) { ... }
...
example 7
i.e. these equivalent:
@media { ... } @media { ... }
Comments
Post a Comment