[d565449] | 1 | // Loop over each breakpoint
|
---|
| 2 | @each $breakpoint in map-keys($grid-breakpoints) {
|
---|
| 3 |
|
---|
| 4 | // Generate media query if needed
|
---|
| 5 | @include media-breakpoint-up($breakpoint) {
|
---|
| 6 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
---|
| 7 |
|
---|
| 8 | // Loop over each utility property
|
---|
| 9 | @each $key, $utility in $utilities {
|
---|
| 10 | // The utility can be disabled with `false`, thus check if the utility is a map first
|
---|
| 11 | // Only proceed if responsive media queries are enabled or if it's the base media query
|
---|
| 12 | @if type-of($utility) == "map" and (map-get($utility, responsive) or $infix == "") {
|
---|
| 13 | @include generate-utility($utility, $infix);
|
---|
| 14 | }
|
---|
| 15 | }
|
---|
| 16 | }
|
---|
| 17 | }
|
---|
| 18 |
|
---|
| 19 | // RFS rescaling
|
---|
| 20 | @media (min-width: $rfs-mq-value) {
|
---|
| 21 | @each $breakpoint in map-keys($grid-breakpoints) {
|
---|
| 22 | $infix: breakpoint-infix($breakpoint, $grid-breakpoints);
|
---|
| 23 |
|
---|
| 24 | @if (map-get($grid-breakpoints, $breakpoint) < $rfs-breakpoint) {
|
---|
| 25 | // Loop over each utility property
|
---|
| 26 | @each $key, $utility in $utilities {
|
---|
| 27 | // The utility can be disabled with `false`, thus check if the utility is a map first
|
---|
| 28 | // Only proceed if responsive media queries are enabled or if it's the base media query
|
---|
| 29 | @if type-of($utility) == "map" and map-get($utility, rfs) and (map-get($utility, responsive) or $infix == "") {
|
---|
| 30 | @include generate-utility($utility, $infix, true);
|
---|
| 31 | }
|
---|
| 32 | }
|
---|
| 33 | }
|
---|
| 34 | }
|
---|
| 35 | }
|
---|
| 36 |
|
---|
| 37 |
|
---|
| 38 | // Print utilities
|
---|
| 39 | @media print {
|
---|
| 40 | @each $key, $utility in $utilities {
|
---|
| 41 | // The utility can be disabled with `false`, thus check if the utility is a map first
|
---|
| 42 | // Then check if the utility needs print styles
|
---|
| 43 | @if type-of($utility) == "map" and map-get($utility, print) == true {
|
---|
| 44 | @include generate-utility($utility, "-print");
|
---|
| 45 | }
|
---|
| 46 | }
|
---|
| 47 | }
|
---|