@enigmatry/scss-foundation 17.0.0-preview.5.1 → 17.0.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 (59) hide show
  1. package/README.md +18 -18
  2. package/coverage/clover.xml +2 -2
  3. package/coverage/lcov-report/index.html +1 -1
  4. package/docs/modules/README.md +19 -19
  5. package/docs/modules/absolute-positioning.md +28 -28
  6. package/docs/modules/alignment.md +45 -45
  7. package/docs/modules/background-hover.md +18 -18
  8. package/docs/modules/border-radius.md +19 -19
  9. package/docs/modules/breakpoints.md +27 -27
  10. package/docs/modules/fixed-positioning.md +28 -28
  11. package/docs/modules/grid.md +46 -46
  12. package/docs/modules/row-coloring.md +23 -23
  13. package/docs/modules/text-hover.md +18 -18
  14. package/docs/modules/text-modification.md +27 -27
  15. package/docs/modules/visibility.md +27 -27
  16. package/docs/partials/README.md +14 -14
  17. package/docs/partials/alignment.md +15 -15
  18. package/docs/partials/cursor.md +13 -13
  19. package/docs/partials/resize.md +9 -9
  20. package/docs/partials/text-control.md +11 -11
  21. package/docs/partials/visibility.md +9 -9
  22. package/jest.config.js +21 -21
  23. package/package.json +24 -24
  24. package/src/modules/_index.scss +7 -7
  25. package/src/modules/_map.scss +53 -53
  26. package/src/modules/_variables.scss +11 -11
  27. package/src/modules/borders/_border-radius.scss +10 -10
  28. package/src/modules/display/_items.scss +21 -21
  29. package/src/modules/layout/_grid-core.scss +53 -53
  30. package/src/modules/layout/_grid.scss +98 -98
  31. package/src/modules/layout/_index.scss +1 -1
  32. package/src/modules/lists/_row-coloring.scss +12 -12
  33. package/src/modules/position/_absolute.scss +8 -8
  34. package/src/modules/position/_fixed.scss +8 -8
  35. package/src/modules/position/_index.scss +2 -2
  36. package/src/modules/position/_set-position.scss +24 -24
  37. package/src/modules/responsiveness/_breakpoints.scss +55 -55
  38. package/src/modules/states/_hover.scss +6 -6
  39. package/src/modules/states/_index.scss +1 -1
  40. package/src/modules/states/_visibility.scss +15 -15
  41. package/src/modules/text/_hover.scss +6 -6
  42. package/src/modules/text/_index.scss +1 -1
  43. package/src/modules/text/_modification.scss +29 -29
  44. package/src/partials/core/_index.scss +2 -2
  45. package/src/partials/core/fonts/_text-control.scss +10 -10
  46. package/src/partials/core/layouts/_alignment.scss +21 -21
  47. package/src/partials/core/states/_cursors.scss +10 -10
  48. package/src/partials/core/states/_index.scss +2 -2
  49. package/src/partials/core/states/_resize.scss +2 -2
  50. package/src/partials/core/states/_visibility.scss +2 -2
  51. package/tests/display/items.tests.scss +99 -99
  52. package/tests/layout/grid-core.tests.scss +115 -115
  53. package/tests/layout/grid.tests.scss +1154 -1154
  54. package/tests/lists/row-coloring.tests.scss +51 -51
  55. package/tests/position/absolute.tests.scss +67 -67
  56. package/tests/position/fixed.tests.scss +67 -67
  57. package/tests/position/set-position.tests.scss +64 -64
  58. package/tests/shim.test.js +13 -13
  59. package/tests/text/modification.tests.scss +20 -20
@@ -1,54 +1,54 @@
1
- $breakpoints: () !default;
2
- @use 'sass:map';
3
- @use '../../modules/responsiveness/breakpoints' as breakpoints;
4
-
5
- @mixin generate($column-prefix, $offset-prefix, $spacing: 0) {
6
- .row {
7
- display: flex;
8
- flex-wrap: wrap;
9
-
10
- @if $spacing != 0 {
11
- margin: 0 -#{$spacing};
12
- }
13
-
14
- [class*='#{$column-prefix}'], [class*='#{$offset-prefix}'] {
15
- box-sizing: border-box;
16
- flex-shrink: 0;
17
- max-width: 100%;
18
- padding: 0 $spacing;
19
- }
20
- }
21
-
22
- #{'.' + $column-prefix}auto {
23
- flex: 0 0 auto;
24
- width: auto;
25
- padding: 0 $spacing;
26
- }
27
- }
28
-
29
- @mixin generate-reverse-row($breakpoints) {
30
- $reverse-prefix: '.row.reverse-row-';
31
- $under: 'under-';
32
-
33
- @each $item, $value in $breakpoints {
34
- $size: map.get($value, description);
35
-
36
- @include breakpoints.apply-on($item) {
37
- #{$reverse-prefix + $size} {
38
- flex-direction: row-reverse;
39
- }
40
- }
41
- }
42
-
43
- @each $item, $value in $breakpoints {
44
- $size: map.get($value, description);
45
-
46
- #{$reverse-prefix + $under + $size} {
47
- flex-direction: row-reverse;
48
-
49
- @include breakpoints.apply-on($item) {
50
- flex-direction: row;
51
- }
52
- }
53
- }
1
+ $breakpoints: () !default;
2
+ @use 'sass:map';
3
+ @use '../../modules/responsiveness/breakpoints' as breakpoints;
4
+
5
+ @mixin generate($column-prefix, $offset-prefix, $spacing: 0) {
6
+ .row {
7
+ display: flex;
8
+ flex-wrap: wrap;
9
+
10
+ @if $spacing != 0 {
11
+ margin: 0 -#{$spacing};
12
+ }
13
+
14
+ [class*='#{$column-prefix}'], [class*='#{$offset-prefix}'] {
15
+ box-sizing: border-box;
16
+ flex-shrink: 0;
17
+ max-width: 100%;
18
+ padding: 0 $spacing;
19
+ }
20
+ }
21
+
22
+ #{'.' + $column-prefix}auto {
23
+ flex: 0 0 auto;
24
+ width: auto;
25
+ padding: 0 $spacing;
26
+ }
27
+ }
28
+
29
+ @mixin generate-reverse-row($breakpoints) {
30
+ $reverse-prefix: '.row.reverse-row-';
31
+ $under: 'under-';
32
+
33
+ @each $item, $value in $breakpoints {
34
+ $size: map.get($value, description);
35
+
36
+ @include breakpoints.apply-on($item) {
37
+ #{$reverse-prefix + $size} {
38
+ flex-direction: row-reverse;
39
+ }
40
+ }
41
+ }
42
+
43
+ @each $item, $value in $breakpoints {
44
+ $size: map.get($value, description);
45
+
46
+ #{$reverse-prefix + $under + $size} {
47
+ flex-direction: row-reverse;
48
+
49
+ @include breakpoints.apply-on($item) {
50
+ flex-direction: row;
51
+ }
52
+ }
53
+ }
54
54
  }
@@ -1,99 +1,99 @@
1
- $breakpoints: () !default;
2
-
3
- @use 'sass:string';
4
- @use 'sass:map';
5
- @use 'sass:math';
6
- @use 'sass:meta';
7
- @use 'sass-true';
8
- @use 'sass-true/sass/throw';
9
- @use '../../modules/variables' as vars;
10
- @use 'sass:list';
11
- @forward '../../modules/responsiveness/breakpoints' with (
12
- $breakpoints: $breakpoints
13
- );
14
- @use '../../modules/responsiveness/breakpoints';
15
- @use 'grid-core';
16
-
17
- @if list.length($breakpoints) == 0 {
18
- $breakpoints: vars.$default-breakpoints;
19
- }
20
-
21
- $column-prefix: 'col-';
22
- $offset-prefix: 'offset-';
23
-
24
- @mixin generate($spacing:0, $divisions: 12) {
25
- @if meta.type-of($spacing) != number {
26
- @include throw.error(
27
- $message: 'Please provide number parameter! Given value: ' + $spacing,
28
- $source: 'generate($spacing, $divisions)',
29
- $catch: vars.$testing
30
- );
31
- }
32
- @else {
33
- @if ((meta.type-of($divisions) != number) or (($divisions < 2) or ($divisions > 1000))) {
34
- @include throw.error(
35
- $message: 'Please provide positive number for divisions, between 2 and 1000! Given value: ' + $divisions,
36
- $source: 'generate($spacing, $divisions)',
37
- $catch: vars.$testing
38
- );
39
- }
40
-
41
- @else {
42
- @include grid-core.generate($column-prefix, $offset-prefix, $spacing);
43
- @include grid-core.generate-reverse-row($breakpoints);
44
- @include -unresponsive-grid-from($spacing, $divisions);
45
- @include -responsive-grid-from($spacing, $divisions);
46
- }
47
- }
48
- }
49
-
50
- @function -calculate-ratio($counter, $divisions) {
51
- @return math.div(100% * $counter, $divisions);
52
- }
53
-
54
- @mixin -unresponsive-grid-from($spacing, $divisions) {
55
- $division-limit: $divisions + 1;
56
-
57
- @for $currentIndex from 1 to ($division-limit) {
58
- $current-ratio: -calculate-ratio($currentIndex, $divisions);
59
-
60
- #{'.' + $column-prefix + $currentIndex} {
61
- flex: 0 0 auto;
62
- width: $current-ratio;
63
- padding: 0 $spacing;
64
- }
65
-
66
- #{'.' + $offset-prefix + $currentIndex} {
67
- margin-left: $current-ratio;
68
- }
69
- }
70
- }
71
-
72
- @mixin -responsive-grid-from($spacing, $divisions) {
73
- $division-limit: $divisions + 1;
74
- @each $item, $value in $breakpoints {
75
- $size: map.get($value, description);
76
-
77
- @include breakpoints.apply-on($item) {
78
- #{'.' + $column-prefix + $size}-auto {
79
- flex: 0 0 auto;
80
- width: auto;
81
- padding: 0 $spacing;
82
- }
83
-
84
- @for $currentIndex from 1 to $division-limit {
85
- $current-ratio: -calculate-ratio($currentIndex, $divisions);
86
- $size-index-suffix: $size + '-' + $currentIndex;
87
-
88
- #{'.' + $column-prefix + $size-index-suffix} {
89
- flex: 0 0 auto;
90
- width: $current-ratio;
91
- }
92
-
93
- #{'.' + $offset-prefix + $size-index-suffix} {
94
- margin-left: $current-ratio;
95
- }
96
- }
97
- }
98
- }
1
+ $breakpoints: () !default;
2
+
3
+ @use 'sass:string';
4
+ @use 'sass:map';
5
+ @use 'sass:math';
6
+ @use 'sass:meta';
7
+ @use 'sass-true';
8
+ @use 'sass-true/sass/throw';
9
+ @use '../../modules/variables' as vars;
10
+ @use 'sass:list';
11
+ @forward '../../modules/responsiveness/breakpoints' with (
12
+ $breakpoints: $breakpoints
13
+ );
14
+ @use '../../modules/responsiveness/breakpoints';
15
+ @use 'grid-core';
16
+
17
+ @if list.length($breakpoints) == 0 {
18
+ $breakpoints: vars.$default-breakpoints;
19
+ }
20
+
21
+ $column-prefix: 'col-';
22
+ $offset-prefix: 'offset-';
23
+
24
+ @mixin generate($spacing:0, $divisions: 12) {
25
+ @if meta.type-of($spacing) != number {
26
+ @include throw.error(
27
+ $message: 'Please provide number parameter! Given value: ' + $spacing,
28
+ $source: 'generate($spacing, $divisions)',
29
+ $catch: vars.$testing
30
+ );
31
+ }
32
+ @else {
33
+ @if ((meta.type-of($divisions) != number) or (($divisions < 2) or ($divisions > 1000))) {
34
+ @include throw.error(
35
+ $message: 'Please provide positive number for divisions, between 2 and 1000! Given value: ' + $divisions,
36
+ $source: 'generate($spacing, $divisions)',
37
+ $catch: vars.$testing
38
+ );
39
+ }
40
+
41
+ @else {
42
+ @include grid-core.generate($column-prefix, $offset-prefix, $spacing);
43
+ @include grid-core.generate-reverse-row($breakpoints);
44
+ @include -unresponsive-grid-from($spacing, $divisions);
45
+ @include -responsive-grid-from($spacing, $divisions);
46
+ }
47
+ }
48
+ }
49
+
50
+ @function -calculate-ratio($counter, $divisions) {
51
+ @return math.div(100% * $counter, $divisions);
52
+ }
53
+
54
+ @mixin -unresponsive-grid-from($spacing, $divisions) {
55
+ $division-limit: $divisions + 1;
56
+
57
+ @for $currentIndex from 1 to ($division-limit) {
58
+ $current-ratio: -calculate-ratio($currentIndex, $divisions);
59
+
60
+ #{'.' + $column-prefix + $currentIndex} {
61
+ flex: 0 0 auto;
62
+ width: $current-ratio;
63
+ padding: 0 $spacing;
64
+ }
65
+
66
+ #{'.' + $offset-prefix + $currentIndex} {
67
+ margin-left: $current-ratio;
68
+ }
69
+ }
70
+ }
71
+
72
+ @mixin -responsive-grid-from($spacing, $divisions) {
73
+ $division-limit: $divisions + 1;
74
+ @each $item, $value in $breakpoints {
75
+ $size: map.get($value, description);
76
+
77
+ @include breakpoints.apply-on($item) {
78
+ #{'.' + $column-prefix + $size}-auto {
79
+ flex: 0 0 auto;
80
+ width: auto;
81
+ padding: 0 $spacing;
82
+ }
83
+
84
+ @for $currentIndex from 1 to $division-limit {
85
+ $current-ratio: -calculate-ratio($currentIndex, $divisions);
86
+ $size-index-suffix: $size + '-' + $currentIndex;
87
+
88
+ #{'.' + $column-prefix + $size-index-suffix} {
89
+ flex: 0 0 auto;
90
+ width: $current-ratio;
91
+ }
92
+
93
+ #{'.' + $offset-prefix + $size-index-suffix} {
94
+ margin-left: $current-ratio;
95
+ }
96
+ }
97
+ }
98
+ }
99
99
  }
@@ -1,2 +1,2 @@
1
- @use 'grid';
1
+ @use 'grid';
2
2
  @use 'grid-core';
@@ -1,13 +1,13 @@
1
- @mixin odd-row-coloring($color) {
2
- @include row-coloring($color, odd);
3
- }
4
-
5
- @mixin even-row-coloring($color) {
6
- @include row-coloring($color, even);
7
- }
8
-
9
- @mixin row-coloring($color, $rows) {
10
- &:nth-child(#{$rows}) {
11
- background-color: $color;
12
- }
1
+ @mixin odd-row-coloring($color) {
2
+ @include row-coloring($color, odd);
3
+ }
4
+
5
+ @mixin even-row-coloring($color) {
6
+ @include row-coloring($color, even);
7
+ }
8
+
9
+ @mixin row-coloring($color, $rows) {
10
+ &:nth-child(#{$rows}) {
11
+ background-color: $color;
12
+ }
13
13
  }
@@ -1,9 +1,9 @@
1
- @use 'set-position' as set;
2
-
3
- @mixin position($top: 0, $right: 0, $bottom: 0, $left: 0) {
4
- @include set.set-position(absolute, $top, $right, $bottom, $left);
5
- }
6
-
7
- @mixin position-unset($top: unset, $right: unset, $bottom: unset, $left: unset) {
8
- @include set.set-position(absolute, $top, $right, $bottom, $left);
1
+ @use 'set-position' as set;
2
+
3
+ @mixin position($top: 0, $right: 0, $bottom: 0, $left: 0) {
4
+ @include set.set-position(absolute, $top, $right, $bottom, $left);
5
+ }
6
+
7
+ @mixin position-unset($top: unset, $right: unset, $bottom: unset, $left: unset) {
8
+ @include set.set-position(absolute, $top, $right, $bottom, $left);
9
9
  }
@@ -1,9 +1,9 @@
1
- @use 'set-position' as set;
2
-
3
- @mixin position($top: 0, $right: 0, $bottom: 0, $left: 0) {
4
- @include set.set-position(fixed, $top, $right, $bottom, $left);
5
- }
6
-
7
- @mixin position-unset($top: unset, $right: unset, $bottom: unset, $left: unset) {
8
- @include set.set-position(fixed, $top, $right, $bottom, $left);
1
+ @use 'set-position' as set;
2
+
3
+ @mixin position($top: 0, $right: 0, $bottom: 0, $left: 0) {
4
+ @include set.set-position(fixed, $top, $right, $bottom, $left);
5
+ }
6
+
7
+ @mixin position-unset($top: unset, $right: unset, $bottom: unset, $left: unset) {
8
+ @include set.set-position(fixed, $top, $right, $bottom, $left);
9
9
  }
@@ -1,3 +1,3 @@
1
- @use 'set-position';
2
- @use 'absolute';
1
+ @use 'set-position';
2
+ @use 'absolute';
3
3
  @use 'fixed';
@@ -1,25 +1,25 @@
1
- /* stylelint-disable declaration-block-no-redundant-longhand-properties */
2
- /* stylelint-disable declaration-empty-line-before */
3
- @use 'sass:meta';
4
-
5
- @mixin set-position($position, $top, $right, $bottom, $left) {
6
-
7
- $positions: (
8
- $top,
9
- $right,
10
- $bottom,
11
- $left
12
- );
13
-
14
- @each $position in $positions {
15
- @if (($position != 'unset') and (meta.type-of($position) != number)) {
16
- @error 'Please provide the right parameters for position (number or 'unset')! Given value: ' + $position;
17
- }
18
- }
19
-
20
- position: $position;
21
- top: $top;
22
- right: $right;
23
- bottom: $bottom;
24
- left: $left;
1
+ /* stylelint-disable declaration-block-no-redundant-longhand-properties */
2
+ /* stylelint-disable declaration-empty-line-before */
3
+ @use 'sass:meta';
4
+
5
+ @mixin set-position($position, $top, $right, $bottom, $left) {
6
+
7
+ $positions: (
8
+ $top,
9
+ $right,
10
+ $bottom,
11
+ $left
12
+ );
13
+
14
+ @each $position in $positions {
15
+ @if (($position != 'unset') and (meta.type-of($position) != number)) {
16
+ @error 'Please provide the right parameters for position (number or 'unset')! Given value: ' + $position;
17
+ }
18
+ }
19
+
20
+ position: $position;
21
+ top: $top;
22
+ right: $right;
23
+ bottom: $bottom;
24
+ left: $left;
25
25
  }
@@ -1,56 +1,56 @@
1
- /* stylelint-disable at-rule-allowed-list */
2
- $breakpoints: () !default;
3
-
4
- @use 'sass:list';
5
- @use 'sass:string';
6
- @use 'sass:map';
7
- @use '../../modules/text/modification' as text-modification;
8
- @use '../../modules/variables' as variables;
9
-
10
- // Had to be done this way due to current limitations of collection initialization in Sass.
11
- @if list.length($breakpoints) == 0 {
12
- $breakpoints: variables.$default-breakpoints;
13
- }
14
-
15
- @function -get-size($size) {
16
- @if (map.has-key($breakpoints, $size)) {
17
- $gotten-size: map.get($breakpoints, $size);
18
- @return map.get($gotten-size, size);
19
- }
20
-
21
- @error 'Size must be any of following values: ' + map.keys($breakpoints) + '. Given size: ' + $size;
22
- }
23
-
24
- @function -presentation($string, $with-capitalization) {
25
- @if $with-capitalization == true {
26
- @return text-modification.capitalize($string);
27
- }
28
-
29
- @return $string;
30
- }
31
-
32
- @mixin -set-content($breakpoint, $with-capitalization) {
33
- content: string.quote(-presentation($breakpoint, $with-capitalization));
34
- }
35
-
36
- @mixin apply-on($given-size) {
37
- @media only screen and (width >= -get-size($given-size)) {
38
- @content;
39
- }
40
- }
41
-
42
- @mixin set-up($with-capitalization: true) {
43
- @each $breakpoint, $value in $breakpoints {
44
- $currentIndex: list.index($breakpoints, ($breakpoint $value));
45
-
46
- @if $currentIndex == 1 {
47
- @include -set-content($breakpoint, $with-capitalization);
48
- display: none;
49
- }
50
- @else {
51
- @include apply-on($breakpoint) {
52
- @include -set-content($breakpoint, $with-capitalization);
53
- }
54
- }
55
- }
1
+ /* stylelint-disable at-rule-allowed-list */
2
+ $breakpoints: () !default;
3
+
4
+ @use 'sass:list';
5
+ @use 'sass:string';
6
+ @use 'sass:map';
7
+ @use '../../modules/text/modification' as text-modification;
8
+ @use '../../modules/variables' as variables;
9
+
10
+ // Had to be done this way due to current limitations of collection initialization in Sass.
11
+ @if list.length($breakpoints) == 0 {
12
+ $breakpoints: variables.$default-breakpoints;
13
+ }
14
+
15
+ @function -get-size($size) {
16
+ @if (map.has-key($breakpoints, $size)) {
17
+ $gotten-size: map.get($breakpoints, $size);
18
+ @return map.get($gotten-size, size);
19
+ }
20
+
21
+ @error 'Size must be any of following values: ' + map.keys($breakpoints) + '. Given size: ' + $size;
22
+ }
23
+
24
+ @function -presentation($string, $with-capitalization) {
25
+ @if $with-capitalization == true {
26
+ @return text-modification.capitalize($string);
27
+ }
28
+
29
+ @return $string;
30
+ }
31
+
32
+ @mixin -set-content($breakpoint, $with-capitalization) {
33
+ content: string.quote(-presentation($breakpoint, $with-capitalization));
34
+ }
35
+
36
+ @mixin apply-on($given-size) {
37
+ @media only screen and (width >= -get-size($given-size)) {
38
+ @content;
39
+ }
40
+ }
41
+
42
+ @mixin set-up($with-capitalization: true) {
43
+ @each $breakpoint, $value in $breakpoints {
44
+ $currentIndex: list.index($breakpoints, ($breakpoint $value));
45
+
46
+ @if $currentIndex == 1 {
47
+ @include -set-content($breakpoint, $with-capitalization);
48
+ display: none;
49
+ }
50
+ @else {
51
+ @include apply-on($breakpoint) {
52
+ @include -set-content($breakpoint, $with-capitalization);
53
+ }
54
+ }
55
+ }
56
56
  }
@@ -1,7 +1,7 @@
1
- @mixin background-hover($regular-state, $hover-state) {
2
- background-color: $regular-state;
3
-
4
- &:hover, &:hover::before {
5
- background-color: $hover-state;
6
- }
1
+ @mixin background-hover($regular-state, $hover-state) {
2
+ background-color: $regular-state;
3
+
4
+ &:hover, &:hover::before {
5
+ background-color: $hover-state;
6
+ }
7
7
  }
@@ -1,2 +1,2 @@
1
- @use 'hover';
1
+ @use 'hover';
2
2
  @use 'visibility';
@@ -1,15 +1,15 @@
1
- @mixin show-on-mobile($mobile-state: block) {
2
- @include -toggle-state($mobile-state, none);
3
- }
4
-
5
- @mixin show-on-tablet($tablet-state: block) {
6
- @include -toggle-state(none, $tablet-state);
7
- }
8
-
9
- @mixin -toggle-state($mobile-state, $tablet-state) {
10
- display: $mobile-state;
11
-
12
- @include breakpoints.apply-on-tablet() {
13
- display: $tablet-state;
14
- }
15
- }
1
+ @mixin show-on-mobile($mobile-state: block) {
2
+ @include -toggle-state($mobile-state, none);
3
+ }
4
+
5
+ @mixin show-on-tablet($tablet-state: block) {
6
+ @include -toggle-state(none, $tablet-state);
7
+ }
8
+
9
+ @mixin -toggle-state($mobile-state, $tablet-state) {
10
+ display: $mobile-state;
11
+
12
+ @include breakpoints.apply-on-tablet() {
13
+ display: $tablet-state;
14
+ }
15
+ }
@@ -1,7 +1,7 @@
1
- @mixin font-hover($regular-state, $hover-state) {
2
- color: $regular-state;
3
-
4
- &:hover, &:hover::before {
5
- color: $hover-state;
6
- }
1
+ @mixin font-hover($regular-state, $hover-state) {
2
+ color: $regular-state;
3
+
4
+ &:hover, &:hover::before {
5
+ color: $hover-state;
6
+ }
7
7
  }
@@ -1,2 +1,2 @@
1
- @use 'modification';
1
+ @use 'modification';
2
2
  @use 'hover';
@@ -1,30 +1,30 @@
1
- @use 'sass:string';
2
- @use '../../modules/variables' as vars;
3
- @use 'sass-true';
4
- @use 'sass:meta';
5
-
6
- @function capitalize($string) {
7
- @if meta.type-of($string) != string {
8
- @return sass-true.error(
9
- $message: 'Please provide string parameter! Given value: ' + $string,
10
- $source: 'capitalize()',
11
- $catch: vars.$testing
12
- );
13
- }
14
-
15
- @return string.to-upper-case(string.slice($string, 1, 1)) + string.slice($string, 2);
16
- }
17
-
18
- @mixin ellipsis($num: 1) {
19
- overflow: hidden;
20
- text-overflow: ellipsis;
21
- white-space: nowrap;
22
-
23
- @if $num > 1 {
24
- white-space: unset;
25
- /* stylelint-disable-next-line order/properties-order, value-no-vendor-prefix */
26
- display: -webkit-box;
27
- -webkit-line-clamp: $num;
28
- -webkit-box-orient: vertical;
29
- }
1
+ @use 'sass:string';
2
+ @use '../../modules/variables' as vars;
3
+ @use 'sass-true';
4
+ @use 'sass:meta';
5
+
6
+ @function capitalize($string) {
7
+ @if meta.type-of($string) != string {
8
+ @return sass-true.error(
9
+ $message: 'Please provide string parameter! Given value: ' + $string,
10
+ $source: 'capitalize()',
11
+ $catch: vars.$testing
12
+ );
13
+ }
14
+
15
+ @return string.to-upper-case(string.slice($string, 1, 1)) + string.slice($string, 2);
16
+ }
17
+
18
+ @mixin ellipsis($num: 1) {
19
+ overflow: hidden;
20
+ text-overflow: ellipsis;
21
+ white-space: nowrap;
22
+
23
+ @if $num > 1 {
24
+ white-space: unset;
25
+ /* stylelint-disable-next-line order/properties-order, value-no-vendor-prefix */
26
+ display: -webkit-box;
27
+ -webkit-line-clamp: $num;
28
+ -webkit-box-orient: vertical;
29
+ }
30
30
  }