Skip to content

Instantly share code, notes, and snippets.

@fysherman
Created March 23, 2022 15:24
Show Gist options
  • Save fysherman/c418739fe4607d620b8b3e4a3d75ed47 to your computer and use it in GitHub Desktop.
Save fysherman/c418739fe4607d620b8b3e4a3d75ed47 to your computer and use it in GitHub Desktop.
Responsive mixins scss
@mixin screen($breakpoint) {
@if $breakpoint==xs {
@media screen and (max-width: 320px) {
@content;
}
}
@if $breakpoint==sm {
@media screen and (min-width: 576px) {
@content;
}
}
@if $breakpoint==md {
@media screen and (min-width: 768px) {
@content;
}
}
@if $breakpoint==lg {
@media screen and (min-width: 992px) {
@content;
}
}
@if $breakpoint==xl {
@media screen and (min-width: 1200px) {
@content;
}
}
@if $breakpoint==2xl {
@media screen and (min-width: 1400px) {
@content;
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment