yummacss 3.0.3 → 3.1.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.
- package/README.md +66 -66
- package/dist/cli/commands/init.js +3 -5
- package/dist/cli/services/configLoader.js +4 -30
- package/package.json +58 -65
- package/src/_fonts.scss +16 -16
- package/src/abstracts/_breakpoints.scss +45 -45
- package/src/abstracts/_index.scss +5 -5
- package/src/abstracts/_theme.scss +21 -21
- package/src/abstracts/_variables.scss +83 -82
- package/src/abstracts/functions/_create-values.scss +16 -16
- package/src/abstracts/functions/_ignore-neutral.scss +7 -9
- package/src/abstracts/functions/_index.scss +2 -2
- package/src/abstracts/mixins/_create-colors.scss +90 -41
- package/src/abstracts/mixins/_create-utilities.scss +53 -39
- package/src/abstracts/mixins/_index.scss +2 -2
- package/src/reset/_stylecent.scss +231 -231
- package/src/utilities/_background.scss +95 -95
- package/src/utilities/_border.scss +313 -313
- package/src/utilities/_box-model.scss +290 -290
- package/src/utilities/_color.scss +85 -72
- package/src/utilities/_effect.scss +98 -98
- package/src/utilities/_flexbox.scss +213 -175
- package/src/utilities/_grid.scss +322 -322
- package/src/utilities/_index.scss +14 -14
- package/src/utilities/_interactivity.scss +304 -304
- package/src/utilities/_outline.scss +53 -53
- package/src/utilities/_positioning.scss +436 -436
- package/src/utilities/_svg.scss +27 -27
- package/src/utilities/_table.scss +35 -35
- package/src/utilities/_transform.scss +164 -164
- package/src/utilities/_typography.scss +278 -278
- package/src/utilities/maps/_index.scss +12 -12
- package/src/utilities/maps/box-model/_dimension.scss +16 -16
- package/src/utilities/maps/box-model/_height.scss +16 -16
- package/src/utilities/maps/box-model/_margin.scss +10 -10
- package/src/utilities/maps/box-model/_padding.scss +10 -10
- package/src/utilities/maps/box-model/_width.scss +16 -16
- package/src/utilities/maps/flexbox/_flex-basis.scss +12 -12
- package/src/utilities/maps/grid/_gap.scss +5 -5
- package/src/yummacss-core.scss +3 -3
- package/src/yummacss.scss +4 -4
- package/dist/cli/config/templates.js +0 -33
|
@@ -1,16 +1,16 @@
|
|
|
1
|
-
@use "sass:map";
|
|
2
|
-
|
|
3
|
-
@function create-values($variable, $min: 0, $max: 100) {
|
|
4
|
-
$values: ();
|
|
5
|
-
|
|
6
|
-
@for $i from $min through $max {
|
|
7
|
-
$values: map.merge(
|
|
8
|
-
$values,
|
|
9
|
-
(
|
|
10
|
-
"#{$i}": $variable * $i,
|
|
11
|
-
)
|
|
12
|
-
);
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
@return $values;
|
|
16
|
-
}
|
|
1
|
+
@use "sass:map";
|
|
2
|
+
|
|
3
|
+
@function create-values($variable, $min: 0, $max: 100) {
|
|
4
|
+
$values: ();
|
|
5
|
+
|
|
6
|
+
@for $i from $min through $max {
|
|
7
|
+
$values: map.merge(
|
|
8
|
+
$values,
|
|
9
|
+
(
|
|
10
|
+
"#{$i}": $variable * $i,
|
|
11
|
+
)
|
|
12
|
+
);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
@return $values;
|
|
16
|
+
}
|
|
@@ -1,9 +1,7 @@
|
|
|
1
|
-
@use "../theme" as *;
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
@
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
and $v != map.get($yma-theme, "transparent");
|
|
9
|
-
}
|
|
1
|
+
@use "../theme" as *;
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
@function ignore-neutral($v, $yma-theme) {
|
|
5
|
+
@return $v != map.get($yma-theme, "black") and $v !=
|
|
6
|
+
map.get($yma-theme, "white") and $v != map.get($yma-theme, "transparent");
|
|
7
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@forward "ignore-neutral";
|
|
2
|
-
@forward "create-values";
|
|
1
|
+
@forward "ignore-neutral";
|
|
2
|
+
@forward "create-values";
|
|
@@ -1,41 +1,90 @@
|
|
|
1
|
-
@use "sass:color";
|
|
2
|
-
|
|
3
|
-
@mixin color-scaling($property, $prefix, $k, $v) {
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
}
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
}
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
}
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
1
|
+
@use "sass:color";
|
|
2
|
+
|
|
3
|
+
@mixin color-scaling($property, $prefix, $k, $v) {
|
|
4
|
+
|
|
5
|
+
// base styles
|
|
6
|
+
.#{$prefix}-#{$k} {
|
|
7
|
+
#{$property}: $v;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
// focus styles
|
|
11
|
+
.f\:#{$prefix}-#{$k} {
|
|
12
|
+
&:focus {
|
|
13
|
+
#{$property}: $v;
|
|
14
|
+
}
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// active styles
|
|
18
|
+
.a\:#{$prefix}-#{$k} {
|
|
19
|
+
&:active {
|
|
20
|
+
#{$property}: $v;
|
|
21
|
+
}
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
// hover styles
|
|
25
|
+
.h\:#{$prefix}-#{$k} {
|
|
26
|
+
&:hover {
|
|
27
|
+
#{$property}: $v;
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
@mixin shade-scaling($property, $prefix, $k, $v, $percentage) {
|
|
33
|
+
@for $i from 1 through 13 {
|
|
34
|
+
@if $i <=6 {
|
|
35
|
+
|
|
36
|
+
// base styles
|
|
37
|
+
.#{$prefix}-#{$k}-#{$i} {
|
|
38
|
+
#{$property}: color.mix(white, $v, (7 - $i) * $percentage);
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// focus styles
|
|
42
|
+
.f\:#{$prefix}-#{$k}-#{$i} {
|
|
43
|
+
&:focus {
|
|
44
|
+
#{$property}: color.mix(white, $v, (7 - $i) * $percentage);
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// active styles
|
|
49
|
+
.a\:#{$prefix}-#{$k}-#{$i} {
|
|
50
|
+
&:active {
|
|
51
|
+
#{$property}: color.mix(white, $v, (7 - $i) * $percentage);
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
// hover styles
|
|
56
|
+
.h\:#{$prefix}-#{$k}-#{$i} {
|
|
57
|
+
&:hover {
|
|
58
|
+
#{$property}: color.mix(white, $v, (7 - $i) * $percentage);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
} @else if $i >7 {
|
|
62
|
+
|
|
63
|
+
// base styles
|
|
64
|
+
.#{$prefix}-#{$k}-#{$i - 1} {
|
|
65
|
+
#{$property}: color.mix(black, $v, ($i - 7) * $percentage);
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
// focus styles
|
|
69
|
+
.f\:#{$prefix}-#{$k}-#{$i - 1} {
|
|
70
|
+
&:focus {
|
|
71
|
+
#{$property}: color.mix(black, $v, ($i - 7) * $percentage);
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
// active styles
|
|
76
|
+
.a\:#{$prefix}-#{$k}-#{$i - 1} {
|
|
77
|
+
&:active {
|
|
78
|
+
#{$property}: color.mix(black, $v, ($i - 7) * $percentage);
|
|
79
|
+
}
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
// hover styles
|
|
83
|
+
.h\:#{$prefix}-#{$k}-#{$i - 1} {
|
|
84
|
+
&:hover {
|
|
85
|
+
#{$property}: color.mix(black, $v, ($i - 7) * $percentage);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
}
|
|
90
|
+
}
|
|
@@ -1,39 +1,53 @@
|
|
|
1
|
-
@use "../breakpoints" as bp;
|
|
2
|
-
@use "sass:map";
|
|
3
|
-
|
|
4
|
-
@mixin create-utilities($map, $prefix, $properties) {
|
|
5
|
-
$function: if(
|
|
6
|
-
map.has-key($map, "property-function"),
|
|
7
|
-
map.get($map, "property-function"),
|
|
8
|
-
null
|
|
9
|
-
);
|
|
10
|
-
|
|
11
|
-
// base styles
|
|
12
|
-
@each $k, $v in map.get($map, "values") {
|
|
13
|
-
.#{$prefix}-#{$k} {
|
|
14
|
-
@each $property in $properties {
|
|
15
|
-
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
16
|
-
}
|
|
17
|
-
}
|
|
18
|
-
|
|
19
|
-
//
|
|
20
|
-
.
|
|
21
|
-
@each $property in $properties {
|
|
22
|
-
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
23
|
-
}
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
}
|
|
1
|
+
@use "../breakpoints" as bp;
|
|
2
|
+
@use "sass:map";
|
|
3
|
+
|
|
4
|
+
@mixin create-utilities($map, $prefix, $properties) {
|
|
5
|
+
$function: if(
|
|
6
|
+
map.has-key($map, "property-function"),
|
|
7
|
+
map.get($map, "property-function"),
|
|
8
|
+
null
|
|
9
|
+
);
|
|
10
|
+
|
|
11
|
+
// base styles
|
|
12
|
+
@each $k, $v in map.get($map, "values") {
|
|
13
|
+
.#{$prefix}-#{$k} {
|
|
14
|
+
@each $property in $properties {
|
|
15
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
16
|
+
}
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// active styles
|
|
20
|
+
.a\:#{$prefix}-#{$k}:active {
|
|
21
|
+
@each $property in $properties {
|
|
22
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
23
|
+
}
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
// focus styles
|
|
27
|
+
.f\:#{$prefix}-#{$k}:focus {
|
|
28
|
+
@each $property in $properties {
|
|
29
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// hover styles
|
|
34
|
+
.h\:#{$prefix}-#{$k}:hover {
|
|
35
|
+
@each $property in $properties {
|
|
36
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
// responsive styles
|
|
42
|
+
@each $bp, $bp-value in bp.$yma-breakpoints {
|
|
43
|
+
@media (min-width: $bp-value) {
|
|
44
|
+
@each $k, $v in map.get($map, "values") {
|
|
45
|
+
.#{$bp}\:#{$prefix}-#{$k} {
|
|
46
|
+
@each $property in $properties {
|
|
47
|
+
#{$property}: if($function != null, $function + "(" + $v + ")", $v);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
@forward "create-colors";
|
|
2
|
-
@forward "create-utilities";
|
|
1
|
+
@forward "create-colors";
|
|
2
|
+
@forward "create-utilities";
|