1// Extra small devices (portrait phones, less than 576px)
2// No media query for `xs` since this is the default in Bootstrap
3
4// Small devices (landscape phones, 576px and up)
5@media (min-width: 576px) { ... }
6
7// Medium devices (tablets, 768px and up)
8@media (min-width: 768px) { ... }
9
10// Large devices (desktops, 992px and up)
11@media (min-width: 992px) { ... }
12
13// Extra large devices (large desktops, 1200px and up)
14@media (min-width: 1200px) { ... }
1// Best Practice suggests
2// keep default style for smallest screen size (portrait mobile, below 576px)
3// and then proceed in assending order with media query like below
4
5// Small devices (landscape phones, 576px and above till next break point)
6@media (min-width: 576px) { ... }
7
8// Medium devices (tablets, 768px and above till next break point)
9@media (min-width: 768px) { ... }
10
11// Large devices (desktops, 992px and above till next break point)
12@media (min-width: 992px) { ... }
13
14// so on ...
15
1/* Answer to: "bootstrap media queries" */
2
3/*
4 Since Bootstrap is developed to be mobile first, the use a handful
5 of media queries to create sensible breakpoints for their layouts
6 and interfaces. These breakpoints are mostly based on minimum
7 viewport widths and allow scaling up elements as the viewport
8 changes.
9
10 Bootstrap primarily uses the following media query ranges—or
11 breakpoints—in their source Sass files for their layout, grid system,
12 and components.
13*/
14
15/* Extra small devices (portrait phones, less than 576px) */
16/* No media query for `xs` since this is the default in Bootstrap */`32`
17
18/* Small devices (landscape phones, 576px and up) */
19@media (min-width: 576px) { ... }
20
21/* Medium devices (tablets, 768px and up) */
22@media (min-width: 768px) { ... }
23
24/* Large devices (desktops, 992px and up) */
25@media (min-width: 992px) { ... }
26
27/* Extra large devices (large desktops, 1200px and up) */
28@media (min-width: 1200px) { ... }
1The Bootstrap grid system has four classes:
2xs (for phones - screens less than 768px wide)
3sm (for tablets - screens equal to or greater than 768px wide)
4md (for small laptops - screens equal to or greater than 992px wide)
5lg (for laptops and desktops - screens equal to or greater than 1200px wide)