Skip to content

Instantly share code, notes, and snippets.

@denniarems
Created July 9, 2019 12:02
Show Gist options
  • Save denniarems/89b53f94daa6cc0c953c828ad1ec5f6e to your computer and use it in GitHub Desktop.
Save denniarems/89b53f94daa6cc0c953c828ad1ec5f6e to your computer and use it in GitHub Desktop.
@mixin respond($breakpoint) {
@if $breakpoint==mobile {
@media only screen and (min-device-width: 375px) and (max-device-width: 667px) and (-webkit-min-device-pixel-ratio: 2) {
@content;
}
}
@if $breakpoint==tab {
@media (min-device-width: 668px) and (max-device-width: 1024px) {
@content;
}
}
@if $breakpoint==laptop {
@media screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (-webkit-min-device-pixel-ratio: 1) {
@content;
}
}
@if $breakpoint==laptop-r {
@media screen and (min-device-width: 1200px) and (max-device-width: 1600px) and (-webkit-min-device-pixel-ratio: 2) and (min-resolution: 192dpi) {
@content;
}
}
@if $breakpoint==big {
@media only screen and (min-width: 1800) {
@content;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment