postcss-clampwind 0.0.6 → 0.0.7
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/dist/clampwind.cjs.cjs +12 -12
- package/dist/clampwind.esm.js +12 -12
- package/package.json +1 -1
package/dist/clampwind.cjs.cjs
CHANGED
|
@@ -360,7 +360,7 @@ var clampwind = (opts = {}) => {
|
|
|
360
360
|
const parentParams = decl.parent.parent.params;
|
|
361
361
|
let minScreen = null;
|
|
362
362
|
let maxScreen = null;
|
|
363
|
-
if (parentParams.includes(">") || parentParams.includes("min-width")) {
|
|
363
|
+
if (parentParams && (parentParams.includes(">") || parentParams.includes("min-width"))) {
|
|
364
364
|
let match = parentParams.match(/>=?\s*([^),\s]+)/);
|
|
365
365
|
if (match) {
|
|
366
366
|
minScreen = match[1].trim();
|
|
@@ -369,7 +369,7 @@ var clampwind = (opts = {}) => {
|
|
|
369
369
|
if (match) minScreen = match[1].trim();
|
|
370
370
|
}
|
|
371
371
|
}
|
|
372
|
-
if (!minScreen && (currentParams2.includes(">") || currentParams2.includes("min-width"))) {
|
|
372
|
+
if (!minScreen && (currentParams2 && (currentParams2.includes(">") || currentParams2.includes("min-width")))) {
|
|
373
373
|
let match = currentParams2.match(/>=?\s*([^),\s]+)/);
|
|
374
374
|
if (match) {
|
|
375
375
|
minScreen = match[1].trim();
|
|
@@ -378,7 +378,7 @@ var clampwind = (opts = {}) => {
|
|
|
378
378
|
if (match) minScreen = match[1].trim();
|
|
379
379
|
}
|
|
380
380
|
}
|
|
381
|
-
if (parentParams.includes("<") || parentParams.includes("max-width")) {
|
|
381
|
+
if (parentParams && (parentParams.includes("<") || parentParams.includes("max-width"))) {
|
|
382
382
|
let match = parentParams.match(/<\s*([^),\s]+)/);
|
|
383
383
|
if (match) {
|
|
384
384
|
maxScreen = match[1].trim();
|
|
@@ -387,7 +387,7 @@ var clampwind = (opts = {}) => {
|
|
|
387
387
|
if (match) maxScreen = match[1].trim();
|
|
388
388
|
}
|
|
389
389
|
}
|
|
390
|
-
if (!maxScreen && (currentParams2.includes("<") || currentParams2.includes("max-width"))) {
|
|
390
|
+
if (!maxScreen && (currentParams2 && (currentParams2.includes("<") || currentParams2.includes("max-width")))) {
|
|
391
391
|
let match = currentParams2.match(/<\s*([^),\s]+)/);
|
|
392
392
|
if (match) {
|
|
393
393
|
maxScreen = match[1].trim();
|
|
@@ -411,7 +411,7 @@ var clampwind = (opts = {}) => {
|
|
|
411
411
|
}
|
|
412
412
|
const screenValues = Object.values(screens);
|
|
413
413
|
const currentParams = decl.parent.params;
|
|
414
|
-
if (currentParams.includes(">") || currentParams.includes("min-width")) {
|
|
414
|
+
if (currentParams && (currentParams.includes(">") || currentParams.includes("min-width"))) {
|
|
415
415
|
let match = currentParams.match(/>=?\s*([^),\s]+)/);
|
|
416
416
|
if (!match) {
|
|
417
417
|
match = currentParams.match(/min-width:\s*([^),\s]+)/);
|
|
@@ -421,7 +421,7 @@ var clampwind = (opts = {}) => {
|
|
|
421
421
|
const maxScreen = defaultClampRange.max || screenValues[screenValues.length - 1];
|
|
422
422
|
processClampDeclaration(decl, minScreen, maxScreen, false);
|
|
423
423
|
}
|
|
424
|
-
} else if (currentParams.includes("<") || currentParams.includes("max-width")) {
|
|
424
|
+
} else if (currentParams && (currentParams.includes("<") || currentParams.includes("max-width"))) {
|
|
425
425
|
let match = currentParams.match(/<\s*([^),\s]+)/);
|
|
426
426
|
if (!match) {
|
|
427
427
|
match = currentParams.match(/max-width:\s*([^),\s]+)/);
|
|
@@ -450,28 +450,28 @@ var clampwind = (opts = {}) => {
|
|
|
450
450
|
const parentParams = decl.parent.parent.params;
|
|
451
451
|
let minContainer = null;
|
|
452
452
|
let maxContainer = null;
|
|
453
|
-
if (parentParams.includes(">") || parentParams.includes("min-width")) {
|
|
453
|
+
if (parentParams && (parentParams.includes(">") || parentParams.includes("min-width"))) {
|
|
454
454
|
let match = parentParams.match(/>=?\s*([^),\s]+)/);
|
|
455
455
|
if (!match) {
|
|
456
456
|
match = parentParams.match(/min-width:\s*([^),\s]+)/);
|
|
457
457
|
}
|
|
458
458
|
if (match) minContainer = match[1].trim();
|
|
459
459
|
}
|
|
460
|
-
if (!minContainer && (currentParams2.includes(">") || currentParams2.includes("min-width"))) {
|
|
460
|
+
if (!minContainer && (currentParams2 && (currentParams2.includes(">") || currentParams2.includes("min-width")))) {
|
|
461
461
|
let match = currentParams2.match(/>=?\s*([^),\s]+)/);
|
|
462
462
|
if (!match) {
|
|
463
463
|
match = currentParams2.match(/min-width:\s*([^),\s]+)/);
|
|
464
464
|
}
|
|
465
465
|
if (match) minContainer = match[1].trim();
|
|
466
466
|
}
|
|
467
|
-
if (parentParams.includes("<") || parentParams.includes("max-width")) {
|
|
467
|
+
if (parentParams && (parentParams.includes("<") || parentParams.includes("max-width"))) {
|
|
468
468
|
let match = parentParams.match(/<\s*([^),\s]+)/);
|
|
469
469
|
if (!match) {
|
|
470
470
|
match = parentParams.match(/max-width:\s*([^),\s]+)/);
|
|
471
471
|
}
|
|
472
472
|
if (match) maxContainer = match[1].trim();
|
|
473
473
|
}
|
|
474
|
-
if (!maxContainer && (currentParams2.includes("<") || currentParams2.includes("max-width"))) {
|
|
474
|
+
if (!maxContainer && (currentParams2 && (currentParams2.includes("<") || currentParams2.includes("max-width")))) {
|
|
475
475
|
let match = currentParams2.match(/<\s*([^),\s]+)/);
|
|
476
476
|
if (!match) {
|
|
477
477
|
match = currentParams2.match(/max-width:\s*([^),\s]+)/);
|
|
@@ -498,7 +498,7 @@ var clampwind = (opts = {}) => {
|
|
|
498
498
|
}
|
|
499
499
|
const containerValues = Object.values(containerScreens);
|
|
500
500
|
const currentParams = decl.parent.params;
|
|
501
|
-
if (currentParams.includes(">") || currentParams.includes("min-width")) {
|
|
501
|
+
if (currentParams && (currentParams.includes(">") || currentParams.includes("min-width"))) {
|
|
502
502
|
let match = currentParams.match(/>=?\s*([^),\s]+)/);
|
|
503
503
|
if (!match) {
|
|
504
504
|
match = currentParams.match(/min-width:\s*([^),\s]+)/);
|
|
@@ -513,7 +513,7 @@ var clampwind = (opts = {}) => {
|
|
|
513
513
|
true
|
|
514
514
|
);
|
|
515
515
|
}
|
|
516
|
-
} else if (currentParams.includes("<") || currentParams.includes("max-width")) {
|
|
516
|
+
} else if (currentParams && (currentParams.includes("<") || currentParams.includes("max-width"))) {
|
|
517
517
|
let match = currentParams.match(/<\s*([^),\s]+)/);
|
|
518
518
|
if (!match) {
|
|
519
519
|
match = currentParams.match(/max-width:\s*([^),\s]+)/);
|
package/dist/clampwind.esm.js
CHANGED
|
@@ -335,7 +335,7 @@ var clampwind = (opts = {}) => {
|
|
|
335
335
|
const parentParams = decl.parent.parent.params;
|
|
336
336
|
let minScreen = null;
|
|
337
337
|
let maxScreen = null;
|
|
338
|
-
if (parentParams.includes(">") || parentParams.includes("min-width")) {
|
|
338
|
+
if (parentParams && (parentParams.includes(">") || parentParams.includes("min-width"))) {
|
|
339
339
|
let match = parentParams.match(/>=?\s*([^),\s]+)/);
|
|
340
340
|
if (match) {
|
|
341
341
|
minScreen = match[1].trim();
|
|
@@ -344,7 +344,7 @@ var clampwind = (opts = {}) => {
|
|
|
344
344
|
if (match) minScreen = match[1].trim();
|
|
345
345
|
}
|
|
346
346
|
}
|
|
347
|
-
if (!minScreen && (currentParams2.includes(">") || currentParams2.includes("min-width"))) {
|
|
347
|
+
if (!minScreen && (currentParams2 && (currentParams2.includes(">") || currentParams2.includes("min-width")))) {
|
|
348
348
|
let match = currentParams2.match(/>=?\s*([^),\s]+)/);
|
|
349
349
|
if (match) {
|
|
350
350
|
minScreen = match[1].trim();
|
|
@@ -353,7 +353,7 @@ var clampwind = (opts = {}) => {
|
|
|
353
353
|
if (match) minScreen = match[1].trim();
|
|
354
354
|
}
|
|
355
355
|
}
|
|
356
|
-
if (parentParams.includes("<") || parentParams.includes("max-width")) {
|
|
356
|
+
if (parentParams && (parentParams.includes("<") || parentParams.includes("max-width"))) {
|
|
357
357
|
let match = parentParams.match(/<\s*([^),\s]+)/);
|
|
358
358
|
if (match) {
|
|
359
359
|
maxScreen = match[1].trim();
|
|
@@ -362,7 +362,7 @@ var clampwind = (opts = {}) => {
|
|
|
362
362
|
if (match) maxScreen = match[1].trim();
|
|
363
363
|
}
|
|
364
364
|
}
|
|
365
|
-
if (!maxScreen && (currentParams2.includes("<") || currentParams2.includes("max-width"))) {
|
|
365
|
+
if (!maxScreen && (currentParams2 && (currentParams2.includes("<") || currentParams2.includes("max-width")))) {
|
|
366
366
|
let match = currentParams2.match(/<\s*([^),\s]+)/);
|
|
367
367
|
if (match) {
|
|
368
368
|
maxScreen = match[1].trim();
|
|
@@ -386,7 +386,7 @@ var clampwind = (opts = {}) => {
|
|
|
386
386
|
}
|
|
387
387
|
const screenValues = Object.values(screens);
|
|
388
388
|
const currentParams = decl.parent.params;
|
|
389
|
-
if (currentParams.includes(">") || currentParams.includes("min-width")) {
|
|
389
|
+
if (currentParams && (currentParams.includes(">") || currentParams.includes("min-width"))) {
|
|
390
390
|
let match = currentParams.match(/>=?\s*([^),\s]+)/);
|
|
391
391
|
if (!match) {
|
|
392
392
|
match = currentParams.match(/min-width:\s*([^),\s]+)/);
|
|
@@ -396,7 +396,7 @@ var clampwind = (opts = {}) => {
|
|
|
396
396
|
const maxScreen = defaultClampRange.max || screenValues[screenValues.length - 1];
|
|
397
397
|
processClampDeclaration(decl, minScreen, maxScreen, false);
|
|
398
398
|
}
|
|
399
|
-
} else if (currentParams.includes("<") || currentParams.includes("max-width")) {
|
|
399
|
+
} else if (currentParams && (currentParams.includes("<") || currentParams.includes("max-width"))) {
|
|
400
400
|
let match = currentParams.match(/<\s*([^),\s]+)/);
|
|
401
401
|
if (!match) {
|
|
402
402
|
match = currentParams.match(/max-width:\s*([^),\s]+)/);
|
|
@@ -425,28 +425,28 @@ var clampwind = (opts = {}) => {
|
|
|
425
425
|
const parentParams = decl.parent.parent.params;
|
|
426
426
|
let minContainer = null;
|
|
427
427
|
let maxContainer = null;
|
|
428
|
-
if (parentParams.includes(">") || parentParams.includes("min-width")) {
|
|
428
|
+
if (parentParams && (parentParams.includes(">") || parentParams.includes("min-width"))) {
|
|
429
429
|
let match = parentParams.match(/>=?\s*([^),\s]+)/);
|
|
430
430
|
if (!match) {
|
|
431
431
|
match = parentParams.match(/min-width:\s*([^),\s]+)/);
|
|
432
432
|
}
|
|
433
433
|
if (match) minContainer = match[1].trim();
|
|
434
434
|
}
|
|
435
|
-
if (!minContainer && (currentParams2.includes(">") || currentParams2.includes("min-width"))) {
|
|
435
|
+
if (!minContainer && (currentParams2 && (currentParams2.includes(">") || currentParams2.includes("min-width")))) {
|
|
436
436
|
let match = currentParams2.match(/>=?\s*([^),\s]+)/);
|
|
437
437
|
if (!match) {
|
|
438
438
|
match = currentParams2.match(/min-width:\s*([^),\s]+)/);
|
|
439
439
|
}
|
|
440
440
|
if (match) minContainer = match[1].trim();
|
|
441
441
|
}
|
|
442
|
-
if (parentParams.includes("<") || parentParams.includes("max-width")) {
|
|
442
|
+
if (parentParams && (parentParams.includes("<") || parentParams.includes("max-width"))) {
|
|
443
443
|
let match = parentParams.match(/<\s*([^),\s]+)/);
|
|
444
444
|
if (!match) {
|
|
445
445
|
match = parentParams.match(/max-width:\s*([^),\s]+)/);
|
|
446
446
|
}
|
|
447
447
|
if (match) maxContainer = match[1].trim();
|
|
448
448
|
}
|
|
449
|
-
if (!maxContainer && (currentParams2.includes("<") || currentParams2.includes("max-width"))) {
|
|
449
|
+
if (!maxContainer && (currentParams2 && (currentParams2.includes("<") || currentParams2.includes("max-width")))) {
|
|
450
450
|
let match = currentParams2.match(/<\s*([^),\s]+)/);
|
|
451
451
|
if (!match) {
|
|
452
452
|
match = currentParams2.match(/max-width:\s*([^),\s]+)/);
|
|
@@ -473,7 +473,7 @@ var clampwind = (opts = {}) => {
|
|
|
473
473
|
}
|
|
474
474
|
const containerValues = Object.values(containerScreens);
|
|
475
475
|
const currentParams = decl.parent.params;
|
|
476
|
-
if (currentParams.includes(">") || currentParams.includes("min-width")) {
|
|
476
|
+
if (currentParams && (currentParams.includes(">") || currentParams.includes("min-width"))) {
|
|
477
477
|
let match = currentParams.match(/>=?\s*([^),\s]+)/);
|
|
478
478
|
if (!match) {
|
|
479
479
|
match = currentParams.match(/min-width:\s*([^),\s]+)/);
|
|
@@ -488,7 +488,7 @@ var clampwind = (opts = {}) => {
|
|
|
488
488
|
true
|
|
489
489
|
);
|
|
490
490
|
}
|
|
491
|
-
} else if (currentParams.includes("<") || currentParams.includes("max-width")) {
|
|
491
|
+
} else if (currentParams && (currentParams.includes("<") || currentParams.includes("max-width"))) {
|
|
492
492
|
let match = currentParams.match(/<\s*([^),\s]+)/);
|
|
493
493
|
if (!match) {
|
|
494
494
|
match = currentParams.match(/max-width:\s*([^),\s]+)/);
|