css - Is it possible to nest media queries within media queries? -


is possible? seems neat solution me, i'm not sure if work.

@media screen  , (min-device-width : 320px)  , (max-device-width : 480px) {      /* code both portrait , landscape */      @media (orientation:portrait) {          /* code portrait */      }      @media (orientation:landscape) {          /* code landscape */      }  } 

you should able nest @media rules way in css3, isn't yet supported browsers. see this answer details.

you have expand , repeat top-level media queries inner rules work across browsers (and imagine scss processor generate similar):

@media screen  , (min-device-width: 320px)  , (max-device-width: 480px) {     /* code both portrait , landscape */ }  @media screen  , (min-device-width: 320px)  , (max-device-width: 480px)  , (orientation: portrait) {      /* code portrait */  }  @media screen  , (min-device-width: 320px)  , (max-device-width: 480px)  , (orientation: landscape) {      /* code landscape */  } 

Comments

Popular posts from this blog

objective c - Change font of selected text in UITextView -

php - Accessing POST data in Facebook cavas app -

c# - Getting control value when switching a view as part of a multiview -