@unocss/core 0.40.0 → 0.41.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.
- package/dist/index.cjs +6 -3
- package/dist/index.mjs +6 -3
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -460,7 +460,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
460
460
|
};
|
|
461
461
|
}
|
|
462
462
|
|
|
463
|
-
const version = "0.
|
|
463
|
+
const version = "0.41.0";
|
|
464
464
|
|
|
465
465
|
class UnoGenerator {
|
|
466
466
|
constructor(userConfig = {}, defaults = {}) {
|
|
@@ -638,7 +638,10 @@ class UnoGenerator {
|
|
|
638
638
|
const selectors = selectorSortPair ? [...new Set(selectorSortPair.sort((a, b) => a[1] - b[1] || a[0]?.localeCompare(b[0] || "") || 0).map((pair) => pair[0]).filter(Boolean))] : [];
|
|
639
639
|
return selectors.length ? `${selectors.join(`,${nl}`)}{${body}}` : body;
|
|
640
640
|
}).filter(Boolean).reverse().join(nl);
|
|
641
|
-
|
|
641
|
+
if (!parent)
|
|
642
|
+
return rules;
|
|
643
|
+
const parents = parent.split(" $$ ");
|
|
644
|
+
return `${parents.join("{")}{${nl}${rules}${nl}}${parents.map((_) => "").join("}")}`;
|
|
642
645
|
}).filter(Boolean).join(nl);
|
|
643
646
|
if (preflights) {
|
|
644
647
|
css = [preflightsMap[layer], css].filter(Boolean).join(nl);
|
|
@@ -679,7 +682,7 @@ class UnoGenerator {
|
|
|
679
682
|
if (typeof handler === "string")
|
|
680
683
|
handler = { matcher: handler };
|
|
681
684
|
processed = handler.matcher;
|
|
682
|
-
handlers.
|
|
685
|
+
handlers.unshift(handler);
|
|
683
686
|
variants.add(v);
|
|
684
687
|
applied = true;
|
|
685
688
|
break;
|
package/dist/index.mjs
CHANGED
|
@@ -456,7 +456,7 @@ function resolveConfig(userConfig = {}, defaults = {}) {
|
|
|
456
456
|
};
|
|
457
457
|
}
|
|
458
458
|
|
|
459
|
-
const version = "0.
|
|
459
|
+
const version = "0.41.0";
|
|
460
460
|
|
|
461
461
|
class UnoGenerator {
|
|
462
462
|
constructor(userConfig = {}, defaults = {}) {
|
|
@@ -634,7 +634,10 @@ class UnoGenerator {
|
|
|
634
634
|
const selectors = selectorSortPair ? [...new Set(selectorSortPair.sort((a, b) => a[1] - b[1] || a[0]?.localeCompare(b[0] || "") || 0).map((pair) => pair[0]).filter(Boolean))] : [];
|
|
635
635
|
return selectors.length ? `${selectors.join(`,${nl}`)}{${body}}` : body;
|
|
636
636
|
}).filter(Boolean).reverse().join(nl);
|
|
637
|
-
|
|
637
|
+
if (!parent)
|
|
638
|
+
return rules;
|
|
639
|
+
const parents = parent.split(" $$ ");
|
|
640
|
+
return `${parents.join("{")}{${nl}${rules}${nl}}${parents.map((_) => "").join("}")}`;
|
|
638
641
|
}).filter(Boolean).join(nl);
|
|
639
642
|
if (preflights) {
|
|
640
643
|
css = [preflightsMap[layer], css].filter(Boolean).join(nl);
|
|
@@ -675,7 +678,7 @@ class UnoGenerator {
|
|
|
675
678
|
if (typeof handler === "string")
|
|
676
679
|
handler = { matcher: handler };
|
|
677
680
|
processed = handler.matcher;
|
|
678
|
-
handlers.
|
|
681
|
+
handlers.unshift(handler);
|
|
679
682
|
variants.add(v);
|
|
680
683
|
applied = true;
|
|
681
684
|
break;
|