@weapp-tailwindcss/postcss 1.1.0-alpha.1 → 1.1.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.js +5 -1
- package/dist/index.mjs +5 -1
- package/package.json +3 -2
package/dist/index.js
CHANGED
|
@@ -147,6 +147,9 @@ function createRuleTransform(rule, options) {
|
|
|
147
147
|
if (selector.value === ":root" && _optionalChain([cssSelectorReplacement, 'optionalAccess', _2 => _2.root])) {
|
|
148
148
|
selector.value = composeIsPseudo(cssSelectorReplacement.root);
|
|
149
149
|
} else if (selector.value === ":where") {
|
|
150
|
+
if (uniAppX) {
|
|
151
|
+
selector.value = ":is";
|
|
152
|
+
}
|
|
150
153
|
if (index === 0 && selector.length === 1) {
|
|
151
154
|
selector.walk((node, idx) => {
|
|
152
155
|
if (idx === 0 && node.type === "class") {
|
|
@@ -344,7 +347,7 @@ var postcssWeappTailwindcssPostPlugin = (options) => {
|
|
|
344
347
|
p.DeclarationExit = (decl) => {
|
|
345
348
|
if (decl.prop === "--tw-gradient-position" && decl.value.endsWith(OklabSuffix)) {
|
|
346
349
|
decl.value = decl.value.slice(0, decl.value.length - OklabSuffix.length);
|
|
347
|
-
} else if (/calc\(\s*infinity\s*\*\s*
|
|
350
|
+
} else if (/calc\(\s*infinity\s*\*\s*1r?px/.test(decl.value)) {
|
|
348
351
|
decl.value = "9999px";
|
|
349
352
|
}
|
|
350
353
|
};
|
|
@@ -1242,6 +1245,7 @@ function getPlugins(options) {
|
|
|
1242
1245
|
const plugins = [
|
|
1243
1246
|
..._nullishCoalesce(_optionalChain([options, 'access', _62 => _62.postcssOptions, 'optionalAccess', _63 => _63.plugins]), () => ( [])),
|
|
1244
1247
|
postcssWeappTailwindcssPrePlugin(options),
|
|
1248
|
+
// calc({ }),
|
|
1245
1249
|
_postcsspresetenv2.default.call(void 0, options.cssPresetEnv)
|
|
1246
1250
|
];
|
|
1247
1251
|
if (options.rem2rpx) {
|
package/dist/index.mjs
CHANGED
|
@@ -147,6 +147,9 @@ function createRuleTransform(rule, options) {
|
|
|
147
147
|
if (selector.value === ":root" && cssSelectorReplacement?.root) {
|
|
148
148
|
selector.value = composeIsPseudo(cssSelectorReplacement.root);
|
|
149
149
|
} else if (selector.value === ":where") {
|
|
150
|
+
if (uniAppX) {
|
|
151
|
+
selector.value = ":is";
|
|
152
|
+
}
|
|
150
153
|
if (index === 0 && selector.length === 1) {
|
|
151
154
|
selector.walk((node, idx) => {
|
|
152
155
|
if (idx === 0 && node.type === "class") {
|
|
@@ -344,7 +347,7 @@ var postcssWeappTailwindcssPostPlugin = (options) => {
|
|
|
344
347
|
p.DeclarationExit = (decl) => {
|
|
345
348
|
if (decl.prop === "--tw-gradient-position" && decl.value.endsWith(OklabSuffix)) {
|
|
346
349
|
decl.value = decl.value.slice(0, decl.value.length - OklabSuffix.length);
|
|
347
|
-
} else if (/calc\(\s*infinity\s*\*\s*
|
|
350
|
+
} else if (/calc\(\s*infinity\s*\*\s*1r?px/.test(decl.value)) {
|
|
348
351
|
decl.value = "9999px";
|
|
349
352
|
}
|
|
350
353
|
};
|
|
@@ -1242,6 +1245,7 @@ function getPlugins(options) {
|
|
|
1242
1245
|
const plugins = [
|
|
1243
1246
|
...options.postcssOptions?.plugins ?? [],
|
|
1244
1247
|
postcssWeappTailwindcssPrePlugin(options),
|
|
1248
|
+
// calc({ }),
|
|
1245
1249
|
postcssPresetEnv(options.cssPresetEnv)
|
|
1246
1250
|
];
|
|
1247
1251
|
if (options.rem2rpx) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-tailwindcss/postcss",
|
|
3
|
-
"version": "1.1.
|
|
3
|
+
"version": "1.1.1",
|
|
4
4
|
"description": "@weapp-tailwindcss/postcss",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,12 +41,13 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@weapp-core/escape": "~4.0.1",
|
|
43
43
|
"postcss": "~8.5.6",
|
|
44
|
-
"postcss-preset-env": "^10.3.
|
|
44
|
+
"postcss-preset-env": "^10.3.1",
|
|
45
45
|
"postcss-rem-to-responsive-pixel": "~6.0.2",
|
|
46
46
|
"postcss-selector-parser": "~7.1.0",
|
|
47
47
|
"@weapp-tailwindcss/shared": "1.0.3"
|
|
48
48
|
},
|
|
49
49
|
"devDependencies": {
|
|
50
|
+
"postcss-calc": "^10.1.1",
|
|
50
51
|
"postcss-value-parser": "^4.2.0",
|
|
51
52
|
"@weapp-tailwindcss/mangle": "1.0.5"
|
|
52
53
|
},
|