@appartmint/css-mint 0.0.17 → 0.0.19
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/package.json +1 -1
- package/src/components/index.scss +1 -0
- package/src/components/section/grid.scss +21 -0
- package/src/components/section/index.scss +1 -0
- package/src/components/widget/card.scss +336 -0
- package/src/components/widget/index.scss +2 -1
- package/src/components/widget/modal.scss +1 -1
- package/src/themes/structure.scss +1 -1
- package/src/util.scss +38 -155
package/package.json
CHANGED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/// grid.scss - Grid styles
|
|
2
|
+
/// @author App Art Mint LLC
|
|
3
|
+
///
|
|
4
|
+
/// @group Section
|
|
5
|
+
@charset 'utf-8';
|
|
6
|
+
|
|
7
|
+
/// Imports
|
|
8
|
+
@use '../../util' as *;
|
|
9
|
+
|
|
10
|
+
:root {
|
|
11
|
+
@include css-var-ref(grid-gap, gap);
|
|
12
|
+
@include css-var-ref(grid-fit-w, xs);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
#{class(grid)} {
|
|
16
|
+
&-fit {
|
|
17
|
+
display: grid;
|
|
18
|
+
grid-template-columns: repeat(minmax(min(css-var(grid-fit-w), 100%), 1fr));
|
|
19
|
+
gap: css-var(grid-gap);
|
|
20
|
+
}
|
|
21
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
@use './grid';
|
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
/// card.scss - Card styles
|
|
2
|
+
/// @author App Art Mint LLC
|
|
3
|
+
///
|
|
4
|
+
/// @group Widget
|
|
5
|
+
@charset 'utf-8';
|
|
6
|
+
|
|
7
|
+
/// Imports
|
|
8
|
+
@use 'sass:math';
|
|
9
|
+
@use '../../util' as *;
|
|
10
|
+
|
|
11
|
+
:root {
|
|
12
|
+
@include css-var-ref(card-r, br);
|
|
13
|
+
@include css-var-ref(card-shadow-s, shadow-s);
|
|
14
|
+
@include css-var-ref(card-shadow-c, shadow-c);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
/// Card Styles
|
|
18
|
+
#{class(card)} {
|
|
19
|
+
display: flex;
|
|
20
|
+
flex-direction: column;
|
|
21
|
+
position: relative;
|
|
22
|
+
height: 100%;
|
|
23
|
+
max-width: 100%;
|
|
24
|
+
margin: 0;
|
|
25
|
+
border-radius: css-var(card-r);
|
|
26
|
+
box-shadow: css-var(card-shadow-s) css-var(card-shadow-c);
|
|
27
|
+
|
|
28
|
+
@include break(sm) {
|
|
29
|
+
flex-direction: row;
|
|
30
|
+
|
|
31
|
+
&#{class(reverse)} {
|
|
32
|
+
flex-direction: row-reverse;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
&:has(#{class(carousel)}) {
|
|
37
|
+
box-shadow: none;
|
|
38
|
+
|
|
39
|
+
#{class(content)} {
|
|
40
|
+
box-shadow: css-var(card-shadow-s) css-var(card-shadow-c);
|
|
41
|
+
}
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
&#{class(center)} {
|
|
45
|
+
@mixin title {
|
|
46
|
+
#{class(title)} {
|
|
47
|
+
justify-content: center;
|
|
48
|
+
text-align: center;
|
|
49
|
+
|
|
50
|
+
& > div {
|
|
51
|
+
width: auto;
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
@mixin content {
|
|
57
|
+
#{class(content)} {
|
|
58
|
+
& > * {
|
|
59
|
+
text-align: center;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
@mixin buttons {
|
|
65
|
+
#{class(buttons)} {
|
|
66
|
+
justify-content: center;
|
|
67
|
+
}
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
@include title;
|
|
71
|
+
@include content;
|
|
72
|
+
@include buttons;
|
|
73
|
+
|
|
74
|
+
&-title {
|
|
75
|
+
@include title;
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
&-content {
|
|
79
|
+
@include content;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
&-btns {
|
|
83
|
+
@include buttons;
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
&#{class(stagger)} {
|
|
88
|
+
position: relative;
|
|
89
|
+
width: 100%;
|
|
90
|
+
|
|
91
|
+
@include break(sm) {
|
|
92
|
+
flex-direction: row;
|
|
93
|
+
border-radius: 0;
|
|
94
|
+
box-shadow: none;
|
|
95
|
+
overflow: visible;
|
|
96
|
+
|
|
97
|
+
& > #{class(image)} {
|
|
98
|
+
width: calc(50% + css-var(card-padding));
|
|
99
|
+
height: fit-content;
|
|
100
|
+
margin-right: calc(css-var(card-padding) * -2);
|
|
101
|
+
border-radius: css-var(card-radius);
|
|
102
|
+
|
|
103
|
+
img {
|
|
104
|
+
height: 100%;
|
|
105
|
+
object-fit: cover;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
|
|
109
|
+
& > #{class(content)} {
|
|
110
|
+
height: fit-content;
|
|
111
|
+
width: calc(50% + css-var(card-padding));
|
|
112
|
+
margin-top: calc(2 * css-var(card-padding));
|
|
113
|
+
border-radius: css-var(card-radius);
|
|
114
|
+
box-shadow: css-var(card-shadow-size) css-var(card-shadow-color);
|
|
115
|
+
}
|
|
116
|
+
}
|
|
117
|
+
|
|
118
|
+
&#{class(reverse)} {
|
|
119
|
+
@include break(sm) {
|
|
120
|
+
flex-direction: row-reverse;
|
|
121
|
+
|
|
122
|
+
& > #{class(image)} {
|
|
123
|
+
margin-right: 0;
|
|
124
|
+
margin-left: calc(css-var(card-padding) * -2);
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
}
|
|
128
|
+
}
|
|
129
|
+
|
|
130
|
+
& > #{class(image)} {
|
|
131
|
+
overflow: hidden;
|
|
132
|
+
|
|
133
|
+
@include break(sm) {
|
|
134
|
+
width: 50%;
|
|
135
|
+
}
|
|
136
|
+
|
|
137
|
+
&:only-child {
|
|
138
|
+
width: 100%;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
& + #{class(content)} {
|
|
142
|
+
@include break(sm) {
|
|
143
|
+
width: 50%;
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
}
|
|
147
|
+
|
|
148
|
+
#{class(content)} {
|
|
149
|
+
display: flex;
|
|
150
|
+
flex-direction: column;
|
|
151
|
+
gap: math.div($grid-gap, 2);
|
|
152
|
+
position: relative;
|
|
153
|
+
padding: css-var(card-padding);
|
|
154
|
+
background: css-var(card-back);
|
|
155
|
+
width: 100%;
|
|
156
|
+
overflow: hidden;
|
|
157
|
+
|
|
158
|
+
& > * {
|
|
159
|
+
margin-top: 0;
|
|
160
|
+
margin-bottom: 0;
|
|
161
|
+
}
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
#{class(title)} {
|
|
165
|
+
display: flex;
|
|
166
|
+
flex-direction: column;
|
|
167
|
+
align-items: center;
|
|
168
|
+
height: fit-content;
|
|
169
|
+
gap: css-var(card-padding);
|
|
170
|
+
text-align: center;
|
|
171
|
+
width: 100%;
|
|
172
|
+
|
|
173
|
+
@include break(xs) {
|
|
174
|
+
flex-direction: row;
|
|
175
|
+
text-align: left;
|
|
176
|
+
}
|
|
177
|
+
|
|
178
|
+
&:only-child {
|
|
179
|
+
height: 100%;
|
|
180
|
+
}
|
|
181
|
+
|
|
182
|
+
& > #{class(image)} {
|
|
183
|
+
width: 100%;
|
|
184
|
+
height: 100%;
|
|
185
|
+
max-width: css-var(card-logo-size);
|
|
186
|
+
max-height: css-var(card-logo-size);
|
|
187
|
+
|
|
188
|
+
&#{class(large)} {
|
|
189
|
+
max-width: calc(2 * css-var(card-logo-size));
|
|
190
|
+
max-height: calc(2 * css-var(card-logo-size));
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
img {
|
|
194
|
+
display: block;
|
|
195
|
+
width: 100%;
|
|
196
|
+
height: 100%;
|
|
197
|
+
object-fit: contain;
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
|
|
201
|
+
i {
|
|
202
|
+
display: flex;
|
|
203
|
+
align-items: center;
|
|
204
|
+
justify-content: center;
|
|
205
|
+
min-width: css-var(card-logo-size);
|
|
206
|
+
max-width: css-var(card-logo-size);
|
|
207
|
+
margin: 0;
|
|
208
|
+
font-size: calc(css-var(card-logo-size) - 1rem);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
& > div {
|
|
212
|
+
width: 100%;
|
|
213
|
+
|
|
214
|
+
& > * {
|
|
215
|
+
margin: 0;
|
|
216
|
+
}
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
#{class(date)} {
|
|
221
|
+
text-align: center;
|
|
222
|
+
|
|
223
|
+
@include break(xs) {
|
|
224
|
+
text-align: left;
|
|
225
|
+
}
|
|
226
|
+
}
|
|
227
|
+
|
|
228
|
+
&-grid {
|
|
229
|
+
position: relative;
|
|
230
|
+
background: css-var(card-back);
|
|
231
|
+
|
|
232
|
+
&:has(#{class(image)}) {
|
|
233
|
+
#{class(content)} {
|
|
234
|
+
margin-top: 25%;
|
|
235
|
+
padding-top: 25%;
|
|
236
|
+
background: none;
|
|
237
|
+
border: none;
|
|
238
|
+
|
|
239
|
+
&::before {
|
|
240
|
+
opacity: 0;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
&::after {
|
|
244
|
+
content: '';
|
|
245
|
+
position: absolute;
|
|
246
|
+
top: 0;
|
|
247
|
+
left: 0;
|
|
248
|
+
width: 100%;
|
|
249
|
+
height: 100%;
|
|
250
|
+
opacity: 0.75;
|
|
251
|
+
mask-image: none;
|
|
252
|
+
background: linear-gradient(0deg, black, rgba(0,0,0,70%) 66%, css-var(shadow-0));
|
|
253
|
+
transition: opacity delay(default) ease-in-out;
|
|
254
|
+
z-index: -1;
|
|
255
|
+
}
|
|
256
|
+
}
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
@include states(hover) {
|
|
260
|
+
#{class(content)} {
|
|
261
|
+
&::after {
|
|
262
|
+
opacity: 1;
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
|
|
267
|
+
#{class(image)} {
|
|
268
|
+
position: absolute;
|
|
269
|
+
top: 0;
|
|
270
|
+
left: 0;
|
|
271
|
+
width: 100%;
|
|
272
|
+
height: 100%;
|
|
273
|
+
|
|
274
|
+
img {
|
|
275
|
+
height: 100%;
|
|
276
|
+
object-fit: contain;
|
|
277
|
+
object-position: top;
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
|
|
281
|
+
#{class(content)} {
|
|
282
|
+
justify-content: flex-end;
|
|
283
|
+
background: css-var(shadow-0);
|
|
284
|
+
|
|
285
|
+
#{class(buttons)} {
|
|
286
|
+
margin-top: 0 !important;
|
|
287
|
+
}
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
|
|
291
|
+
&-actions {
|
|
292
|
+
#{class(content)} {
|
|
293
|
+
flex-direction: row;
|
|
294
|
+
justify-content: space-between;
|
|
295
|
+
}
|
|
296
|
+
}
|
|
297
|
+
}
|
|
298
|
+
|
|
299
|
+
#{class(grid)}#{class('3')},
|
|
300
|
+
#{class(grid)}#{class('4')} {
|
|
301
|
+
#{class(card)} {
|
|
302
|
+
flex-direction: column !important;
|
|
303
|
+
|
|
304
|
+
& > #{class(image)} {
|
|
305
|
+
overflow: hidden;
|
|
306
|
+
|
|
307
|
+
@include break(sm) {
|
|
308
|
+
width: 100%;
|
|
309
|
+
}
|
|
310
|
+
|
|
311
|
+
& + #{class(content)} {
|
|
312
|
+
@include break(sm) {
|
|
313
|
+
width: 100%;
|
|
314
|
+
}
|
|
315
|
+
}
|
|
316
|
+
}
|
|
317
|
+
|
|
318
|
+
#{class(content)} {
|
|
319
|
+
flex-grow: 1;
|
|
320
|
+
}
|
|
321
|
+
|
|
322
|
+
#{class(title)} {
|
|
323
|
+
@include break(xs) {
|
|
324
|
+
flex-direction: column;
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
|
|
328
|
+
#{class(buttons)} {
|
|
329
|
+
margin-top: auto;
|
|
330
|
+
|
|
331
|
+
#{class(btn)} {
|
|
332
|
+
width: 100%;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
}
|
|
336
|
+
}
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
@use '
|
|
1
|
+
@use 'card';
|
|
2
|
+
@use 'modal';
|
package/src/util.scss
CHANGED
|
@@ -10,31 +10,17 @@
|
|
|
10
10
|
@use 'sass:math';
|
|
11
11
|
@use 'sass:meta';
|
|
12
12
|
@use 'sass:string';
|
|
13
|
+
@use 'sass:selector';
|
|
13
14
|
|
|
14
15
|
/// Library name
|
|
15
16
|
/// @group Variables
|
|
16
17
|
/// @type String
|
|
17
18
|
$lib: mint !default;
|
|
18
19
|
|
|
19
|
-
/// Dash - variable name separator
|
|
20
|
-
/// @group Variables
|
|
21
|
-
/// @type String
|
|
22
|
-
$dash: #{'-'};
|
|
23
|
-
|
|
24
20
|
/// Prefix added to selectors
|
|
25
21
|
/// @group Variables
|
|
26
22
|
/// @type String
|
|
27
|
-
$pre: #{$lib}
|
|
28
|
-
|
|
29
|
-
/// Dot - added to classes
|
|
30
|
-
/// @group Variables
|
|
31
|
-
/// @type String
|
|
32
|
-
$dot: #{'.'};
|
|
33
|
-
|
|
34
|
-
/// Hash - added to ids
|
|
35
|
-
/// @group Variables
|
|
36
|
-
/// @type String
|
|
37
|
-
$hash: #{'#'};
|
|
23
|
+
$pre: #{$lib}-;
|
|
38
24
|
|
|
39
25
|
/// CSS-selector for disabled elements
|
|
40
26
|
/// @group Variables
|
|
@@ -133,27 +119,9 @@ $break: (
|
|
|
133
119
|
xl: 1440
|
|
134
120
|
) !default;
|
|
135
121
|
|
|
136
|
-
/// True if Bootstrap5 is used in the project
|
|
137
|
-
/// @group Variables
|
|
138
|
-
/// @type Boolean
|
|
139
|
-
$bootstrap5: false !default;
|
|
140
|
-
|
|
141
|
-
@if ($bootstrap5) {
|
|
142
|
-
$break: (
|
|
143
|
-
sm: 576,
|
|
144
|
-
md: 768,
|
|
145
|
-
lg: 992,
|
|
146
|
-
xl: 1200,
|
|
147
|
-
xxl: 1400
|
|
148
|
-
) !default;
|
|
149
|
-
}
|
|
150
|
-
|
|
151
122
|
/// Prefixes the provided string with the library name if it isn't already
|
|
152
123
|
/// @group Functions
|
|
153
124
|
///
|
|
154
|
-
/// @example scss - prefix function
|
|
155
|
-
/// prefix(header) // -> sun-header
|
|
156
|
-
///
|
|
157
125
|
/// @param {String} $base - the string to be prefixed
|
|
158
126
|
/// @return {String} - a prefixed string
|
|
159
127
|
@function prefix ($base) {
|
|
@@ -173,9 +141,6 @@ $bootstrap5: false !default;
|
|
|
173
141
|
/// Prefixes the provided string with two dashes and the library name if it isn't already
|
|
174
142
|
/// @group Functions
|
|
175
143
|
///
|
|
176
|
-
/// @example scss - css-prefix function
|
|
177
|
-
/// css-prefix(background) // -> --sun-background
|
|
178
|
-
///
|
|
179
144
|
/// @param {String} $base - the string to be prefixed
|
|
180
145
|
/// @return {String} - a prefixed string
|
|
181
146
|
@function css-prefix ($base) {
|
|
@@ -183,19 +148,16 @@ $bootstrap5: false !default;
|
|
|
183
148
|
@error 'The css-prefix function requires a string value.';
|
|
184
149
|
}
|
|
185
150
|
|
|
186
|
-
@while (string.index($base,
|
|
151
|
+
@while (string.index($base, '-') == 1) {
|
|
187
152
|
$base: string.slice($base, 2);
|
|
188
153
|
}
|
|
189
154
|
|
|
190
|
-
@return
|
|
155
|
+
@return '--#{prefix($base)}';
|
|
191
156
|
}
|
|
192
157
|
|
|
193
158
|
/// Creates a CSS-var call for the prefixed `$base`
|
|
194
159
|
/// @group Functions
|
|
195
160
|
///
|
|
196
|
-
/// @example scss - css-var function
|
|
197
|
-
/// css-var(background) // -> var(--sun-background)
|
|
198
|
-
///
|
|
199
161
|
/// @param {String} $base - the CSS-var to create a call for
|
|
200
162
|
/// @return {String} - a CSS-var call
|
|
201
163
|
@function css-var ($base) {
|
|
@@ -213,9 +175,6 @@ $bootstrap5: false !default;
|
|
|
213
175
|
/// Creates a class selector with the library prefix
|
|
214
176
|
/// @group Functions
|
|
215
177
|
///
|
|
216
|
-
/// @example scss - class function
|
|
217
|
-
/// class(open) // -> .sun-open
|
|
218
|
-
///
|
|
219
178
|
/// @param {String} $base - the name of the class
|
|
220
179
|
/// @return {String} - a class selector
|
|
221
180
|
@function class($base) {
|
|
@@ -223,15 +182,12 @@ $bootstrap5: false !default;
|
|
|
223
182
|
@error 'The class function requires a string value.';
|
|
224
183
|
}
|
|
225
184
|
|
|
226
|
-
@return
|
|
185
|
+
@return '.#{prefix($base)}';
|
|
227
186
|
}
|
|
228
187
|
|
|
229
188
|
/// Creates an id selector with the library prefix
|
|
230
189
|
/// @group Functions
|
|
231
190
|
///
|
|
232
|
-
/// @example scss - id function
|
|
233
|
-
/// id(header) // -> #sun-header
|
|
234
|
-
///
|
|
235
191
|
/// @param {String} $base - the name of the id
|
|
236
192
|
/// @param {String} $op - the comparison operator
|
|
237
193
|
/// @return {String} - an id selector
|
|
@@ -249,7 +205,7 @@ $bootstrap5: false !default;
|
|
|
249
205
|
}
|
|
250
206
|
|
|
251
207
|
@if ($op == '=') {
|
|
252
|
-
@return
|
|
208
|
+
@return '##{prefix($base)}';
|
|
253
209
|
}
|
|
254
210
|
|
|
255
211
|
@return '[id#{$op}#{prefix($base)}]';
|
|
@@ -258,9 +214,6 @@ $bootstrap5: false !default;
|
|
|
258
214
|
/// Creates an aria-controls selector with the library prefix
|
|
259
215
|
/// @group Functions
|
|
260
216
|
///
|
|
261
|
-
/// @example scss - controls function
|
|
262
|
-
/// controls(header) // -> [aria-controls=sun-header]
|
|
263
|
-
///
|
|
264
217
|
/// @param {String} $id - the id of the controlled element
|
|
265
218
|
/// @param {String} $op - the comparison operator
|
|
266
219
|
/// @return {String} - an aria-controls selector
|
|
@@ -283,9 +236,6 @@ $bootstrap5: false !default;
|
|
|
283
236
|
/// Creates an aria-expanded selector
|
|
284
237
|
/// @group Functions
|
|
285
238
|
///
|
|
286
|
-
/// @example scss - expanded function
|
|
287
|
-
/// expanded(true) // -> [aria-expanded=true]
|
|
288
|
-
///
|
|
289
239
|
/// @param {Bool} $bool - the value of the selector
|
|
290
240
|
/// @return {String} - an aria-expanded selector
|
|
291
241
|
@function expanded ($bool) {
|
|
@@ -307,9 +257,6 @@ $bootstrap5: false !default;
|
|
|
307
257
|
/// Creates an aria-hidden selector
|
|
308
258
|
/// @group Functions
|
|
309
259
|
///
|
|
310
|
-
/// @example scss - hidden function
|
|
311
|
-
/// hidden(true) // -> [aria-hidden=true]
|
|
312
|
-
///
|
|
313
260
|
/// @param {Bool} $bool - the value of the selector
|
|
314
261
|
/// @return {String} - an aria-hidden selector
|
|
315
262
|
@function hidden ($bool) {
|
|
@@ -331,9 +278,6 @@ $bootstrap5: false !default;
|
|
|
331
278
|
/// Converts a number to ms
|
|
332
279
|
/// @group Functions
|
|
333
280
|
///
|
|
334
|
-
/// @example scss - ms function
|
|
335
|
-
/// ms(100) // -> 100ms
|
|
336
|
-
///
|
|
337
281
|
/// @param {Number} $val - the number of ms to return
|
|
338
282
|
/// @return {Number} the number as ms
|
|
339
283
|
@function ms ($val) {
|
|
@@ -347,9 +291,6 @@ $bootstrap5: false !default;
|
|
|
347
291
|
/// Converts a number to px
|
|
348
292
|
/// @group Functions
|
|
349
293
|
///
|
|
350
|
-
/// @example scss - px function
|
|
351
|
-
/// px(100) // -> 100px
|
|
352
|
-
///
|
|
353
294
|
/// @param {Number} $val - the number of px to return
|
|
354
295
|
/// @return {Number} - the number as px
|
|
355
296
|
@function px ($val) {
|
|
@@ -363,9 +304,6 @@ $bootstrap5: false !default;
|
|
|
363
304
|
/// Removes the unit from the given value
|
|
364
305
|
/// @group Functions
|
|
365
306
|
///
|
|
366
|
-
/// @example scss - strip-unit function
|
|
367
|
-
/// strip-unit(100px) // -> 100
|
|
368
|
-
///
|
|
369
307
|
/// @param {Number} $val - the value to strip
|
|
370
308
|
/// @return {Number} - the number without units
|
|
371
309
|
@function strip-unit($val) {
|
|
@@ -379,9 +317,6 @@ $bootstrap5: false !default;
|
|
|
379
317
|
/// Returns the percentage of the given values
|
|
380
318
|
/// @group Functions
|
|
381
319
|
///
|
|
382
|
-
/// @example scss - percent function
|
|
383
|
-
/// percent(100, 200) // -> 50%
|
|
384
|
-
///
|
|
385
320
|
/// @param {Number} $dividend - the value that will be devided
|
|
386
321
|
/// @param {Number} $divisor - the value that will devided by
|
|
387
322
|
/// @return {Number} - the percentage of the given values
|
|
@@ -406,9 +341,6 @@ $bootstrap5: false !default;
|
|
|
406
341
|
/// Returns the requested delay value as ms
|
|
407
342
|
/// @group Functions
|
|
408
343
|
///
|
|
409
|
-
/// @example scss - delay function
|
|
410
|
-
/// delay(default) // -> 300ms
|
|
411
|
-
///
|
|
412
344
|
/// @param {Number} $key - the key of the delay to use
|
|
413
345
|
/// @return {Number} - the delay value as ms
|
|
414
346
|
@function delay($key) {
|
|
@@ -422,9 +354,6 @@ $bootstrap5: false !default;
|
|
|
422
354
|
/// Returns the requested breakpoint value as px
|
|
423
355
|
/// @group Functions
|
|
424
356
|
///
|
|
425
|
-
/// @example scss - break function
|
|
426
|
-
/// break(md) // -> 1024px
|
|
427
|
-
///
|
|
428
357
|
/// @param {Number} $key - the key of the breakpoint to use
|
|
429
358
|
/// @return {Number} - the breakpoint value as px
|
|
430
359
|
@function break($key) {
|
|
@@ -438,9 +367,6 @@ $bootstrap5: false !default;
|
|
|
438
367
|
/// Creates a prefixed CSS var definition
|
|
439
368
|
/// @group Mixins
|
|
440
369
|
///
|
|
441
|
-
/// @example scss - css-var mixin
|
|
442
|
-
/// @include css-var(bg, black) // -> --sun-bg: black;
|
|
443
|
-
///
|
|
444
370
|
/// @param {String} $key - the key of the CSS var
|
|
445
371
|
/// @param {Any} $val - the value of the CSS var
|
|
446
372
|
/// @output a prefixed CSS var definition
|
|
@@ -459,9 +385,6 @@ $bootstrap5: false !default;
|
|
|
459
385
|
/// Creates a prefixed CSS var reference
|
|
460
386
|
/// @group Mixins
|
|
461
387
|
///
|
|
462
|
-
/// @example scss - css-var-ref mixin
|
|
463
|
-
/// @include css-var-ref(fill, bg) // -> --sun-fill: var(--sun-bg);
|
|
464
|
-
///
|
|
465
388
|
/// @param {String} $key1 - the key of the new CSS var to define
|
|
466
389
|
/// @param {String} $key2 - the key of the referenced CSS var
|
|
467
390
|
/// @output a prefixed CSS var reference
|
|
@@ -476,11 +399,6 @@ $bootstrap5: false !default;
|
|
|
476
399
|
/// Wraps the provided content in a media query
|
|
477
400
|
/// @group Mixins
|
|
478
401
|
///
|
|
479
|
-
/// @example scss - break mixin
|
|
480
|
-
/// @include break(md) { // -> @media (min-width: 1024px) {
|
|
481
|
-
/// display: none; // display: none;
|
|
482
|
-
/// } // }
|
|
483
|
-
///
|
|
484
402
|
/// @param {String} $min - the key of the breakpoint to use with min-width
|
|
485
403
|
/// @param {String} $max - the key of the breakpoint to use with max-width
|
|
486
404
|
/// @output the provided content wrapped in a media query
|
|
@@ -524,37 +442,6 @@ $bootstrap5: false !default;
|
|
|
524
442
|
/// Creates utility selectors for a given property at each breakpoint
|
|
525
443
|
/// @group Mixins
|
|
526
444
|
///
|
|
527
|
-
/// @example scss- break-util mixin
|
|
528
|
-
/// @include break-util(display, flex); // -> & {
|
|
529
|
-
/// // display: flex;
|
|
530
|
-
/// //
|
|
531
|
-
/// // &-xs {
|
|
532
|
-
/// // display: none;
|
|
533
|
-
/// // @include break(xs) {
|
|
534
|
-
/// // display: flex;
|
|
535
|
-
/// // }
|
|
536
|
-
/// // }
|
|
537
|
-
/// // &-to-xs {
|
|
538
|
-
/// // display: flex;
|
|
539
|
-
/// // @include break(xs) {
|
|
540
|
-
/// // display: none;
|
|
541
|
-
/// // }
|
|
542
|
-
/// // }
|
|
543
|
-
/// // ...
|
|
544
|
-
/// // &-xl {
|
|
545
|
-
/// // display: none;
|
|
546
|
-
/// // @include break(xl) {
|
|
547
|
-
/// // display: flex;
|
|
548
|
-
/// // }
|
|
549
|
-
/// // }
|
|
550
|
-
/// // &-to-xl {
|
|
551
|
-
/// // display: flex;
|
|
552
|
-
/// // @include break(xl) {
|
|
553
|
-
/// // display: none;
|
|
554
|
-
/// // }
|
|
555
|
-
/// // }
|
|
556
|
-
/// // }
|
|
557
|
-
///
|
|
558
445
|
/// @param {String} $prop - the property to toggle
|
|
559
446
|
/// @param {Any} $val - the active value of the property
|
|
560
447
|
/// @param {Any} $none - the inactive value of the property
|
|
@@ -564,25 +451,22 @@ $bootstrap5: false !default;
|
|
|
564
451
|
@error 'The break-util mixin requires a string for the $prop argument.';
|
|
565
452
|
}
|
|
566
453
|
|
|
567
|
-
|
|
568
|
-
#{$prop}: #{$val};
|
|
454
|
+
#{$prop}: #{$val};
|
|
569
455
|
|
|
570
|
-
|
|
571
|
-
$
|
|
572
|
-
|
|
573
|
-
#{$prop}: #{$none};
|
|
456
|
+
@each $key, $width in $break {
|
|
457
|
+
&-#{$key} {
|
|
458
|
+
#{$prop}: #{$none};
|
|
574
459
|
|
|
575
|
-
|
|
576
|
-
|
|
577
|
-
}
|
|
460
|
+
@include break($key) {
|
|
461
|
+
#{$prop}: #{$val};
|
|
578
462
|
}
|
|
463
|
+
}
|
|
579
464
|
|
|
580
|
-
|
|
581
|
-
|
|
465
|
+
&-to-#{$key} {
|
|
466
|
+
#{$prop}: #{$val};
|
|
582
467
|
|
|
583
|
-
|
|
584
|
-
|
|
585
|
-
}
|
|
468
|
+
@include break($key) {
|
|
469
|
+
#{$prop}: #{$none};
|
|
586
470
|
}
|
|
587
471
|
}
|
|
588
472
|
}
|
|
@@ -805,53 +689,52 @@ $bootstrap5: false !default;
|
|
|
805
689
|
}
|
|
806
690
|
}
|
|
807
691
|
|
|
808
|
-
///
|
|
692
|
+
/// Wrap the content in given states
|
|
693
|
+
/// @group Mixins
|
|
694
|
+
///
|
|
695
|
+
/// @param {String[]} $states - a list of states
|
|
809
696
|
@mixin states ($states...) {
|
|
697
|
+
@if (list.length($states) == 0) {
|
|
698
|
+
@error 'The states mixin requires at least one state parameter.';
|
|
699
|
+
}
|
|
810
700
|
@each $state in $states {
|
|
811
701
|
@if (meta.type-of($state) != 'string') {
|
|
812
|
-
@error 'The states mixin requires a string for each state
|
|
702
|
+
@error 'The states mixin requires a string for each state parameter.';
|
|
813
703
|
}
|
|
814
704
|
}
|
|
815
705
|
|
|
706
|
+
$selectors: ();
|
|
707
|
+
|
|
816
708
|
@if (list.index($states, 'hover') != null) {
|
|
817
|
-
|
|
818
|
-
@content;
|
|
819
|
-
}
|
|
709
|
+
$selectors: list.append($selectors, selector.append(&, ':hover'));
|
|
820
710
|
}
|
|
821
711
|
|
|
822
712
|
@if (list.index($states, 'focus') != null) {
|
|
823
|
-
|
|
824
|
-
@content;
|
|
825
|
-
}
|
|
713
|
+
$selectors: list.append($selectors, selector.append(&, ':focus-visible'));
|
|
826
714
|
}
|
|
827
715
|
|
|
828
716
|
@if (list.index($states, 'active') != null) {
|
|
829
|
-
|
|
830
|
-
&:active {
|
|
831
|
-
@content;
|
|
832
|
-
}
|
|
717
|
+
$selectors: list.append($selectors, selector.append(&, ':active'));
|
|
833
718
|
}
|
|
834
719
|
|
|
835
720
|
@if (list.index($states, 'mint-active') != null) {
|
|
836
|
-
|
|
837
|
-
@content;
|
|
838
|
-
}
|
|
721
|
+
$selectors: list.append($selectors, selector.append(&, class(active)));
|
|
839
722
|
}
|
|
840
723
|
|
|
841
724
|
@if (list.index($states, 'visited') != null) {
|
|
842
|
-
|
|
843
|
-
@content;
|
|
844
|
-
}
|
|
725
|
+
$selectors: list.append($selectors, selector.append(&, ':visited'));
|
|
845
726
|
}
|
|
846
727
|
|
|
847
728
|
@if (list.index($states, 'disabled') != null) {
|
|
848
|
-
|
|
849
|
-
@content;
|
|
850
|
-
}
|
|
729
|
+
$selectors: list.append($selectors, selector.append(&, ':disabled'));
|
|
851
730
|
}
|
|
852
731
|
|
|
853
732
|
@if (list.index($states, 'expanded') != null) {
|
|
854
|
-
|
|
733
|
+
$selectors: list.append($selectors, selector.append(&, expanded(true)));
|
|
734
|
+
}
|
|
735
|
+
|
|
736
|
+
@at-root {
|
|
737
|
+
#{$selectors} {
|
|
855
738
|
@content;
|
|
856
739
|
}
|
|
857
740
|
}
|