Skip to content

Instantly share code, notes, and snippets.

@kawsarahmedr
Last active January 9, 2024 06:59
Show Gist options
  • Save kawsarahmedr/67e796aaef3f7772a48618ddf98e4804 to your computer and use it in GitHub Desktop.
Save kawsarahmedr/67e796aaef3f7772a48618ddf98e4804 to your computer and use it in GitHub Desktop.
The Stndard Respoonsive Breakpoints in CSS | Breakpoints are customizable widths that determine how your responsive layout behaves across device or viewport sizes.
// Breakpoints:
// Breakpoints are customizable widths that determine how your responsive layout behaves across device or viewport sizes.
// Min-Width: These Sass mixins translate in our compiled CSS using the values declared in our Sass variables.
// For example:
// Small devices (landscape phones, 576px and up)
@media (min-width: 576px) { ... }
// Medium devices (tablets, 768px and up)
@media (min-width: 768px) { ... }
// Large devices (desktops, 992px and up)
@media (min-width: 992px) { ... }
// X-Large devices (large desktops, 1200px and up)
@media (min-width: 1200px) { ... }
// XX-Large devices (larger desktops, 1400px and up)
@media (min-width: 1400px) { ... }
// Max-Width: These mixins take those declared breakpoints, subtract .02px from them, and use them as our max-width values.
// For example:
// `sm` applies to x-small devices (portrait phones, less than 576px)
@media (max-width: 575.98px) { ... }
// `md` applies to small devices (landscape phones, less than 768px)
@media (max-width: 767.98px) { ... }
// `lg` applies to medium devices (tablets, less than 992px)
@media (max-width: 991.98px) { ... }
// `xl` applies to large devices (desktops, less than 1200px)
@media (max-width: 1199.98px) { ... }
// `xxl` applies to x-large devices (large desktops, less than 1400px)
@media (max-width: 1399.98px) { ... }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment