@nuvoui/core 1.4.3 → 1.4.5
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
CHANGED
|
@@ -174,6 +174,11 @@ $color-cache: (); // to store the generated colors
|
|
|
174
174
|
@return $default-color;
|
|
175
175
|
}
|
|
176
176
|
|
|
177
|
+
// Convert string shade to number if needed
|
|
178
|
+
@if meta.type-of($shade) == "string" {
|
|
179
|
+
$shade: fn-math.to-number($shade);
|
|
180
|
+
}
|
|
181
|
+
|
|
177
182
|
@if not is-valid-shade($shade) {
|
|
178
183
|
@warn "Invalid shade value: #{$shade}. Valid range is 50 to 900.";
|
|
179
184
|
@return $default-color;
|
|
@@ -273,6 +278,11 @@ $color-cache: (); // to store the generated colors
|
|
|
273
278
|
}
|
|
274
279
|
|
|
275
280
|
@function is-valid-shade($shade) {
|
|
281
|
+
// Convert string to number if needed
|
|
282
|
+
@if meta.type-of($shade) == "string" {
|
|
283
|
+
$shade: fn-math.to-number($shade);
|
|
284
|
+
}
|
|
285
|
+
|
|
276
286
|
@if meta.type-of($shade) == "number" {
|
|
277
287
|
@return $shade >= 50 and $shade <= 900;
|
|
278
288
|
}
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
$result: $result * 10 + map.get($numbers, $character);
|
|
46
46
|
} @else {
|
|
47
47
|
$digits: $digits * 10;
|
|
48
|
-
$result: $result + map.get($numbers, $character)
|
|
48
|
+
$result: $result + math.div(map.get($numbers, $character), $digits);
|
|
49
49
|
}
|
|
50
50
|
} @else {
|
|
51
51
|
// Non-numeric character found - check for unit
|
|
@@ -9,6 +9,7 @@
|
|
|
9
9
|
@use "../config/breakpoints" as config-breakpoint;
|
|
10
10
|
@use "../config/typography" as config-typo;
|
|
11
11
|
@use "../functions/feature-flags" as fn-flags;
|
|
12
|
+
@use "../functions/math" as fn-math;
|
|
12
13
|
|
|
13
14
|
// config-typo Utilities
|
|
14
15
|
// Classes:
|
|
@@ -54,9 +55,15 @@
|
|
|
54
55
|
} @else if meta.type-of($weight) == "number" {
|
|
55
56
|
font-weight: $weight;
|
|
56
57
|
} @else {
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
58
|
+
// Try converting string to number (handles "600" -> 600)
|
|
59
|
+
$converted: fn-math.to-number($weight);
|
|
60
|
+
@if meta.type-of($converted) == "number" {
|
|
61
|
+
font-weight: $converted;
|
|
62
|
+
} @else {
|
|
63
|
+
@warn "Unknown font weight: #{$weight} setting it to default.";
|
|
64
|
+
|
|
65
|
+
font-weight: 400; // Default to normal weight
|
|
66
|
+
}
|
|
60
67
|
}
|
|
61
68
|
}
|
|
62
69
|
|
|
@@ -268,7 +275,7 @@
|
|
|
268
275
|
|
|
269
276
|
@each $size, $val in config-typo.$font-sizes {
|
|
270
277
|
#{config-flags.$parent-selector} .text-#{$size}#{$suffix} {
|
|
271
|
-
@include
|
|
278
|
+
@include font-size($size);
|
|
272
279
|
}
|
|
273
280
|
}
|
|
274
281
|
|
|
@@ -446,7 +453,7 @@
|
|
|
446
453
|
@media (min-width: #{$width}) {
|
|
447
454
|
@each $size, $val in config-typo.$font-sizes {
|
|
448
455
|
#{config-flags.$parent-selector} .text-#{$size}\@#{$breakpoint} {
|
|
449
|
-
@include
|
|
456
|
+
@include font-size($size);
|
|
450
457
|
}
|
|
451
458
|
}
|
|
452
459
|
@include responsive-config-typo($breakpoint);
|