You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

47 lines
1.7 KiB

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