@terrahq/design-system 0.0.5 → 0.0.9

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 (65) hide show
  1. package/README.md +130 -22
  2. package/dist/style.css +1 -1
  3. package/package.json +1 -1
  4. package/src/index.html +46 -33
  5. package/src/scss/framework/_var/_vars.scss +95 -0
  6. package/src/scss/framework/foundation/_foundation.scss +36 -0
  7. package/src/scss/framework/foundation/background/_background.scss +8 -0
  8. package/src/scss/framework/foundation/color/_color.scss +8 -0
  9. package/src/scss/framework/foundation/font/_font.scss +27 -0
  10. package/src/scss/framework/foundation/font/_make-font.scss +55 -0
  11. package/src/scss/framework/foundation/gap/{gap.scss → _gap.scss} +2 -4
  12. package/src/scss/framework/foundation/gap/_make-gap.scss +29 -0
  13. package/src/scss/framework/foundation/grid/_columns.scss +115 -0
  14. package/src/scss/framework/foundation/grid/_container.scss +17 -0
  15. package/src/scss/framework/foundation/grid/_grid.scss +3 -0
  16. package/src/scss/framework/foundation/grid/_make-columns.scss +28 -0
  17. package/src/scss/framework/foundation/grid/_make-container.scss +33 -0
  18. package/src/scss/framework/foundation/grid/_make-row.scss +20 -0
  19. package/src/scss/framework/foundation/grid/_row.scss +9 -0
  20. package/src/scss/framework/foundation/reset/{reset.scss → _reset.scss} +19 -12
  21. package/src/scss/framework/{_mixins/foundation/section/_section.scss → foundation/section/_make-section.scss} +2 -0
  22. package/src/scss/framework/foundation/section/{section.scss → _section.scss} +2 -0
  23. package/src/scss/framework/foundation/spaces/_make-spaces.scss +29 -0
  24. package/src/scss/framework/foundation/spaces/_spaces.scss +17 -0
  25. package/src/scss/framework/utilities/_align-items.scss +39 -0
  26. package/src/scss/framework/utilities/_aspect-ratio.scss +55 -0
  27. package/src/scss/framework/utilities/_display.scss +45 -0
  28. package/src/scss/framework/utilities/_flex-direction.scss +40 -0
  29. package/src/scss/framework/utilities/{flex-wrap.scss → _flex-wrap.scss} +2 -0
  30. package/src/scss/framework/utilities/_font-style.scss +38 -0
  31. package/src/scss/framework/utilities/_font-weight.scss +45 -0
  32. package/src/scss/framework/utilities/_height.scss +46 -0
  33. package/src/scss/framework/utilities/{justify-content.scss → _justify-content.scss} +19 -7
  34. package/src/scss/framework/utilities/_order.scss +38 -0
  35. package/src/scss/framework/utilities/{overflow.scss → _overflow.scss} +13 -2
  36. package/src/scss/framework/utilities/{position.scss → _position.scss} +16 -3
  37. package/src/scss/framework/utilities/_spacing.scss +67 -0
  38. package/src/scss/framework/utilities/_text-align.scss +40 -0
  39. package/src/scss/framework/utilities/_utilities.scss +15 -0
  40. package/src/scss/framework/utilities/_width.scss +46 -0
  41. package/src/scss/index.scss +2 -6
  42. package/src/scss/framework/_mixins/_mixins.scss +0 -6
  43. package/src/scss/framework/_mixins/foundation/aspect-ratio/_ar.scss +0 -64
  44. package/src/scss/framework/_mixins/foundation/gap/_gap.scss +0 -28
  45. package/src/scss/framework/_mixins/foundation/grid/_columns.scss +0 -23
  46. package/src/scss/framework/_mixins/foundation/grid/_container.scss +0 -17
  47. package/src/scss/framework/_mixins/foundation/grid/_grid.scss +0 -3
  48. package/src/scss/framework/_mixins/foundation/grid/_row.scss +0 -8
  49. package/src/scss/framework/_mixins/foundation/spaces/_spaces.scss +0 -24
  50. package/src/scss/framework/_vars/_vars.scss +0 -114
  51. package/src/scss/framework/foundation/aspect-ratio/aspect-ratio.scss +0 -32
  52. package/src/scss/framework/foundation/background/background.scss +0 -5
  53. package/src/scss/framework/foundation/color/color.scss +0 -6
  54. package/src/scss/framework/foundation/foundation.scss +0 -41
  55. package/src/scss/framework/foundation/grid/columns.scss +0 -90
  56. package/src/scss/framework/foundation/grid/container.scss +0 -17
  57. package/src/scss/framework/foundation/grid/grid.scss +0 -3
  58. package/src/scss/framework/foundation/grid/row.scss +0 -12
  59. package/src/scss/framework/foundation/spacing/spacing.scss +0 -42
  60. package/src/scss/framework/utilities/align-items.scss +0 -29
  61. package/src/scss/framework/utilities/display.scss +0 -34
  62. package/src/scss/framework/utilities/font-style.scss +0 -52
  63. package/src/scss/framework/utilities/font-weight.scss +0 -32
  64. package/src/scss/framework/utilities/text-align.scss +0 -29
  65. package/src/scss/framework/utilities/utilities.scss +0 -9
@@ -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,4 +1,6 @@
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,
@@ -6,7 +8,18 @@ $position-properties:(
6
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);
@@ -0,0 +1,40 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $text-align-values: (
4
+ left: left,
5
+ center: center,
6
+ right:right,
7
+ justify:justify,
8
+ );
9
+
10
+ $text-align-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 text-align-utility($text-prop, $breakpoints) {
21
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
22
+ @if ($breakpoint-value == 0) {
23
+ @each $name, $property in $text-prop {
24
+ .u--text-align-#{$name} {
25
+ text-align: $property;
26
+ }
27
+ }
28
+ } @else {
29
+ @media screen and ($viewport-type: $breakpoint-value) {
30
+ @each $name, $property in $text-prop {
31
+ .u--text-align-#{$breakpoint-name}-#{$name} {
32
+ text-align: $property;
33
+ }
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+
40
+ @include text-align-utility($text-align-values, $text-align-breakpoints);
@@ -0,0 +1,15 @@
1
+ @forward './align-items.scss';
2
+ @forward './aspect-ratio.scss';
3
+ @forward './display.scss';
4
+ @forward './flex-direction.scss';
5
+ @forward './flex-wrap.scss';
6
+ @forward './font-style.scss';
7
+ @forward './font-weight.scss';
8
+ @forward './height.scss';
9
+ @forward './justify-content.scss';
10
+ @forward './order.scss';
11
+ @forward './overflow.scss';
12
+ @forward './position.scss';
13
+ @forward './spacing.scss';
14
+ @forward './text-align.scss';
15
+ @forward './width.scss';
@@ -0,0 +1,46 @@
1
+ @use "@scss/framework/_var/_vars.scss" as *;
2
+
3
+ $width-values: (
4
+ 100: 100%,
5
+ 75: 75%,
6
+ 50: 50%,
7
+ 25: 25%,
8
+ auto: auto,
9
+ );
10
+
11
+ $width-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 width-utility($width-prop, $breakpoints) {
22
+ @each $breakpoint-name, $breakpoint-value in $breakpoints {
23
+ @if ($breakpoint-value == 0) {
24
+ @each $name, $property in $width-prop {
25
+ .u--width-#{$name} {
26
+ width: $property;
27
+ }
28
+ }
29
+ } @else {
30
+ @media screen and ($viewport-type: $breakpoint-value) {
31
+ @each $name, $property in $width-prop {
32
+ .u--width-#{$breakpoint-name}-#{$name} {
33
+ width: $property;
34
+ }
35
+ }
36
+ }
37
+ }
38
+ }
39
+ }
40
+
41
+ @if variable-exists(width-breakpoints) {
42
+ @include width-utility($width-values, $width-breakpoints);
43
+ }
44
+ @else {
45
+ @include width-utility($width-values, $breakpoints-grid);
46
+ }
@@ -1,7 +1,3 @@
1
- @import "./src/scss/framework/_vars/_vars.scss";
2
- @import "./src/scss/framework/_mixins/_mixins.scss";
3
- @import "./src/scss/framework/foundation/foundation.scss";
4
-
5
- @import "./src/scss/framework/utilities/utilities.scss";
6
-
1
+ @use "./src/scss/framework/foundation/foundation.scss";
7
2
 
3
+ @use "./src/scss/framework/utilities/utilities.scss";
@@ -1,6 +0,0 @@
1
- /* foundation mixins*/
2
- @import './foundation/grid/grid';
3
- @import './foundation/aspect-ratio/ar';
4
- @import './foundation/section/section';
5
- @import './foundation/spaces/spaces';
6
- @import './foundation/gap/gap';
@@ -1,64 +0,0 @@
1
- //IE img with parents width and auto height, if the img is put with correct AR it will see correctly (https://imgur.com/zkNrIOt)
2
- @mixin make-ar($size: default) {
3
- display: block;
4
- width: 100%;
5
- height: auto;
6
- object-fit: cover;
7
- @if $size == "default" {
8
- } @else {
9
- aspect-ratio: $size;
10
- }
11
- }
12
-
13
- @mixin make-ar-a-item{
14
- position: absolute;
15
- top: 0;
16
- left: 0;
17
- width: 100%;
18
- height: 100%;
19
- border-radius: $border-radius-a;
20
- // i explorer
21
- @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
22
- position: relative;
23
- top: auto;
24
- left: auto;
25
- height: auto;
26
- }
27
- }
28
- @mixin make-ar-a-item__img{
29
- @include make-ar-a-item();
30
- object-fit: cover;
31
- object-position: center;
32
- }
33
-
34
- //IE img with real size, you can see only a few part of the image (https://imgur.com/q5YsuBU)
35
- @mixin make-ar-b($size) {
36
- position: relative;
37
- width: 100%;
38
- padding-top:#{$size};
39
- border-radius: $border-radius-a;
40
- overflow: hidden;
41
- }
42
- @mixin make-ar-b-item{
43
- position: absolute;
44
- top: 0;
45
- left: 0;
46
- width: 100%;
47
- height: 100%;
48
- // i explorer
49
- @media all and (-ms-high-contrast: none), (-ms-high-contrast: active) {
50
- top: 50%;
51
- left: 50%;
52
- width: auto;
53
- height: auto;
54
- min-width: 100%;
55
- min-height: 100%;
56
- max-width: inherit;
57
- transform: translate(-50%, -50%);
58
- }
59
- }
60
- @mixin make-ar-b-item__img{
61
- @include make-ar-b-item();
62
- object-fit: cover;
63
- object-position: center;
64
- }