Debian Codegraph @

sass-spec/spec/libsass-closed-issues/issue_1644/complex/input.scss

raw
1 $tablet-portrait: 768px;
2 $tablet-landscape: 980px;
3 $desk-normal: 1120px;
4 $desk-big: 1280px;
5 $grid-breakpoints-immobile: (
6 'tablet-portrait': '(min-width: ' + $tablet-portrait + ') and (max-width: ' + $tablet-landscape + ')',
7 'tablet-landscape': '(min-width: ' + $tablet-landscape + ') and (max-width: ' + $desk-normal + ')',
8 'desk-normal': '(min-width: ' + $desk-normal + ') and (max-width: ' + $desk-big + ')',
9 'desk-big': '(min-width: ' + $desk-big + ')'
10 );
11 @mixin grid-media-query($media-query, $breakpointDefinitions) {
12 $breakpoint-found: false;
13
14 @each $breakpoint, $breakpointvalue in $breakpointDefinitions{
15 $name: $breakpoint;
16 $declaration: $breakpointvalue;
17
18 @if $media-query == $name and $declaration{
19 $breakpoint-found: true;
20
21 @media only screen and #{$declaration} {
22 @content;
23 }
24 }
25 }
26 }
27
28 @each $name in map-keys($grid-breakpoints-immobile) {
29 @include grid-media-query($name, $grid-breakpoints-immobile) {
30 body.immobile & {
31 margin-bottom: 0;
32 }
33 }
34 }