Advertisement
Itssuman1808

Responsive Grid Media Queries

Jan 12th, 2022
1,223
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
CSS 2.77 KB | None | 0 0
  1. /*------------------------------------------
  2.   Responsive Grid Media Queries - 1280, 1024, 768, 480
  3.    1280-1024   - desktop (default grid)
  4.    1024-768    - tablet landscape
  5.    768-480     - tablet
  6.    480-less    - phone landscape & smaller
  7. --------------------------------------------*/
  8. @media all and (min-width: 1024px) and (max-width: 1280px) { }
  9.  
  10. @media all and (min-width: 768px) and (max-width: 1024px) { }
  11.  
  12. @media all and (min-width: 480px) and (max-width: 768px) { }
  13.  
  14. @media all and (max-width: 480px) { }
  15.  
  16. /* Small screens - MOBILE */
  17. @media only screen { } /* Define mobile styles - Mobile First */
  18.  
  19. @media only screen and (max-width: 40em) { } /* max-width 640px, mobile-only styles, use when QAing mobile issues */
  20.  
  21. /* Medium screens - TABLET */
  22. @media only screen and (min-width: 40.063em) { } /* min-width 641px, medium screens */
  23.  
  24. @media only screen and (min-width: 40.063em) and (max-width: 64em) { } /* min-width 641px and max-width 1024px, use when QAing tablet-only issues */
  25.  
  26. /* Large screens - DESKTOP */
  27. @media only screen and (min-width: 64.063em) { } /* min-width 1025px, large screens */
  28.  
  29. @media only screen and (min-width: 64.063em) and (max-width: 90em) { } /* min-width 1024px and max-width 1440px, use when QAing large screen-only issues */
  30.  
  31. /* XLarge screens */
  32. @media only screen and (min-width: 90.063em) { } /* min-width 1441px, xlarge screens */
  33.  
  34. @media only screen and (min-width: 90.063em) and (max-width: 120em) { } /* min-width 1441px and max-width 1920px, use when QAing xlarge screen-only issues */
  35.  
  36. /* XXLarge screens */
  37. @media only screen and (min-width: 120.063em) { } /* min-width 1921px, xlarge screens */
  38.  
  39. /*------------------------------------------*/
  40.  
  41.  
  42.  
  43. /* Portrait */
  44. @media screen and (orientation:portrait) { /* Portrait styles here */ }
  45. /* Landscape */
  46. @media screen and (orientation:landscape) { /* Landscape styles here */ }
  47.  
  48.  
  49. /* CSS for iPhone, iPad, and Retina Displays */
  50.  
  51. /* Non-Retina */
  52. @media screen and (-webkit-max-device-pixel-ratio: 1) {
  53. }
  54.  
  55. /* Retina */
  56. @media only screen and (-webkit-min-device-pixel-ratio: 1.5),
  57. only screen and (-o-min-device-pixel-ratio: 3/2),
  58. only screen and (min--moz-device-pixel-ratio: 1.5),
  59. only screen and (min-device-pixel-ratio: 1.5) {
  60. }
  61.  
  62. /* iPhone Portrait */
  63. @media screen and (max-device-width: 480px) and (orientation:portrait) {
  64. }
  65.  
  66. /* iPhone Landscape */
  67. @media screen and (max-device-width: 480px) and (orientation:landscape) {
  68. }
  69.  
  70. /* iPad Portrait */
  71. @media screen and (min-device-width: 481px) and (orientation:portrait) {
  72. }
  73.  
  74. /* iPad Landscape */
  75. @media screen and (min-device-width: 481px) and (orientation:landscape) {
  76. }
  77.  
  78. <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" />
  79.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement