@razerspine/pug-ui-kit 1.2.1 → 1.3.0

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.
@@ -1,3 +1,4 @@
1
+ @use "sass:map";
1
2
  @use '../settings/index' as *;
2
3
 
3
4
  .layout {
@@ -14,7 +15,7 @@
14
15
  font-size: $base-font-size;
15
16
  font-weight: 400;
16
17
  line-height: 1.5;
17
- @media screen and (min-width: map-get($breakpoints, lg)) {
18
+ @media screen and (min-width: map.get($breakpoints, lg)) {
18
19
  grid-template-areas:
19
20
  'header header header header'
20
21
  'gutter-left aside main gutter-right'
@@ -1,3 +1,6 @@
1
+ @use "sass:map";
2
+ @use "sass:meta";
3
+
1
4
  $space-scale: (
2
5
  0: 0,
3
6
  1: 4px,
@@ -10,9 +13,9 @@ $space-scale: (
10
13
  );
11
14
 
12
15
  @function space($key) {
13
- @return map-get($space-scale, $key);
16
+ @return map.get($space-scale, $key);
14
17
  }
15
18
 
16
19
  @function suf($k) {
17
- @return if(type-of($k) == 'number', $k, $k);
20
+ @return $k;
18
21
  }
@@ -1,7 +1,8 @@
1
+ @use "sass:map";
1
2
  @use '../settings/index' as *;
2
3
 
3
4
  @function breakpoint($key) {
4
- @return map-get($breakpoints, $key);
5
+ @return map.get($breakpoints, $key);
5
6
  }
6
7
 
7
8
  @mixin respond-to($key) {
@@ -1,5 +1,7 @@
1
1
  @use 'sass:math';
2
2
  @use 'helpers';
3
+ @use "sass:map";
4
+ @use "sass:meta";
3
5
 
4
6
  // SPACING utilities: m- p- (margin/padding) with directions
5
7
  $space-map: (0: 0rem, 1: 0.5rem, 2: 1rem, 3: 1.5rem, 4: 2rem);
@@ -7,8 +9,8 @@ $directions: ("" : "", t: "-top", r: "-right", b: "-bottom", l: "-left", x: ("-l
7
9
  $scales: 0 1 2 3 4;
8
10
 
9
11
  @function helpers-space($key) {
10
- @if map-has-key($space-map, $key) {
11
- @return map-get($space-map, $key);
12
+ @if map.has-key($space-map, $key) {
13
+ @return map.get($space-map, $key);
12
14
  } @else {
13
15
  @warn "Unknown spacing key `#{$key}`. Returning 0rem.";
14
16
  @return 0rem;
@@ -17,33 +19,45 @@ $scales: 0 1 2 3 4;
17
19
 
18
20
  @each $d, $prop in $directions {
19
21
  @each $s in $scales {
20
- // Margin class
21
- $m-class: if($d == "", ".m-#{$s}", ".m-#{$d}-#{$s}");
22
- #{$m-class} {
23
- @if $d == "" {
22
+
23
+ // =====================
24
+ // Margin
25
+ // =====================
26
+ @if $d == "" {
27
+ .m-#{$s} {
24
28
  margin: helpers-space($s);
25
- } @else if type-of($prop) == 'list' {
26
- @each $p in $prop {
27
- margin#{$p}: helpers-space($s);
29
+ }
30
+ } @else {
31
+ .m-#{$d}-#{$s} {
32
+ @if meta.type-of($prop) == 'list' {
33
+ @each $p in $prop {
34
+ margin#{$p}: helpers-space($s);
35
+ }
36
+ } @else {
37
+ margin#{$prop}: helpers-space($s);
28
38
  }
29
- } @else {
30
- margin#{$prop}: helpers-space($s);
31
39
  }
32
40
  }
33
41
 
34
- // Padding class
35
- $p-class: if($d == "", ".p-#{$s}", ".p-#{$d}-#{$s}");
36
- #{$p-class} {
37
- @if $d == "" {
42
+ // =====================
43
+ // Padding
44
+ // =====================
45
+ @if $d == "" {
46
+ .p-#{$s} {
38
47
  padding: helpers-space($s);
39
- } @else if type-of($prop) == 'list' {
40
- @each $p in $prop {
41
- padding#{$p}: helpers-space($s);
48
+ }
49
+ } @else {
50
+ .p-#{$d}-#{$s} {
51
+ @if meta.type-of($prop) == 'list' {
52
+ @each $p in $prop {
53
+ padding#{$p}: helpers-space($s);
54
+ }
55
+ } @else {
56
+ padding#{$prop}: helpers-space($s);
42
57
  }
43
- } @else {
44
- padding#{$prop}: helpers-space($s);
45
58
  }
46
59
  }
60
+
47
61
  }
48
62
  }
49
63