0
votes

There are bootstrap 3 media breakpoints

 /*==========  Mobile First Method  ==========*/

/* Custom, iPhone Retina */ 
@media only screen and (min-width : 320px) {

}

/* Extra Small Devices, Phones */ 
@media only screen and (min-width : 480px) {

}

/* Small Devices, Tablets */
@media only screen and (min-width : 768px) {

}

/* Medium Devices, Desktops */
@media only screen and (min-width : 992px) {

}

/* Large Devices, Wide Screens */
@media only screen and (min-width : 1200px) {

}

/*==========  Non-Mobile First Method  ==========*/

/* Large Devices, Wide Screens */
@media only screen and (max-width : 1200px) {

}

/* Medium Devices, Desktops */
@media only screen and (max-width : 992px) {

}

/* Small Devices, Tablets */
@media only screen and (max-width : 768px) {

}

/* Extra Small Devices, Phones */ 
@media only screen and (max-width : 480px) {

}

/* Custom, iPhone Retina */ 
@media only screen and (max-width : 320px) {

}

I just dont understand why in mobile first min-width and max-width in non-mobile described as equal. I mean for example min-width for tablets = 768px, so it means all widths > 768, and in max-width 768 for tablets too, but it means < 768px, it looks like range for tablets in mobile-first = 768-991px and in non-mobile 481-768

1

1 Answers

0
votes

Bootstrap and in general all media queries usually define width breakpoints with ranges. In this case, in the css you showed, breakpoints with the same header comment are synonyms.

You can define better with the two options like this (for example):

/* Extra Small Devices, Phones */ 
@media only screen and (max-width: 480px) and (min-width: 321px)  {  }

You also can use another (and the posibility to concatenate) selectors to specify the screen position or other parameters. Here are some of this:

  • height
  • orientation
  • color-index
  • monochrome
  • resolution
  • scan
  • grid