Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // ==========================================================================
- // Breakpoint Mixin
- //
- // Uses Sass Maps which requires Sass v3.3.0 or newer
- //
- //
- // EXAMPLE
- //
- // body {
- // @include breakpoint(tablet){
- // font-size: 14px;
- // };
- // }
- // ==========================================================================
- $breakpoints: (
- phone: 300px,
- ipad: 768px,
- ipad-pro: 992px,
- desktop: 1200px,
- large-desktop: 1400px
- );
- @mixin breakpoint($size) {
- @each $breakpoint, $value in $breakpoints {
- @if $size == $breakpoint {
- @media (min-width: map-get($breakpoints, $breakpoint)) {
- @content;
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement