Skip to content

Commit

Permalink
change breakpoint structure with mobile first approach
Browse files Browse the repository at this point in the history
  • Loading branch information
Maxime Daraize committed Jan 31, 2021
1 parent fe4745d commit 30a5efe
Showing 1 changed file with 15 additions and 34 deletions.
49 changes: 15 additions & 34 deletions scss/abstracts/_mixins.scss
Original file line number Diff line number Diff line change
Expand Up @@ -40,47 +40,28 @@
}

//BREAKPOINTS
$small: 600px;
$medium: 1024px;
$large: 1440px;
$xlarge: 1920px;

@mixin for($size) {
//under 480px
@if $size == mobile-only {
@media (max-width: 479px) {
@mixin breakpoint($breakpoint) {
@if $breakpoint == small {
@media (min-width: $small) {
@content;
}
//over 481px
} @else if $size == mobile {
@media (min-width: 480px) {
} @else if $breakpoint == medium {
@media (min-width: $medium) {
@content;
}
//under 767px
} @else if $size == small-only {
@media (max-width: 767px) {
} @else if $breakpoint == large {
@media (min-width: $large) {
@content;
}
//over 768px
} @else if $size == small {
@media (min-width: 768px) {
@content;
}
//under 991px
} @else if $size == medium-only {
@media (max-width: 991px) {
@content;
}
//over 992px
} @else if $size == medium {
@media (min-width: 992px) {
@content;
}
//over 1199px
} @else if $size == large-only {
@media (max-width: 1199px) {
@content;
}
//over 1200px
} @else if $size == large {
@media (min-width: 1200px) {
}
@else if $breakpoint == xlarge {
@media (min-width: $xlarge) {
@content;
}
}
}
}

0 comments on commit 30a5efe

Please sign in to comment.