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:

2. media queries

a shorthand syntax offered media queries apply media types; keyword all can left out (along trailing and). i.e. if media type not explicitly given all.

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 { ... } 

source: https://www.w3.org/tr/css3-mediaqueries/#media0


Comments

Popular posts from this blog

gridview - Yii2 DataPorivider $totalSum for a column -

java - Suppress Jboss version details from HTTP error response -

Sass watch command compiles .scss files before full sftp upload -