yummacss 2.0.0 → 2.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.
@@ -0,0 +1,107 @@
1
+ @use "sass:math";
2
+
3
+ $yma-box-model-utils: (
4
+ "box-sizing": (
5
+ "prefix": "bs",
6
+ "values": (
7
+ "bb": border-box,
8
+ "cb": content-box,
9
+ ),
10
+ ),
11
+ );
12
+
13
+ // base variants
14
+ @each $property, $map in $yma-box-model-utils {
15
+ $prefix: map-get($map, "prefix");
16
+ $values: map-get($map, "values");
17
+
18
+ @each $k, $v in $values {
19
+ @if ($k == "default") {
20
+ .#{$prefix} {
21
+ #{$property}: $v;
22
+ }
23
+ } @else {
24
+ .#{$prefix}-#{$k} {
25
+ #{$property}: $v;
26
+ }
27
+ }
28
+ }
29
+
30
+ // hover variants
31
+ @each $k, $v in $values {
32
+ @if ($k == "default") {
33
+ .h\:#{$prefix}:hover {
34
+ #{$property}: $v;
35
+ }
36
+ } @else {
37
+ .h\:#{$prefix}-#{$k}:hover {
38
+ #{$property}: $v;
39
+ }
40
+ }
41
+ }
42
+
43
+ // responsive variants
44
+ @each $bp, $bp-value in $yma-breakpoints {
45
+ @each $k, $v in $values {
46
+ .#{$bp}\:#{$prefix}-#{$k} {
47
+ @media (min-width: $bp-value) {
48
+ #{$property}: $v;
49
+ }
50
+ }
51
+ }
52
+ }
53
+ }
54
+
55
+ // variants
56
+ @include dimension-variants("dim", $yma-height, $yma-width);
57
+ @include dimension-variants("max-dim", $yma-height, $yma-width);
58
+ @include dimension-variants("min-dim", $yma-height, $yma-width);
59
+ @include spacing-x("s-x", $yma-spacing);
60
+ @include spacing-y("s-y", $yma-spacing);
61
+ @include variants("height", "h", $yma-height);
62
+ @include variants("margin-bottom", "mb", $yma-margin);
63
+ @include variants("margin-left", "ml", $yma-margin);
64
+ @include variants("margin-right", "mr", $yma-margin);
65
+ @include variants("margin-top", "mt", $yma-margin);
66
+ @include variants("margin", "m", $yma-margin);
67
+ @include variants("max-height", "max-h", $yma-height);
68
+ @include variants("max-width", "max-w", $yma-width);
69
+ @include variants("min-height", "min-h", $yma-height);
70
+ @include variants("min-width", "min-w", $yma-width);
71
+ @include variants("padding-bottom", "pb", $yma-padding);
72
+ @include variants("padding-left", "pl", $yma-padding);
73
+ @include variants("padding-right", "pr", $yma-padding);
74
+ @include variants("padding-top", "pt", $yma-padding);
75
+ @include variants("padding", "p", $yma-padding);
76
+ @include variants("width", "w", $yma-width);
77
+ @include x-axis-variants("margin", "mx", $yma-margin);
78
+ @include x-axis-variants("padding", "px", $yma-padding);
79
+ @include y-axis-variants("margin", "my", $yma-margin);
80
+ @include y-axis-variants("padding", "py", $yma-padding);
81
+
82
+ // extensions
83
+ @include extensions(
84
+ $yma-extension,
85
+ (
86
+ "h": height,
87
+ "max-h": max-height,
88
+ "max-w": max-width,
89
+ "min-h": min-height,
90
+ "min-w": min-width,
91
+ "w": width,
92
+ )
93
+ );
94
+
95
+ @include dimension-extensions($yma-extension);
96
+ @include height-extensions($yma-height-extension);
97
+ @include box-model-extensions($yma-extension, ("m"), "margin");
98
+ @include box-model-extensions($yma-extension, ("mb"), "margin-bottom");
99
+ @include box-model-extensions($yma-extension, ("ml"), "margin-left");
100
+ @include box-model-extensions($yma-extension, ("mr"), "margin-right");
101
+ @include box-model-extensions($yma-extension, ("mt"), "margin-top");
102
+ @include box-model-extensions($yma-extension, ("p"), "padding");
103
+ @include box-model-extensions($yma-extension, ("pb"), "padding-bottom");
104
+ @include box-model-extensions($yma-extension, ("pl"), "padding-left");
105
+ @include box-model-extensions($yma-extension, ("pr"), "padding-right");
106
+ @include box-model-extensions($yma-extension, ("pt"), "padding-top");
107
+ @include width-extensions($yma-width-extension);
@@ -0,0 +1,74 @@
1
+ @use "sass:math";
2
+
3
+ $yma-effect-utils: (
4
+ "box-shadow": (
5
+ "prefix": "bs",
6
+ "values": (
7
+ "none": none,
8
+ "xs": 1px 3px 5px -3px rgb(0, 0, 0, 0.1),
9
+ "sm": 1px 3px 5px -2px rgb(0, 0, 0, 0.1),
10
+ "md": 1px 3px 5px -1px rgb(0, 0, 0, 0.1),
11
+ "lg": 1px 3px 5px 1px rgb(0, 0, 0, 0.1),
12
+ "xl": 1px 3px 5px 2px rgb(0, 0, 0, 0.1),
13
+ ),
14
+ ),
15
+
16
+ "opacity": (
17
+ "prefix": "o",
18
+ "values": (
19
+ "0": 0,
20
+ "10": 0.1,
21
+ "20": 0.2,
22
+ "30": 0.3,
23
+ "40": 0.4,
24
+ "50": 0.5,
25
+ "60": 0.6,
26
+ "70": 0.7,
27
+ "80": 0.8,
28
+ "90": 0.9,
29
+ "100": 1,
30
+ ),
31
+ ),
32
+ );
33
+
34
+ // base variants
35
+ @each $property, $map in $yma-effect-utils {
36
+ $prefix: map-get($map, "prefix");
37
+ $values: map-get($map, "values");
38
+
39
+ @each $k, $v in $values {
40
+ @if ($k == "default") {
41
+ .#{$prefix} {
42
+ #{$property}: $v;
43
+ }
44
+ } @else {
45
+ .#{$prefix}-#{$k} {
46
+ #{$property}: $v;
47
+ }
48
+ }
49
+ }
50
+
51
+ // hover variants
52
+ @each $k, $v in $values {
53
+ @if ($k == "default") {
54
+ .h\:#{$prefix}:hover {
55
+ #{$property}: $v;
56
+ }
57
+ } @else {
58
+ .h\:#{$prefix}-#{$k}:hover {
59
+ #{$property}: $v;
60
+ }
61
+ }
62
+ }
63
+
64
+ // responsive variants
65
+ @each $bp, $bp-value in $yma-breakpoints {
66
+ @each $k, $v in $values {
67
+ .#{$bp}\:#{$prefix}-#{$k} {
68
+ @media (min-width: $bp-value) {
69
+ #{$property}: $v;
70
+ }
71
+ }
72
+ }
73
+ }
74
+ }
@@ -0,0 +1,57 @@
1
+ @use "sass:math";
2
+
3
+ $yma-filter-utils: (
4
+ "backdrop-filter": (
5
+ "prefix": "bf-b",
6
+ "values": (
7
+ "none": blur($yma-backdrop-blur * 0),
8
+ "xs": blur($yma-backdrop-blur),
9
+ "sm": blur($yma-backdrop-blur * 2),
10
+ "md": blur($yma-backdrop-blur * 4),
11
+ "lg": blur($yma-backdrop-blur * 8),
12
+ "xl": blur($yma-backdrop-blur * 16),
13
+ ),
14
+ ),
15
+ );
16
+
17
+ // base variants
18
+ @each $property, $map in $yma-filter-utils {
19
+ $prefix: map-get($map, "prefix");
20
+ $values: map-get($map, "values");
21
+
22
+ @each $k, $v in $values {
23
+ @if ($k == "default") {
24
+ .#{$prefix} {
25
+ #{$property}: $v;
26
+ }
27
+ } @else {
28
+ .#{$prefix}-#{$k} {
29
+ #{$property}: $v;
30
+ }
31
+ }
32
+ }
33
+
34
+ // hover variants
35
+ @each $k, $v in $values {
36
+ @if ($k == "default") {
37
+ .h\:#{$prefix}:hover {
38
+ #{$property}: $v;
39
+ }
40
+ } @else {
41
+ .h\:#{$prefix}-#{$k}:hover {
42
+ #{$property}: $v;
43
+ }
44
+ }
45
+ }
46
+
47
+ // responsive variants
48
+ @each $bp, $bp-value in $yma-breakpoints {
49
+ @each $k, $v in $values {
50
+ .#{$bp}\:#{$prefix}-#{$k} {
51
+ @media (min-width: $bp-value) {
52
+ #{$property}: $v;
53
+ }
54
+ }
55
+ }
56
+ }
57
+ }
@@ -0,0 +1,192 @@
1
+ @use "sass:math";
2
+
3
+ $yma-flexbox-utils: (
4
+ "align-content": (
5
+ "prefix": "ac",
6
+ "values": (
7
+ "b": baseline,
8
+ "c": center,
9
+ "fe": flex-end,
10
+ "fs": flex-start,
11
+ "n": normal,
12
+ "s": stretch,
13
+ "sa": space-around,
14
+ "sb": space-between,
15
+ "se": space-evenly,
16
+ ),
17
+ ),
18
+
19
+ "align-items": (
20
+ "prefix": "ai",
21
+ "values": (
22
+ "b": baseline,
23
+ "c": center,
24
+ "fe": flex-end,
25
+ "fs": flex-start,
26
+ "s": stretch,
27
+ ),
28
+ ),
29
+
30
+ "align-self": (
31
+ "prefix": "as",
32
+ "values": (
33
+ "auto": auto,
34
+ "b": baseline,
35
+ "c": center,
36
+ "fe": flex-end,
37
+ "fs": flex-start,
38
+ "s": stretch,
39
+ ),
40
+ ),
41
+
42
+ "flex-direction": (
43
+ "prefix": "fd",
44
+ "values": (
45
+ "c": column,
46
+ "cr": column-reverse,
47
+ "r": row,
48
+ "rr": row-reverse,
49
+ ),
50
+ ),
51
+
52
+ "flex-grow": (
53
+ "prefix": "fg",
54
+ "values": (
55
+ "0": 0,
56
+ "1": 1,
57
+ "2": 2,
58
+ "3": 3,
59
+ "4": 4,
60
+ "5": 5,
61
+ "6": 6,
62
+ "7": 7,
63
+ "8": 8,
64
+ ),
65
+ ),
66
+
67
+ "flex-shrink": (
68
+ "prefix": "fs",
69
+ "values": (
70
+ "0": 0,
71
+ "1": 1,
72
+ "2": 2,
73
+ "3": 3,
74
+ "4": 4,
75
+ "5": 5,
76
+ "6": 6,
77
+ "7": 7,
78
+ "8": 8,
79
+ ),
80
+ ),
81
+
82
+ "flex-wrap": (
83
+ "prefix": "fw",
84
+ "values": (
85
+ "nw": nowrap,
86
+ "w": wrap,
87
+ "wr": wrap-reverse,
88
+ ),
89
+ ),
90
+
91
+ "flex": (
92
+ "prefix": "f",
93
+ "values": (
94
+ "1": 1 1 0%,
95
+ "2": 2 2 0%,
96
+ "3": 3 3 0%,
97
+ "4": 4 4 0%,
98
+ "5": 5 5 0%,
99
+ "6": 6 6 0%,
100
+ "auto": 1 1 auto,
101
+ "none": none,
102
+ ),
103
+ ),
104
+
105
+ "justify-content": (
106
+ "prefix": "jc",
107
+ "values": (
108
+ "c": center,
109
+ "fe": flex-end,
110
+ "fs": flex-start,
111
+ "n": normal,
112
+ "s": stretch,
113
+ "sa": space-around,
114
+ "sb": space-between,
115
+ "se": space-evenly,
116
+ ),
117
+ ),
118
+
119
+ "justify-items": (
120
+ "prefix": "ji",
121
+ "values": (
122
+ "c": center,
123
+ "e": end,
124
+ "s": start,
125
+ "st": stretch
126
+ ),
127
+ ),
128
+
129
+ "justify-self": (
130
+ "prefix": "js",
131
+ "values": (
132
+ "auto": auto,
133
+ "c": center,
134
+ "e": end,
135
+ "s": start,
136
+ "st": stretch
137
+ ),
138
+ ),
139
+ );
140
+
141
+ // base variants
142
+ @each $property, $map in $yma-flexbox-utils {
143
+ $prefix: map-get($map, "prefix");
144
+ $values: map-get($map, "values");
145
+
146
+ @each $k, $v in $values {
147
+ @if ($k == "default") {
148
+ .#{$prefix} {
149
+ #{$property}: $v;
150
+ }
151
+ } @else {
152
+ .#{$prefix}-#{$k} {
153
+ #{$property}: $v;
154
+ }
155
+ }
156
+ }
157
+
158
+ // hover variants
159
+ @each $k, $v in $values {
160
+ @if ($k == "default") {
161
+ .h\:#{$prefix}:hover {
162
+ #{$property}: $v;
163
+ }
164
+ } @else {
165
+ .h\:#{$prefix}-#{$k}:hover {
166
+ #{$property}: $v;
167
+ }
168
+ }
169
+ }
170
+
171
+ // responsive variants
172
+ @each $bp, $bp-value in $yma-breakpoints {
173
+ @each $k, $v in $values {
174
+ .#{$bp}\:#{$prefix}-#{$k} {
175
+ @media (min-width: $bp-value) {
176
+ #{$property}: $v;
177
+ }
178
+ }
179
+ }
180
+ }
181
+ }
182
+
183
+ // variants
184
+ @include variants("flex-basis", "fb", $yma-flex-basis);
185
+
186
+ // extensions
187
+ @include extensions(
188
+ $yma-extension,
189
+ (
190
+ "fb": flex-basis,
191
+ )
192
+ );