monkey-style-guide 21.2.11 → 21.2.13

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -36,7 +36,11 @@ $breakpoints: (
36
36
  @error "breakpoint `#{$name}` not found in `#{$breakpoints}`";
37
37
  }
38
38
 
39
- @return if($n < list.length($breakpoint-names), list.nth($breakpoint-names, $n + 1), null);
39
+ @if $n < list.length($breakpoint-names) {
40
+ @return list.nth($breakpoint-names, $n + 1);
41
+ }
42
+
43
+ @return null;
40
44
  }
41
45
 
42
46
  // Minimum breakpoint width. Null for the smallest (first) breakpoint.
@@ -45,7 +49,11 @@ $breakpoints: (
45
49
  @function breakpoint-min($name) {
46
50
  $min: map.get($breakpoints, $name);
47
51
 
48
- @return if($min != 0, $min, null);
52
+ @if $min != 0 {
53
+ @return $min;
54
+ }
55
+
56
+ @return null;
49
57
  }
50
58
 
51
59
  // Maximum breakpoint width.
@@ -59,7 +67,11 @@ $breakpoints: (
59
67
  @function breakpoint-max($name) {
60
68
  $max: map.get($breakpoints, $name);
61
69
 
62
- @return if($max and $max > 0, $max - 0.02, null);
70
+ @if $max and $max > 0 {
71
+ @return $max - 0.02;
72
+ }
73
+
74
+ @return null;
63
75
  }
64
76
 
65
77
  // Returns a blank string if smallest breakpoint, otherwise returns the name with a dash in front.
@@ -69,7 +81,11 @@ $breakpoints: (
69
81
  // >> breakpoint-infix(sm, (xs: 0, sm: 576px, md: 768px, lg: 992px, xl: 1200px, xxl: 1400px))
70
82
  // "-sm"
71
83
  @function breakpoint-infix($name) {
72
- @return if(breakpoint-min($name) == null, '', '-#{$name}');
84
+ @if not breakpoint-min($name) {
85
+ @return '';
86
+ }
87
+
88
+ @return '-#{$name}';
73
89
  }
74
90
 
75
91
  // Media of at least the minimum breakpoint width. No query for the smallest breakpoint.