@unocss/preset-typography 0.41.1 → 0.42.1
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 +3 -2
- package/dist/index.mjs +3 -2
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -165,19 +165,20 @@ function getCSS(escapedSelector, selectorName, preflights) {
|
|
|
165
165
|
let css = "";
|
|
166
166
|
for (const selector in preflights) {
|
|
167
167
|
const cssDeclarationBlock = preflights[selector];
|
|
168
|
+
const notProseSelector = `:not(:where(.not-${selectorName},.not-${selectorName} *))`;
|
|
168
169
|
const pseudoCSSMatchArray = selector.split(",").map((s) => {
|
|
169
170
|
const match = s.match(/::?(?:[\(\)\:\-\d\w]+)$/g);
|
|
170
171
|
if (match) {
|
|
171
172
|
const matchStr = match[0];
|
|
172
173
|
s = s.replace(matchStr, "");
|
|
173
|
-
return `${escapedSelector} :where(${s})
|
|
174
|
+
return `${escapedSelector} :where(${s})${notProseSelector}${matchStr}`;
|
|
174
175
|
}
|
|
175
176
|
return null;
|
|
176
177
|
}).filter((v) => v);
|
|
177
178
|
if (pseudoCSSMatchArray.length) {
|
|
178
179
|
css += pseudoCSSMatchArray.join(",");
|
|
179
180
|
} else {
|
|
180
|
-
css += `${escapedSelector} :where(${selector})
|
|
181
|
+
css += `${escapedSelector} :where(${selector})${notProseSelector}`;
|
|
181
182
|
}
|
|
182
183
|
css += "{";
|
|
183
184
|
for (const k in cssDeclarationBlock) {
|
package/dist/index.mjs
CHANGED
|
@@ -161,19 +161,20 @@ function getCSS(escapedSelector, selectorName, preflights) {
|
|
|
161
161
|
let css = "";
|
|
162
162
|
for (const selector in preflights) {
|
|
163
163
|
const cssDeclarationBlock = preflights[selector];
|
|
164
|
+
const notProseSelector = `:not(:where(.not-${selectorName},.not-${selectorName} *))`;
|
|
164
165
|
const pseudoCSSMatchArray = selector.split(",").map((s) => {
|
|
165
166
|
const match = s.match(/::?(?:[\(\)\:\-\d\w]+)$/g);
|
|
166
167
|
if (match) {
|
|
167
168
|
const matchStr = match[0];
|
|
168
169
|
s = s.replace(matchStr, "");
|
|
169
|
-
return `${escapedSelector} :where(${s})
|
|
170
|
+
return `${escapedSelector} :where(${s})${notProseSelector}${matchStr}`;
|
|
170
171
|
}
|
|
171
172
|
return null;
|
|
172
173
|
}).filter((v) => v);
|
|
173
174
|
if (pseudoCSSMatchArray.length) {
|
|
174
175
|
css += pseudoCSSMatchArray.join(",");
|
|
175
176
|
} else {
|
|
176
|
-
css += `${escapedSelector} :where(${selector})
|
|
177
|
+
css += `${escapedSelector} :where(${selector})${notProseSelector}`;
|
|
177
178
|
}
|
|
178
179
|
css += "{";
|
|
179
180
|
for (const k in cssDeclarationBlock) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-typography",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.42.1",
|
|
4
4
|
"description": "Typography preset for UnoCSS",
|
|
5
5
|
"author": "Jeff Yang",
|
|
6
6
|
"license": "MIT",
|
|
@@ -32,7 +32,7 @@
|
|
|
32
32
|
"dist"
|
|
33
33
|
],
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@unocss/core": "0.
|
|
35
|
+
"@unocss/core": "0.42.1"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "unbuild",
|