@unocss/preset-typography 0.41.2 → 0.42.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 +3 -3
- package/dist/index.mjs +3 -3
- package/package.json +2 -2
package/dist/index.cjs
CHANGED
|
@@ -165,20 +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
|
|
168
|
+
const notProseSelector = `:not(:where(.not-${selectorName},.not-${selectorName} *))`;
|
|
169
169
|
const pseudoCSSMatchArray = selector.split(",").map((s) => {
|
|
170
170
|
const match = s.match(/::?(?:[\(\)\:\-\d\w]+)$/g);
|
|
171
171
|
if (match) {
|
|
172
172
|
const matchStr = match[0];
|
|
173
173
|
s = s.replace(matchStr, "");
|
|
174
|
-
return `${escapedSelector} :where(${s})
|
|
174
|
+
return `${escapedSelector} :where(${s})${notProseSelector}${matchStr}`;
|
|
175
175
|
}
|
|
176
176
|
return null;
|
|
177
177
|
}).filter((v) => v);
|
|
178
178
|
if (pseudoCSSMatchArray.length) {
|
|
179
179
|
css += pseudoCSSMatchArray.join(",");
|
|
180
180
|
} else {
|
|
181
|
-
css += `${escapedSelector} :where(${selector})
|
|
181
|
+
css += `${escapedSelector} :where(${selector})${notProseSelector}`;
|
|
182
182
|
}
|
|
183
183
|
css += "{";
|
|
184
184
|
for (const k in cssDeclarationBlock) {
|
package/dist/index.mjs
CHANGED
|
@@ -161,20 +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
|
|
164
|
+
const notProseSelector = `:not(:where(.not-${selectorName},.not-${selectorName} *))`;
|
|
165
165
|
const pseudoCSSMatchArray = selector.split(",").map((s) => {
|
|
166
166
|
const match = s.match(/::?(?:[\(\)\:\-\d\w]+)$/g);
|
|
167
167
|
if (match) {
|
|
168
168
|
const matchStr = match[0];
|
|
169
169
|
s = s.replace(matchStr, "");
|
|
170
|
-
return `${escapedSelector} :where(${s})
|
|
170
|
+
return `${escapedSelector} :where(${s})${notProseSelector}${matchStr}`;
|
|
171
171
|
}
|
|
172
172
|
return null;
|
|
173
173
|
}).filter((v) => v);
|
|
174
174
|
if (pseudoCSSMatchArray.length) {
|
|
175
175
|
css += pseudoCSSMatchArray.join(",");
|
|
176
176
|
} else {
|
|
177
|
-
css += `${escapedSelector} :where(${selector})
|
|
177
|
+
css += `${escapedSelector} :where(${selector})${notProseSelector}`;
|
|
178
178
|
}
|
|
179
179
|
css += "{";
|
|
180
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.0",
|
|
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.0"
|
|
36
36
|
},
|
|
37
37
|
"scripts": {
|
|
38
38
|
"build": "unbuild",
|