oo-loop 0.5.0 → 0.6.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.
Files changed (37) hide show
  1. package/dist/loop.css +189 -625
  2. package/dist/loop.min.css +1 -1
  3. package/package.json +4 -3
  4. package/scss/_loop.scss +23 -27
  5. package/scss/_variables.scss +6 -2
  6. package/scss/base/_base.scss +11 -19
  7. package/scss/base/_type.scss +27 -63
  8. package/scss/components/_button.scss +56 -84
  9. package/scss/components/_columns.scss +69 -89
  10. package/scss/components/_form.scss +5 -7
  11. package/scss/components/_grid.scss +50 -62
  12. package/scss/components/form/_checkbox.scss +33 -41
  13. package/scss/components/form/_input.scss +12 -74
  14. package/scss/components/form/_mixin.scss +47 -0
  15. package/scss/components/form/_radio.scss +27 -34
  16. package/scss/components/form/_select.scss +38 -46
  17. package/scss/components/form/_toggle.scss +21 -30
  18. package/scss/functions/_array.scss +12 -8
  19. package/scss/functions/_empty.scss +6 -3
  20. package/scss/functions/_index.scss +7 -0
  21. package/scss/functions/_map.scss +4 -2
  22. package/scss/functions/_replace.scss +7 -4
  23. package/scss/functions/_split.scss +10 -6
  24. package/scss/functions/_type.scss +5 -3
  25. package/scss/mixins/_breakpoint.scss +12 -22
  26. package/scss/mixins/_loop.scss +28 -22
  27. package/scss/utilities/_color.scss +9 -18
  28. package/scss/utilities/_container.scss +9 -10
  29. package/scss/utilities/_float.scss +7 -11
  30. package/scss/utilities/_list.scss +9 -14
  31. package/scss/utilities/_spacing.scss +29 -40
  32. package/scss/utilities/_text.scss +19 -64
  33. package/scss/utilities/_visibility.scss +10 -9
  34. package/scss/utilities/_wrapper.scss +5 -10
  35. package/scss/base/_all.scss +0 -9
  36. package/scss/functions/_all.scss +0 -9
  37. package/scss/mixins/_all.scss +0 -7
@@ -1,52 +1,44 @@
1
+ @use 'sass:map';
2
+ @use '../../variables' as v;
3
+ @use '../../functions' as fn;
4
+ @use 'mixin' as m;
5
+
1
6
  /**
2
7
  * Select
3
8
  */
4
9
 
5
- $select-size: 10px !default;
6
- $select-weight: 2px !default;
7
- $select-color: $input-color !default;
8
- $select-bgcolor: $input-bgcolor !default;
9
-
10
- $select-themes: (
11
- // 'plain' : (
12
- // 'size' : $select-size,
13
- // 'color': $select-bgcolor,
14
- // 'bgcolor': $input-border-color,
15
- // )
16
- ) !default;
17
-
18
10
  @mixin selectTheme($theme) {
19
- @if map-has-key($theme, 'size') {
20
- &::before { width: (map-get($theme, 'size') * 3); }
11
+ @if map.has-key($theme, 'size') {
12
+ &::before { width: (map.get($theme, 'size') * 3); }
21
13
  &::after {
22
- right: map-get($theme, 'size');
23
- width: map-get($theme, 'size');
24
- height: map-get($theme, 'size');
14
+ right: map.get($theme, 'size');
15
+ width: map.get($theme, 'size');
16
+ height: map.get($theme, 'size');
25
17
  }
26
18
  }
27
- @if map-has-key($theme, 'weight') {
19
+ @if map.has-key($theme, 'weight') {
28
20
  &::after {
29
- border-bottom-width: map-get($theme, 'weight');
30
- border-right-width: map-get($theme, 'weight');
21
+ border-bottom-width: map.get($theme, 'weight');
22
+ border-right-width: map.get($theme, 'weight');
31
23
  }
32
24
  }
33
- @if map-has-key($theme, 'bgcolor') {
34
- &::before { background-color: map-get($theme, 'bgcolor'); }
25
+ @if map.has-key($theme, 'bgcolor') {
26
+ &::before { background-color: map.get($theme, 'bgcolor'); }
35
27
  }
36
- @if map-has-key($theme, 'color') {
28
+ @if map.has-key($theme, 'color') {
37
29
  &::after {
38
- border-bottom-color: map-get($theme, 'color');
39
- border-right-color: map-get($theme, 'color');
30
+ border-bottom-color: map.get($theme, 'color');
31
+ border-right-color: map.get($theme, 'color');
40
32
  }
41
33
  }
42
34
  }
43
35
 
44
- [#{$loop-component-prefix}-form~="select"] {
36
+ [#{v.$loop-component-prefix}-form~="select"] {
45
37
  position: relative;
46
38
  display: block;
47
- min-height: $input-height;
48
- font-size: $input-font-size;
49
- line-height: $input-line-height;
39
+ min-height: v.$input-height;
40
+ font-size: v.$input-font-size;
41
+ line-height: v.$input-line-height;
50
42
 
51
43
  &::before {
52
44
  position: absolute;
@@ -56,11 +48,11 @@ $select-themes: (
56
48
 
57
49
  content: '';
58
50
 
59
- border-top: $input-border;
60
- border-right: $input-border;
61
- border-bottom: $input-border;
62
- border-top-right-radius: $input-border-radius;
63
- border-bottom-right-radius: $input-border-radius;
51
+ border-top: v.$input-border;
52
+ border-right: v.$input-border;
53
+ border-bottom: v.$input-border;
54
+ border-top-right-radius: v.$input-border-radius;
55
+ border-bottom-right-radius: v.$input-border-radius;
64
56
 
65
57
  pointer-events: none;
66
58
  }
@@ -79,14 +71,14 @@ $select-themes: (
79
71
  }
80
72
 
81
73
  @include selectTheme((
82
- 'size' : $select-size,
83
- 'color': $select-color,
84
- 'bgcolor': $select-bgcolor,
85
- 'weight': $select-weight,
74
+ 'size' : v.$select-size,
75
+ 'color': v.$select-color,
76
+ 'bgcolor': v.$select-bgcolor,
77
+ 'weight': v.$select-weight,
86
78
  ));
87
79
 
88
80
  > select {
89
- @extend %input;
81
+ @include m.input;
90
82
  margin: 0;
91
83
  height: 100%;
92
84
  font-size: inherit;
@@ -98,9 +90,9 @@ $select-themes: (
98
90
  }
99
91
  }
100
92
 
101
- @if isNotEmpty($select-themes) and isMap($select-themes) {
102
- @each $theme-name, $theme in $select-themes {
103
- &[#{$loop-component-prefix}-form~="#{$theme-name}"] {
93
+ @if fn.isNotEmpty(v.$select-themes) and fn.isMap(v.$select-themes) {
94
+ @each $theme-name, $theme in v.$select-themes {
95
+ &[#{v.$loop-component-prefix}-form~="#{$theme-name}"] {
104
96
  @include selectTheme($theme);
105
97
  }
106
98
  }
@@ -120,9 +112,9 @@ $select-themes: (
120
112
  }
121
113
  }
122
114
 
123
- @if isNotEmpty($input-padding-sizes) {
124
- @each $name, $padding in $input-padding-sizes {
125
- [#{$loop-component-prefix}-form~="select"][#{$loop-component-prefix}-form~="#{$name}"] > select {
115
+ @if fn.isNotEmpty(v.$input-padding-sizes) {
116
+ @each $name, $padding in v.$input-padding-sizes {
117
+ [#{v.$loop-component-prefix}-form~="select"][#{v.$loop-component-prefix}-form~="#{$name}"] > select {
126
118
  padding: #{$padding};
127
119
  padding-right: 0;
128
120
  }
@@ -1,21 +1,12 @@
1
1
  @use 'sass:math';
2
+ @use '../../variables' as v;
3
+ @use '../../functions/type';
4
+ @use 'mixin' as m;
2
5
 
3
6
  /**
4
7
  * Toggle
5
8
  */
6
9
 
7
- $toggle-size: 2.4rem !default;
8
- $toggle-color: $input-bgcolor !default;
9
- $toggle-bgcolor: $input-border-color !default;
10
- $toggle-border-color: $toggle-bgcolor !default;
11
- $toggle-box-shadow: $checkbox-box-shadow !default;
12
-
13
- $toggle-checked-bgcolor: $input-color !default;
14
- $toggle-checked-border-color: $toggle-checked-bgcolor !default;
15
-
16
- $use-toggle-animation: true !default;
17
- $toggle-sizes:() !default;
18
-
19
10
  @mixin toggle-size($size) {
20
11
  & + label {
21
12
  &::before {
@@ -31,7 +22,7 @@ $toggle-sizes:() !default;
31
22
  min-height: $size;
32
23
  }
33
24
 
34
- & + [#{$loop-component-prefix}-form~="toggle"] + label { margin-top: math.div($size, 3); }
25
+ & + [#{v.$loop-component-prefix}-form~="toggle"] + label { margin-top: math.div($size, 3); }
35
26
  }
36
27
 
37
28
  &:checked + label::before {
@@ -39,7 +30,7 @@ $toggle-sizes:() !default;
39
30
  }
40
31
  }
41
32
 
42
- [#{$loop-component-prefix}-form~="toggle"] {
33
+ [#{v.$loop-component-prefix}-form~="toggle"] {
43
34
  position: absolute;
44
35
  opacity: 0;
45
36
 
@@ -49,17 +40,17 @@ $toggle-sizes:() !default;
49
40
  align-items: center;
50
41
  width: fit-content;
51
42
  line-height: 1.1;
52
- font-weight: $font-weight-base;
43
+ font-weight: v.$font-weight-base;
53
44
 
54
45
  &::before {
55
46
  position: absolute;
56
47
  left: 0;
57
48
  content: '';
58
49
  border-radius: 50%;
59
- background-color: $toggle-color;
60
- box-shadow: $toggle-box-shadow;
50
+ background-color: v.$toggle-color;
51
+ box-shadow: v.$toggle-box-shadow;
61
52
 
62
- @if $use-toggle-animation {
53
+ @if v.$use-toggle-animation {
63
54
  transition: transform 300ms ease-out;
64
55
  }
65
56
  }
@@ -67,30 +58,30 @@ $toggle-sizes:() !default;
67
58
  display: flex;
68
59
  order: -1;
69
60
  content:'';
70
- border: 1px solid $toggle-border-color;
61
+ border: 1px solid v.$toggle-border-color;
71
62
  border-radius: 50em;
72
- background-color: $toggle-bgcolor;
73
- box-shadow: $toggle-box-shadow;
63
+ background-color: v.$toggle-bgcolor;
64
+ box-shadow: v.$toggle-box-shadow;
74
65
 
75
- @if $use-toggle-animation {
66
+ @if v.$use-toggle-animation {
76
67
  transition: background-color 300ms ease-in-out, border-color 300ms ease-in-out;
77
68
  }
78
69
  }
79
70
  }
80
71
 
81
72
  &:checked + label::after {
82
- background-color: $toggle-checked-bgcolor;
83
- border-color: $toggle-checked-border-color;
73
+ background-color: v.$toggle-checked-bgcolor;
74
+ border-color: v.$toggle-checked-border-color;
84
75
  }
85
- &:focus + label::after { @extend %inputFocus; }
76
+ &:focus + label::after { @include m.inputFocus; }
86
77
 
87
- @include toggle-size($toggle-size);
78
+ @include toggle-size(v.$toggle-size);
88
79
 
89
- @if isMap($toggle-sizes) {
90
- @each $size_name, $size_value in $toggle-sizes {
91
- &[#{$loop-component-prefix}-form~="#{$size_name}"] { @include toggle-size($size_value) }
80
+ @if type.isMap(v.$toggle-sizes) {
81
+ @each $size_name, $size_value in v.$toggle-sizes {
82
+ &[#{v.$loop-component-prefix}-form~="#{$size_name}"] { @include toggle-size($size_value) }
92
83
  }
93
84
  }
94
85
 
95
- [#{$loop-component-prefix}-form~="labelless"] + label::after { margin-right: 0; }
86
+ [#{v.$loop-component-prefix}-form~="labelless"] + label::after { margin-right: 0; }
96
87
  }
@@ -1,4 +1,8 @@
1
- @import 'empty';
1
+ @use 'sass:list';
2
+ @use 'sass:map';
3
+ @use 'sass:meta';
4
+
5
+ @use 'empty';
2
6
 
3
7
  /**
4
8
  * In List
@@ -8,7 +12,7 @@
8
12
  */
9
13
 
10
14
  @function inList($needle, $haystack) {
11
- @if index($haystack, $needle) == null {
15
+ @if list.index($haystack, $needle) == null {
12
16
  @return false;
13
17
  } @else {
14
18
  @return true;
@@ -35,15 +39,15 @@
35
39
  $merge: ();
36
40
 
37
41
  // merge if $array1 or $array2 is not empty
38
- @if isNotEmpty($array1) {
39
- @if type-of($array1) == 'list' and type-of($array2) == 'list' {
40
- $merge: join($array1, $array2);
41
- } @else if type-of($array1) == 'map' and type-of($array2) == 'map' {
42
- $merge: map-merge($array1, $array2);
42
+ @if empty.isNotEmpty($array1) {
43
+ @if meta.type-of($array1) == 'list' and meta.type-of($array2) == 'list' {
44
+ $merge: list.join($array1, $array2);
45
+ } @else if meta.type-of($array1) == 'map' and meta.type-of($array2) == 'map' {
46
+ $merge: map.merge($array1, $array2);
43
47
  } @else {
44
48
  $merge: $array1;
45
49
  }
46
- } @else if isNotEmpty($array2) {
50
+ } @else if empty.isNotEmpty($array2) {
47
51
  $merge: $array2;
48
52
  }
49
53
 
@@ -1,4 +1,7 @@
1
- @import 'type';
1
+ @use "sass:list";
2
+ @use "sass:string";
3
+
4
+ @use 'type';
2
5
 
3
6
  /**
4
7
  * Empty
@@ -7,9 +10,9 @@
7
10
  */
8
11
 
9
12
  @function isEmpty($data) {
10
- @if isString($data) and str-length($data) == 0 {
13
+ @if type.isString($data) and string.length($data) == 0 {
11
14
  @return true;
12
- } @else if isList($data) and length($data) == 0 {
15
+ } @else if type.isList($data) and list.length($data) == 0 {
13
16
  @return true;
14
17
  } @else {
15
18
  @return false;
@@ -0,0 +1,7 @@
1
+ @forward 'array';
2
+ @forward 'brightness';
3
+ @forward 'empty';
4
+ @forward 'map';
5
+ @forward 'replace';
6
+ @forward 'split';
7
+ @forward 'type';
@@ -1,3 +1,5 @@
1
+ @use 'sass:map';
2
+
1
3
  /**
2
4
  * getMapValue
3
5
  * @param $map map map of data
@@ -5,11 +7,11 @@
5
7
  * @return string
6
8
  */
7
9
  @function getMapValue($map, $key) {
8
- @if map-has-key($map, $key) == false {
10
+ @if map.has-key($map, $key) == false {
9
11
  @warn ('key does not exist when using getMapValue()');
10
12
  @return '';
11
13
  }
12
- @return map-get($map, $key);
14
+ @return map.get($map, $key);
13
15
  }
14
16
 
15
17
  /**
@@ -1,3 +1,6 @@
1
+ @use 'sass:meta';
2
+ @use 'sass:string';
3
+
1
4
  /**
2
5
  * Replace
3
6
  * @param string $search The value being searched
@@ -8,10 +11,10 @@
8
11
  */
9
12
 
10
13
  @function replace($search, $replace, $subject) {
11
- $searchIndex: str-index($subject, $search);
12
- @if type-of($search) == 'string' and type-of($replace) == 'string' and type-of($subject) == 'string' and $searchIndex {
13
- $subjectStart: str-slice($subject, 1, $searchIndex - 1);
14
- $subjectEnd: str-slice($subject, $searchIndex + str-length($search));
14
+ $searchIndex: string.index($subject, $search);
15
+ @if meta.type-of($search) == 'string' and meta.type-of($replace) == 'string' and meta.type-of($subject) == 'string' and $searchIndex {
16
+ $subjectStart: string.slice($subject, 1, $searchIndex - 1);
17
+ $subjectEnd: string.slice($subject, $searchIndex + string.length($search));
15
18
  $newSubject: $subjectStart + $replace + $subjectEnd;
16
19
  @return replace($search, $replace, $newSubject);
17
20
  } @else {
@@ -1,3 +1,7 @@
1
+ @use 'sass:list';
2
+ @use 'sass:meta';
3
+ @use 'sass:string';
4
+
1
5
  /**
2
6
  * Split
3
7
  * @param string $pattern The string character to split your string by
@@ -8,14 +12,14 @@
8
12
  */
9
13
 
10
14
  @function split($pattern, $subject, $list:()) {
11
- $searchIndex: str-index($subject, $pattern);
12
- @if type-of($pattern) == 'string' and type-of($subject) == 'string' and $searchIndex {
13
- $subjectStart: str-slice($subject, 1, $searchIndex - 1);
14
- $subjectEnd: str-slice($subject, $searchIndex + str-length($pattern));
15
- $newList: join($list, $subjectStart);
15
+ $searchIndex: string.index($subject, $pattern);
16
+ @if meta.type-of($pattern) == 'string' and meta.type-of($subject) == 'string' and $searchIndex {
17
+ $subjectStart: string.slice($subject, 1, $searchIndex - 1);
18
+ $subjectEnd: string.slice($subject, $searchIndex + string.length($pattern));
19
+ $newList: list.join($list, $subjectStart);
16
20
  @return split($pattern, $subjectEnd, $newList);
17
21
  } @else {
18
- $newList: join($list, $subject);
22
+ $newList: list.join($list, $subject);
19
23
  @return $newList;
20
24
  }
21
25
  }
@@ -1,3 +1,5 @@
1
+ @use 'sass:meta';
2
+
1
3
  /**
2
4
  * isString
3
5
  * @param string|list $data
@@ -5,7 +7,7 @@
5
7
  */
6
8
 
7
9
  @function isString($data) {
8
- @if type-of($data) == 'string'{
10
+ @if meta.type-of($data) == 'string'{
9
11
  @return true;
10
12
  } @else {
11
13
  @return false;
@@ -23,7 +25,7 @@
23
25
  */
24
26
 
25
27
  @function isList($data) {
26
- @if type-of($data) == 'list'{
28
+ @if meta.type-of($data) == 'list'{
27
29
  @return true;
28
30
  } @else {
29
31
  @return false;
@@ -41,7 +43,7 @@
41
43
  */
42
44
 
43
45
  @function isMap($data) {
44
- @if type-of($data) == 'map'{
46
+ @if meta.type-of($data) == 'map'{
45
47
  @return true;
46
48
  } @else {
47
49
  @return false;
@@ -3,42 +3,32 @@
3
3
  * based on material guidelines
4
4
  * https://material.io/guidelines/layout/responsive-ui.html#responsive-ui-breakpoints
5
5
  */
6
+ @use 'sass:list';
7
+ @use 'sass:map';
8
+ @use '../variables' as v;
9
+ @use '../functions' as fn;
6
10
 
7
- @import '../functions/all';
8
11
 
9
- $breakpoints: (
10
- xs: 480px, // min width
11
- sm: 600px, // min width
12
- md: 960px, // min width
13
- lg: 1280px, // min width
14
- ) !default;
15
-
16
- $breakpoints-classes: (sm, md, lg) !default;
17
- $pointbreaks-classes: (sm, md, lg) !default;
18
-
19
- // including the first step
20
- $breakpoints-classes-width-default-value: join('', $breakpoints-classes);
21
-
22
- @mixin breakpoint($key) {
12
+ @mixin from($key) {
23
13
  // make sure the key exist
24
- @if map-has-key($breakpoints, $key) {
25
- $width: map-get($breakpoints, $key);
14
+ @if map.has-key(v.$breakpoints, $key) {
15
+ $width: map.get(v.$breakpoints, $key);
26
16
  @media (min-width: $width) {
27
17
  @content;
28
18
  }
29
- } @else if isEmpty($key) or $key == 'rt' {
19
+ } @else if fn.isEmpty($key) or $key == 'rt' {
30
20
  @content;
31
21
  }
32
22
  }
33
23
 
34
- @mixin pointbreak($key) {
24
+ @mixin to($key) {
35
25
  // make sure the key exist
36
- @if map-has-key($breakpoints, $key) {
37
- $width: map-get($breakpoints, $key) - 1;
26
+ @if map.has-key(v.$breakpoints, $key) {
27
+ $width: map.get(v.$breakpoints, $key) - 1;
38
28
  @media (max-width: $width) {
39
29
  @content;
40
30
  }
41
- } @else if isEmpty($key) or $key == 'rt' {
31
+ } @else if fn.isEmpty($key) or $key == 'rt' {
42
32
  @content;
43
33
  }
44
34
  }
@@ -1,14 +1,16 @@
1
- /**
2
- * Loop
3
- */
1
+ @use 'sass:map';
4
2
 
5
- @import '../functions/all';
6
- @import 'breakpoint';
3
+ @use 'breakpoint';
4
+ @use '../functions/empty';
5
+ @use '../functions/type';
7
6
 
7
+ /**
8
+ * Loop properties
9
+ */
8
10
 
9
11
  @mixin loopProperties($properties, $value, $is-important) {
10
12
  // multiple properties
11
- @if isList($properties) {
13
+ @if type.isList($properties) {
12
14
  @each $property in $properties {
13
15
  #{$property}: if($is-important, #{$value} !important, #{$value});
14
16
  }
@@ -31,22 +33,16 @@
31
33
  $affix: '-';
32
34
 
33
35
  // Make sure to have the correct format or do not generate rules
34
- @if isNotEmpty($data) {
35
- @if isList($data) {
36
- @each $value in $data {
37
- #{$prefix}-#{$value}#{$suffix} {
38
- @include loopProperties($properties, $value, $is-important);
39
- }
40
- }
41
- } @else if isMap($data) {
36
+ @if empty.isNotEmpty($data) {
37
+ @if type.isMap($data) {
42
38
  @each $key, $value in $data {
43
- $affix: if(isEmpty($key), '', $affix);
39
+ $affix: if(empty.isEmpty($key), '', $affix);
44
40
 
45
41
  #{$prefix}#{$affix}#{$key}#{$suffix} {
46
42
  // responsive properties ?
47
- @if isMap($value) {
43
+ @if type.isMap($value) {
48
44
  @each $child-breakpoint, $child-value in $value {
49
- @include breakpoint($child-breakpoint) {
45
+ @include breakpoint.from($child-breakpoint) {
50
46
  @include loopProperties($properties, $child-value, $is-important);
51
47
  }
52
48
  }
@@ -55,6 +51,16 @@
55
51
  }
56
52
  }
57
53
  }
54
+ } @else if type.isList($data) {
55
+ @each $value in $data {
56
+ #{$prefix}#{$affix}#{$value}#{$suffix} {
57
+ @include loopProperties($properties, $value, $is-important);
58
+ }
59
+ }
60
+ } @else {
61
+ #{$prefix}#{$affix}#{$data}#{$suffix} {
62
+ @include loopProperties($properties, $data, $is-important);
63
+ }
58
64
  }
59
65
  }
60
66
  }
@@ -71,9 +77,9 @@
71
77
  * @param $suffix ?string String to append to the selector
72
78
  */
73
79
  @mixin loopBreakpoints($breakpoints, $data, $properties, $prefix, $is-important:false, $suffix:'') {
74
- @if isNotEmpty($breakpoints) and isNotEmpty($data) {
80
+ @if empty.isNotEmpty($breakpoints) and empty.isNotEmpty($data) {
75
81
  @each $breakpoint in $breakpoints {
76
- @include breakpoint($breakpoint) {
82
+ @include breakpoint.from($breakpoint) {
77
83
  $suffixes: #{$suffix}\@#{$breakpoint};
78
84
  @include loop($data, $properties, $prefix, $is-important, $suffixes);
79
85
  }
@@ -93,12 +99,12 @@
93
99
  * @param $suffix ?string String to append to the selector
94
100
  */
95
101
  @mixin loopMapKeys($keys, $map, $properties, $prefix, $is-important:false, $suffix:'') {
96
- @if isNotEmpty($keys) {
102
+ @if empty.isNotEmpty($keys) {
97
103
  $affix: '-';
98
104
 
99
105
  @each $key in $keys {
100
- @if map-has-key($map, $key) {
101
- $value: map-get($map, $key);
106
+ @if map.has-key($map, $key) {
107
+ $value: map.get($map, $key);
102
108
  $selector: #{$prefix}#{$affix}#{$key}#{$suffix};
103
109
 
104
110
  #{$selector}{
@@ -1,28 +1,19 @@
1
+ @use '../mixins/loop';
2
+ @use '../variables' as v;
3
+
1
4
  /**
2
5
  * Color Utilities
3
6
  */
4
7
 
5
8
  // Text colors
6
- $text-colors: () !default;
7
- $text-colors-classes: $colors-classes !default;
8
- $text-colors-is-important: true !default;
9
-
10
- @include loop($text-colors, 'color', '.color', $text-colors-is-important);
11
- @include loopMapKeys($text-colors-classes, $colors, 'color', '.color', $text-colors-is-important);
9
+ @include loop.loop(v.$text-colors, 'color', '.color', v.$text-colors-is-important);
10
+ @include loop.loopMapKeys(v.$text-colors-classes, v.$colors, 'color', '.color', v.$text-colors-is-important);
12
11
 
13
12
  // Bg colors
14
- $bg-colors: () !default;
15
- $bg-colors-classes: $colors-classes !default;
16
- $bg-colors-is-important: false !default;
17
-
18
- @include loop($bg-colors, 'background-color', '.bg', $bg-colors-is-important);
19
- @include loopMapKeys($bg-colors-classes, $colors, 'background-color', '.bg', $bg-colors-is-important);
13
+ @include loop.loop(v.$bg-colors, 'background-color', '.bg', v.$bg-colors-is-important);
14
+ @include loop.loopMapKeys(v.$bg-colors-classes, v.$colors, 'background-color', '.bg', v.$bg-colors-is-important);
20
15
 
21
16
  // Border colors
22
- $border-colors: () !default;
23
- $border-colors-classes: $colors-classes !default;
24
- $border-colors-is-important: true !default;
25
-
26
- @include loop($border-colors, 'border-color', '.border', $border-colors-is-important);
27
- @include loopMapKeys($border-colors-classes, $colors, 'border-color', '.border', $border-colors-is-important);
17
+ @include loop.loop(v.$border-colors, 'border-color', '.border', v.$border-colors-is-important);
18
+ @include loop.loopMapKeys(v.$border-colors-classes, v.$colors, 'border-color', '.border', v.$border-colors-is-important);
28
19
 
@@ -1,25 +1,24 @@
1
+ @use '../variables' as v;
2
+ @use '../mixins/breakpoint';
3
+
1
4
  /**
2
5
  * Container
3
6
  */
4
7
 
5
- $container-gutter: 1.6rem !default;
6
- $container-gutter-sm: 2.4rem !default;
7
- $containers-max-width: 1080px !default;
8
-
9
8
  .container,
10
9
  .container-fluid {
11
10
  margin-left: auto;
12
11
  margin-right: auto;
13
12
 
14
- padding-right: $container-gutter;
15
- padding-left: $container-gutter;
13
+ padding-right: v.$container-gutter;
14
+ padding-left: v.$container-gutter;
16
15
 
17
16
  display: block;
18
- max-width: $containers-max-width;
17
+ max-width: v.$containers-max-width;
19
18
 
20
- @include breakpoint(sm) {
21
- padding-left: $container-gutter-sm;
22
- padding-right: $container-gutter-sm;
19
+ @include breakpoint.from(sm) {
20
+ padding-left: v.$container-gutter-sm;
21
+ padding-right: v.$container-gutter-sm;
23
22
  }
24
23
  }
25
24
 
@@ -1,17 +1,13 @@
1
+ @use '../variables' as v;
2
+ @use '../mixins/clearfix';
3
+ @use '../mixins/loop';
4
+
1
5
  /**
2
6
  * FLoat utilites
3
7
  */
4
8
 
5
- $float: (
6
- 'left': left,
7
- 'right': right,
8
- ) !default;
9
- $float-breakpoints-classes: $breakpoints-classes !default;
10
- $float-is-important: true !default;
11
-
12
-
13
- @include loop($float, 'float', '.float', $float-is-important);
14
- @include loopBreakpoints($float-breakpoints-classes, $float, 'float', '.float', $float-is-important);
9
+ @include loop.loop(v.$float, 'float', '.float', v.$float-is-important);
10
+ @include loop.loopBreakpoints(v.$float-breakpoints-classes, v.$float, 'float', '.float', v.$float-is-important);
15
11
 
16
- .clearfix { @include clearfix; }
12
+ .clearfix { @include clearfix.clearfix; }
17
13
  .clear { clear: both; }