@terrahq/design-system 0.0.4 → 0.0.6

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.
Files changed (64) hide show
  1. package/README.md +58 -1
  2. package/package.json +1 -1
  3. package/src/index.html +46 -33
  4. package/src/scss/framework/_var/_vars.scss +95 -0
  5. package/src/scss/framework/foundation/_foundation.scss +36 -0
  6. package/src/scss/framework/foundation/background/_background.scss +8 -0
  7. package/src/scss/framework/foundation/color/_color.scss +8 -0
  8. package/src/scss/framework/foundation/font/_font.scss +27 -0
  9. package/src/scss/framework/foundation/font/_make-font.scss +55 -0
  10. package/src/scss/framework/foundation/gap/{gap.scss → _gap.scss} +2 -4
  11. package/src/scss/framework/foundation/gap/_make-gap.scss +29 -0
  12. package/src/scss/framework/foundation/grid/_columns.scss +115 -0
  13. package/src/scss/framework/foundation/grid/_container.scss +17 -0
  14. package/src/scss/framework/foundation/grid/_grid.scss +3 -0
  15. package/src/scss/framework/foundation/grid/_make-columns.scss +28 -0
  16. package/src/scss/framework/foundation/grid/_make-container.scss +33 -0
  17. package/src/scss/framework/foundation/grid/_make-row.scss +20 -0
  18. package/src/scss/framework/foundation/grid/_row.scss +9 -0
  19. package/src/scss/framework/foundation/reset/{reset.scss → _reset.scss} +19 -12
  20. package/src/scss/framework/{_mixins/foundation/section/_section.scss → foundation/section/_make-section.scss} +2 -0
  21. package/src/scss/framework/foundation/section/{section.scss → _section.scss} +2 -0
  22. package/src/scss/framework/foundation/spaces/_make-spaces.scss +29 -0
  23. package/src/scss/framework/foundation/spaces/_spaces.scss +17 -0
  24. package/src/scss/framework/utilities/_align-items.scss +39 -0
  25. package/src/scss/framework/utilities/_aspect-ratio.scss +55 -0
  26. package/src/scss/framework/utilities/_display.scss +45 -0
  27. package/src/scss/framework/utilities/_flex-direction.scss +40 -0
  28. package/src/scss/framework/utilities/{flex-wrap.scss → _flex-wrap.scss} +2 -0
  29. package/src/scss/framework/utilities/_font-style.scss +38 -0
  30. package/src/scss/framework/utilities/_font-weight.scss +45 -0
  31. package/src/scss/framework/utilities/_height.scss +46 -0
  32. package/src/scss/framework/utilities/{justify-content.scss → _justify-content.scss} +19 -7
  33. package/src/scss/framework/utilities/_order.scss +38 -0
  34. package/src/scss/framework/utilities/{overflow.scss → _overflow.scss} +13 -2
  35. package/src/scss/framework/utilities/{position.scss → _position.scss} +17 -4
  36. package/src/scss/framework/utilities/_spacing.scss +67 -0
  37. package/src/scss/framework/utilities/_text-align.scss +40 -0
  38. package/src/scss/framework/utilities/_utilities.scss +15 -0
  39. package/src/scss/framework/utilities/_width.scss +46 -0
  40. package/src/scss/index.scss +2 -6
  41. package/src/scss/framework/_mixins/_mixins.scss +0 -6
  42. package/src/scss/framework/_mixins/foundation/aspect-ratio/_ar.scss +0 -64
  43. package/src/scss/framework/_mixins/foundation/gap/_gap.scss +0 -28
  44. package/src/scss/framework/_mixins/foundation/grid/_columns.scss +0 -23
  45. package/src/scss/framework/_mixins/foundation/grid/_container.scss +0 -17
  46. package/src/scss/framework/_mixins/foundation/grid/_grid.scss +0 -3
  47. package/src/scss/framework/_mixins/foundation/grid/_row.scss +0 -8
  48. package/src/scss/framework/_mixins/foundation/spaces/_spaces.scss +0 -24
  49. package/src/scss/framework/_vars/_vars.scss +0 -114
  50. package/src/scss/framework/foundation/aspect-ratio/aspect-ratio.scss +0 -32
  51. package/src/scss/framework/foundation/background/background.scss +0 -5
  52. package/src/scss/framework/foundation/color/color.scss +0 -6
  53. package/src/scss/framework/foundation/foundation.scss +0 -41
  54. package/src/scss/framework/foundation/grid/columns.scss +0 -90
  55. package/src/scss/framework/foundation/grid/container.scss +0 -17
  56. package/src/scss/framework/foundation/grid/grid.scss +0 -3
  57. package/src/scss/framework/foundation/grid/row.scss +0 -12
  58. package/src/scss/framework/foundation/spacing/spacing.scss +0 -42
  59. package/src/scss/framework/utilities/align-items.scss +0 -29
  60. package/src/scss/framework/utilities/display.scss +0 -34
  61. package/src/scss/framework/utilities/font-style.scss +0 -52
  62. package/src/scss/framework/utilities/font-weight.scss +0 -32
  63. package/src/scss/framework/utilities/text-align.scss +0 -29
  64. package/src/scss/framework/utilities/utilities.scss +0 -9
@@ -1,3 +1,8 @@
1
+ @use "sass:map";
2
+ @use "@scss/framework/_var/_vars.scss" as *;
3
+ @use "@scss/framework/foundation/background/background.scss" as *;
4
+ @use "@scss/framework/foundation/color/color.scss" as *;
5
+
1
6
  *,
2
7
  *::before,
3
8
  *::after {
@@ -6,27 +11,28 @@
6
11
  padding: 0;
7
12
  border: none;
8
13
  scroll-behavior: smooth;
9
- font-synthesis: none;
10
14
  }
11
15
 
12
16
  :focus {
13
17
  outline: 0;
14
18
  }
15
19
  *:focus-visible {
16
- outline: 1px solid map-get($color-options, c);
20
+ outline: 1px solid map.get($color-options, a);
17
21
  }
18
22
 
19
- html {
23
+ html,
24
+ body {
20
25
  overscroll-behavior: none;
26
+ }
27
+ html {
21
28
  font-size: 16px;
22
29
  }
23
-
24
30
  body {
25
- overflow: clip;
31
+ @extend .f--background-b;
32
+ @extend .f--color-a;
33
+ font-synthesis: none;
26
34
  }
27
35
 
28
-
29
-
30
36
  b,
31
37
  strong {
32
38
  font-weight: 600;
@@ -95,7 +101,7 @@ button {
95
101
  // remove dotted outline/border in Firefox
96
102
  select:-moz-focusring {
97
103
  color: transparent !important;
98
- text-shadow: 0 0 0 $color-c !important;
104
+ text-shadow: 0 0 0 map.get($color-options, a) !important;
99
105
  }
100
106
 
101
107
  input:-webkit-autofill,
@@ -107,8 +113,9 @@ textarea:-webkit-autofill:focus,
107
113
  select:-webkit-autofill,
108
114
  select:-webkit-autofill:hover,
109
115
  select:-webkit-autofill:focus {
110
- -webkit-text-fill-color: map-get($color-options, b);
111
- color: map-get($color-options, b);
112
- -webkit-box-shadow: 0 0 0px 1000px map-get($color-options, a) inset;
116
+ border: 1px solid map.get($color-options, b);
117
+ -webkit-text-fill-color: map.get($color-options, b);
118
+ color: map.get($color-options, b);
119
+ -webkit-box-shadow: 0 0 0px 1000px #fff inset;
113
120
  transition: background-color 5000s ease-in-out 0s;
114
- }
121
+ }
@@ -1,3 +1,5 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
1
3
  @mixin make-section-a() {
2
4
  padding: $measure*15 0;
3
5
 
@@ -1,3 +1,5 @@
1
+ @use "@scss/framework/foundation/section/make-section" as *;
2
+
1
3
  .f--section-a {
2
4
  @include make-section-a();
3
5
  }
@@ -0,0 +1,29 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ @mixin make-sp-a {
4
+ margin-bottom: $measure * 10;
5
+ @media all and ($viewport-type: $tablets) {
6
+ margin-bottom: $measure * 7;
7
+ }
8
+ }
9
+
10
+ @mixin make-sp-b {
11
+ margin-bottom: $measure * 7;
12
+ @media all and ($viewport-type: $tablets) {
13
+ margin-bottom: $measure * 4;
14
+ }
15
+ }
16
+
17
+ @mixin make-sp-c {
18
+ margin-bottom: $measure * 4;
19
+ @media all and ($viewport-type: $tablets) {
20
+ margin-bottom: $measure * 3;
21
+ }
22
+ }
23
+
24
+ @mixin make-sp-d {
25
+ margin-bottom: $measure * 3;
26
+ @media all and ($viewport-type: $tablets) {
27
+ margin-bottom: $measure * 3;
28
+ }
29
+ }
@@ -0,0 +1,17 @@
1
+ @use "@scss/framework/foundation/spaces/make-spaces" as *;
2
+
3
+ .f--sp-a {
4
+ @include make-sp-a();
5
+ }
6
+
7
+ .f--sp-b {
8
+ @include make-sp-b();
9
+ }
10
+
11
+ .f--sp-c {
12
+ @include make-sp-c();
13
+ }
14
+
15
+ .f--sp-d {
16
+ @include make-sp-d();
17
+ }
@@ -0,0 +1,39 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $align-items-values:(
4
+ baseline: baseline,
5
+ // stretch:stretch,
6
+ flex-start:flex-start,
7
+ flex-end:flex-end,
8
+ center:center
9
+ );
10
+
11
+ $align-items-breakpoints: (
12
+ all: $all,
13
+ desktop: $desktop,
14
+ laptop: $laptop,
15
+ tabletl: $tabletl,
16
+ tabletm: $tabletm,
17
+ tablets: $tablets,
18
+ mobile: $mobile,
19
+ );
20
+
21
+ @mixin align-items-utility($align-prop,$breakpoints){
22
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
23
+ @each $name, $property in $align-prop {
24
+ $class-name: if($breakpoint-name == all, "", "-#{$breakpoint-name}");
25
+ .u--align-items#{$class-name}-#{$name}{
26
+ @if($breakpoint-value == 0) {
27
+ align-items: $property;
28
+ } @else {
29
+ @media screen and ($viewport-type: $breakpoint-value) {
30
+ align-items: $property;
31
+ }
32
+ }
33
+
34
+ }
35
+ }
36
+ }
37
+ }
38
+
39
+ @include align-items-utility($align-items-values,$align-items-breakpoints)
@@ -0,0 +1,55 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ @mixin make-ar($size: default) {
4
+ display: block;
5
+ width: 100%;
6
+ height: auto;
7
+ object-fit: cover;
8
+ @if $size == "default" {
9
+ } @else {
10
+ aspect-ratio: $size;
11
+ }
12
+ }
13
+
14
+ $ar-sizes: (
15
+ a: 1.77777777, //* 16/9
16
+ b: 1.33333333, //* 4/3
17
+ c: 1.5, //* 3/2
18
+ d: 1, //* 1/1
19
+ e: 0.75, //* 3/4
20
+ f: 0.33333333, //* 1/3
21
+ );
22
+ $ar-breakpoints: (
23
+ all: $all,
24
+ desktop: $desktop,
25
+ laptop: $laptop,
26
+ tabletl: $tabletl,
27
+ tabletm: $tabletm,
28
+ tablets: $tablets,
29
+ mobile: $mobile,
30
+ );
31
+
32
+ @mixin ar-sizes($ar, $breakpoints) {
33
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
34
+ @if ($breakpoint-value == 0) {
35
+ .u--ar {
36
+ @include make-ar();
37
+ }
38
+ @each $name, $size in $ar {
39
+ .u--ar-#{$name} {
40
+ @include make-ar($size);
41
+ }
42
+ }
43
+ } @else {
44
+ @media screen and ($viewport-type: $breakpoint-value) {
45
+ @each $name, $size in $ar {
46
+ .u--ar-#{$breakpoint-name}-#{$name} {
47
+ @include make-ar($size);
48
+ }
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+
55
+ @include ar-sizes($ar-sizes, $ar-breakpoints);
@@ -0,0 +1,45 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $display-values: (
4
+ block: block,
5
+ none: none,
6
+ inline-block:inline-block,
7
+ inline:inline,
8
+ // table:table,
9
+ // table-cell:table-cell,
10
+ // table-row:table-row,
11
+ flex: flex,
12
+ inline-flex:inline-flex
13
+ );
14
+
15
+ $display-breakpoints: (
16
+ all: $all,
17
+ desktop: $desktop,
18
+ laptop: $laptop,
19
+ tabletl: $tabletl,
20
+ tabletm: $tabletm,
21
+ tablets: $tablets,
22
+ mobile: $mobile,
23
+ );
24
+
25
+ @mixin display-utility($display-prop, $breakpoints) {
26
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
27
+ @if ($breakpoint-value == 0) {
28
+ @each $name, $property in $display-prop {
29
+ .u--display-#{$name} {
30
+ display: $property;
31
+ }
32
+ }
33
+ } @else {
34
+ @media screen and ($viewport-type: $breakpoint-value) {
35
+ @each $name, $property in $display-prop {
36
+ .u--display-#{$breakpoint-name}-#{$name} {
37
+ display: $property;
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+
45
+ @include display-utility($display-values, $display-breakpoints);
@@ -0,0 +1,40 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $flex-direction-values:(
4
+ row:row,
5
+ row-reverse:row-reverse,
6
+ column-reverse:column-reverse,
7
+ column: column
8
+ );
9
+
10
+ $flex-direction-breakpoints: (
11
+ all: $all,
12
+ desktop: $desktop,
13
+ laptop: $laptop,
14
+ tabletl: $tabletl,
15
+ tabletm: $tabletm,
16
+ tablets: $tablets,
17
+ mobile: $mobile,
18
+ );
19
+
20
+ @mixin flex-direction-utility($align-prop,$breakpoints){
21
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
22
+ @if($breakpoint-value == 0) {
23
+ @each $name, $property in $align-prop {
24
+ .u--flex-direction-#{$name}{
25
+ flex-direction:$property;
26
+ }
27
+ }
28
+ }@else{
29
+ @media screen and ($viewport-type: $breakpoint-value) {
30
+ @each $name, $property in $align-prop {
31
+ .u--flex-direction-#{$breakpoint-name}-#{$name}{
32
+ flex-direction:$property;
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+
40
+ @include flex-direction-utility($flex-direction-values,$flex-direction-breakpoints)
@@ -1,3 +1,5 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
1
3
  $wrap-properties:(
2
4
  wrap: wrap,
3
5
  nowrap:nowrap,
@@ -0,0 +1,38 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $font-style-values: (
4
+ italic: italic,
5
+ normal: normal,
6
+ );
7
+
8
+ $font-style-breakpoints: (
9
+ all: $all,
10
+ desktop: $desktop,
11
+ laptop: $laptop,
12
+ tabletl: $tabletl,
13
+ tabletm: $tabletm,
14
+ tablets: $tablets,
15
+ mobile: $mobile,
16
+ );
17
+
18
+ @mixin font-style-utility($font-style-prop, $breakpoints) {
19
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
20
+ @if ($breakpoint-value == 0) {
21
+ @each $name, $property in $font-style-prop {
22
+ .u--font-style-#{$name} {
23
+ font-style: $property;
24
+ }
25
+ }
26
+ } @else {
27
+ @media screen and ($viewport-type: $breakpoint-value) {
28
+ @each $name, $property in $font-style-prop {
29
+ .u--font-style-#{$breakpoint-name}-#{$name} {
30
+ font-style: $property;
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+
38
+ @include font-style-utility($font-style-values, $font-style-breakpoints);
@@ -0,0 +1,45 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $font-weight-values: (
4
+ thin: 100,
5
+ extralight: 200,
6
+ light: 300,
7
+ regular: 400,
8
+ medium: 500,
9
+ semibold: 600,
10
+ bold: 700,
11
+ extrabold: 800,
12
+ black: 900,
13
+ );
14
+
15
+ $font-weight-breakpoints: (
16
+ all: $all,
17
+ desktop: $desktop,
18
+ laptop: $laptop,
19
+ tabletl: $tabletl,
20
+ tabletm: $tabletm,
21
+ tablets: $tablets,
22
+ mobile: $mobile,
23
+ );
24
+
25
+ @mixin font-weight-utility($font-weight-prop, $breakpoints) {
26
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
27
+ @if ($breakpoint-value == 0) {
28
+ @each $name, $property in $font-weight-prop {
29
+ .u--font-#{$name} {
30
+ font-weight: $property;
31
+ }
32
+ }
33
+ } @else {
34
+ @media screen and ($viewport-type: $breakpoint-value) {
35
+ @each $name, $property in $font-weight-prop {
36
+ .u--font-#{$breakpoint-name}-#{$name} {
37
+ font-weight: $property;
38
+ }
39
+ }
40
+ }
41
+ }
42
+ }
43
+ }
44
+
45
+ @include font-weight-utility($font-weight-values, $font-weight-breakpoints);
@@ -0,0 +1,46 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $height-values: (
4
+ 100: 100%,
5
+ 75: 75%,
6
+ 50: 50%,
7
+ 25: 25%,
8
+ auto: auto,
9
+ );
10
+
11
+ $height-breakpoints: (
12
+ all: $all,
13
+ desktop: $desktop,
14
+ laptop: $laptop,
15
+ tabletl: $tabletl,
16
+ tabletm: $tabletm,
17
+ tablets: $tablets,
18
+ mobile: $mobile,
19
+ );
20
+
21
+ @mixin height-utility($height-prop, $breakpoints) {
22
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
23
+ @if ($breakpoint-value == 0) {
24
+ @each $name, $property in $height-prop {
25
+ .u--height-#{$name} {
26
+ height: $property;
27
+ }
28
+ }
29
+ } @else {
30
+ @media screen and ($viewport-type: $breakpoint-value) {
31
+ @each $name, $property in $height-prop {
32
+ .u--height-#{$breakpoint-name}-#{$name} {
33
+ height: $property;
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+
41
+ @if variable-exists(height-breakpoints) {
42
+ @include height-utility($height-values, $height-breakpoints);
43
+ }
44
+ @else {
45
+ @include height-utility($height-values, $breakpoints-grid);
46
+ }
@@ -1,25 +1,37 @@
1
- $justify-properties:(
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $justify-content-properties:(
2
4
  space-between: space-between,
3
5
  space-around:space-around,
4
- // space-evenly:space-evenly,
6
+ space-evenly:space-evenly,
5
7
  flex-start:flex-start,
6
8
  flex-end:flex-end,
7
- center:center
9
+ center:center
10
+ );
11
+
12
+ $justify-content-breakpoints: (
13
+ all: $all,
14
+ desktop: $desktop,
15
+ laptop: $laptop,
16
+ tabletl: $tabletl,
17
+ tabletm: $tabletm,
18
+ tablets: $tablets,
19
+ mobile: $mobile,
8
20
  );
9
21
 
10
- @mixin flex-justifycontent($justify-prop,$breakpoints){
22
+ @mixin justify-content-utility($justify-prop,$breakpoints){
11
23
  @each $breakpoint-name, $breakpoint-value in $breakpoints {
12
24
  @if($breakpoint-value == 0) {
13
25
  @each $name, $property in $justify-prop {
14
26
  .u--justify-content-#{$name}{
15
- justify-content:$property;
27
+ justify-content:$property;
16
28
  }
17
29
  }
18
30
  }@else{
19
31
  @media screen and ($viewport-type: $breakpoint-value) {
20
32
  @each $name, $property in $justify-prop {
21
33
  .u--justify-content-#{$breakpoint-name}-#{$name}{
22
- justify-content:$property;
34
+ justify-content:$property;
23
35
  }
24
36
  }
25
37
  }
@@ -27,4 +39,4 @@ $justify-properties:(
27
39
  }
28
40
  }
29
41
 
30
- @include flex-justifycontent($justify-properties,$breakpoints-grid)
42
+ @include justify-content-utility($justify-content-properties,$justify-content-breakpoints)
@@ -0,0 +1,38 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $order-values: (
4
+ first,
5
+ 1,
6
+ );
7
+
8
+ $order-breakpoints: (
9
+ all: $all,
10
+ desktop: $desktop,
11
+ laptop: $laptop,
12
+ tabletl: $tabletl,
13
+ tabletm: $tabletm,
14
+ tablets: $tablets,
15
+ mobile: $mobile,
16
+ );
17
+
18
+ @mixin order-utility($order-values, $breakpoints) {
19
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
20
+ @each $value in $order-values {
21
+ $order: if($value == first, -1, $value);
22
+
23
+ $class-name: if($breakpoint-name == all, "", "-#{$breakpoint-name}");
24
+
25
+ .u--order#{$class-name}-#{$value} {
26
+ @if ($breakpoint-name == all) {
27
+ order: #{$order};
28
+ } @else {
29
+ @media screen and ($viewport-type: #{$breakpoint-value}) {
30
+ order: #{$order};
31
+ }
32
+ }
33
+ }
34
+ }
35
+ }
36
+ }
37
+
38
+ @include order-utility($order-values, $order-breakpoints);
@@ -1,9 +1,20 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
1
3
  $overflow-values:(
2
4
  hidden: hidden,
3
- clip: clip,
5
+ visible: visible,
4
6
  auto: auto,
5
7
  );
6
8
 
9
+ $overflow-breakpoints: (
10
+ all: $all,
11
+ desktop: $desktop,
12
+ laptop: $laptop,
13
+ tabletl: $tabletl,
14
+ tabletm: $tabletm,
15
+ tablets: $tablets,
16
+ mobile: $mobile,
17
+ );
7
18
 
8
19
  @mixin overflow-utility($overflow-prop,$breakpoints){
9
20
  @each $breakpoint-name, $breakpoint-value in $breakpoints {
@@ -25,4 +36,4 @@ $overflow-values:(
25
36
  }
26
37
  }
27
38
 
28
- @include overflow-utility($overflow-values,$breakpoints-grid)
39
+ @include overflow-utility($overflow-values,$overflow-breakpoints)
@@ -1,12 +1,25 @@
1
- $position-properties:(
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $position-values:(
2
4
  relative:relative,
3
5
  absolute:absolute,
4
6
  fixed:fixed,
5
7
  sticky:sticky,
6
- inherit:inherit,
8
+ // inherit:inherit,
7
9
  unset:unset
8
10
  );
9
- @mixin position-alignment($position-prop,$breakpoints){
11
+
12
+ $position-breakpoints: (
13
+ all: $all,
14
+ desktop: $desktop,
15
+ laptop: $laptop,
16
+ tabletl: $tabletl,
17
+ tabletm: $tabletm,
18
+ tablets: $tablets,
19
+ mobile: $mobile,
20
+ );
21
+
22
+ @mixin position-utility($position-prop,$breakpoints){
10
23
  @each $breakpoint-name, $breakpoint-value in $breakpoints {
11
24
  @if($breakpoint-value == 0) {
12
25
  @each $name, $property in $position-prop {
@@ -26,4 +39,4 @@ $position-properties:(
26
39
  }
27
40
  }
28
41
 
29
- @include position-alignment($position-properties,$breakpoints-grid)
42
+ @include position-utility($position-values,$position-breakpoints)
@@ -0,0 +1,67 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $space-values : (
4
+ 0,
5
+ 1,
6
+ 2,
7
+ 3,
8
+ 4,
9
+ 5,
10
+ 7,
11
+ 8,
12
+ 10,
13
+ 15,
14
+ ) !default;
15
+
16
+ $space-prefixes : (
17
+ p : padding,
18
+ pt : padding-top,
19
+ pr : padding-right,
20
+ pb : padding-bottom,
21
+ pl : padding-left,
22
+ m : margin,
23
+ mt : margin-top,
24
+ mr : margin-right,
25
+ mb : margin-bottom,
26
+ ml : margin-left,
27
+ ) !default;
28
+
29
+ $space-breakpoints: (
30
+ all: $all,
31
+ desktop: $desktop,
32
+ laptop: $laptop,
33
+ tabletl: $tabletl,
34
+ tabletm: $tabletm,
35
+ tablets: $tablets,
36
+ mobile: $mobile,
37
+ );
38
+
39
+ @mixin make-spaces($values, $prefixes, $breakpoints) {
40
+
41
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
42
+ // if xs value = 0, set it global without media queries
43
+ @if($breakpoint-value == 0) {
44
+ @each $attr-short, $attr-long in $prefixes {
45
+ @each $value in $values {
46
+ .u--#{$attr-short}-#{$value} {
47
+ #{$attr-long}: calc(#{$measure} * #{$value});
48
+ }
49
+ }
50
+ }
51
+ }
52
+ // breakpoint values that not equal to 0
53
+ @else {
54
+ @media screen and ($viewport-type: $breakpoint-value) {
55
+ @each $attr-short, $attr-long in $prefixes {
56
+ @each $value in $values {
57
+ .u--#{$attr-short}-#{$breakpoint-name}-#{$value} {
58
+ #{$attr-long}: calc(#{$measure} * #{$value});
59
+ }
60
+ }
61
+ }
62
+ }
63
+ }
64
+ }
65
+ }
66
+
67
+ @include make-spaces($space-values, $space-prefixes,$space-breakpoints);