@arsedizioni/ars-utils 21.2.107 → 21.2.108
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.
|
@@ -504,7 +504,9 @@ function toFlexCss(raw) {
|
|
|
504
504
|
let basis = parts[0];
|
|
505
505
|
if (/^\d+(\.\d+)?$/.test(basis))
|
|
506
506
|
basis = basis + '%';
|
|
507
|
-
|
|
507
|
+
// Fixed units (px, em, rem, vh, vw…) → 0 0 (no grow/shrink); % → 1 1
|
|
508
|
+
const fixed = /px|em|rem|vh|vw|vmin|vmax|ch|ex|cm|mm|in|pt|pc/.test(basis);
|
|
509
|
+
return `${fixed ? '0 0' : '1 1'} ${basis}`;
|
|
508
510
|
}
|
|
509
511
|
class FxFlexDirective extends ResponsiveBaseDirective {
|
|
510
512
|
constructor() {
|