@weapp-tailwindcss/postcss 3.0.1 → 3.0.2
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 +4 -2
- package/dist/index.mjs +4 -2
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -7195,7 +7195,7 @@ function isTailwindcssV4DisplayP3Declaration(decl) {
|
|
|
7195
7195
|
}
|
|
7196
7196
|
function normalizeTailwindcssV4Declaration(decl) {
|
|
7197
7197
|
if (decl.prop === "--tw-gradient-position" && decl.value.endsWith(OKLAB_SUFFIX)) {
|
|
7198
|
-
decl.value = decl.value.slice(0, decl.value.length - 8);
|
|
7198
|
+
decl.value = decl.value.slice(0, decl.value.length - 8).trimEnd();
|
|
7199
7199
|
return true;
|
|
7200
7200
|
}
|
|
7201
7201
|
if (INFINITY_CALC_REGEXP.test(decl.value)) {
|
|
@@ -7605,7 +7605,8 @@ function unwrapTailwindSourceMedia(root) {
|
|
|
7605
7605
|
});
|
|
7606
7606
|
}
|
|
7607
7607
|
function finalizeMiniProgramCssRoot(root, options = {}) {
|
|
7608
|
-
const
|
|
7608
|
+
const shouldInjectTailwindcssV4Defaults = options.isTailwindcssV4 === true;
|
|
7609
|
+
const tailwindcssV4DefaultNodes = shouldInjectTailwindcssV4Defaults ? createMissingCssVarsV4Nodes(root, collectUsedTailwindcssV4Variables(root)) : [];
|
|
7609
7610
|
removeUnsupportedCascadeLayers(root);
|
|
7610
7611
|
unwrapTailwindSourceMedia(root);
|
|
7611
7612
|
root.walkAtRules("property", (atRule) => {
|
|
@@ -7616,6 +7617,7 @@ function finalizeMiniProgramCssRoot(root, options = {}) {
|
|
|
7616
7617
|
removeDisplayP3Declarations(root);
|
|
7617
7618
|
removeUnsupportedModernColorDeclarations(root);
|
|
7618
7619
|
root.walkDecls((decl) => {
|
|
7620
|
+
if (shouldInjectTailwindcssV4Defaults) normalizeTailwindcssV4Declaration(decl);
|
|
7619
7621
|
normalizeMiniProgramPrefixedDeclaration(decl);
|
|
7620
7622
|
});
|
|
7621
7623
|
root.walkAtRules((atRule) => {
|
package/dist/index.mjs
CHANGED
|
@@ -7207,7 +7207,7 @@ function isTailwindcssV4DisplayP3Declaration(decl) {
|
|
|
7207
7207
|
}
|
|
7208
7208
|
function normalizeTailwindcssV4Declaration(decl) {
|
|
7209
7209
|
if (decl.prop === "--tw-gradient-position" && decl.value.endsWith(OKLAB_SUFFIX)) {
|
|
7210
|
-
decl.value = decl.value.slice(0, decl.value.length - 8);
|
|
7210
|
+
decl.value = decl.value.slice(0, decl.value.length - 8).trimEnd();
|
|
7211
7211
|
return true;
|
|
7212
7212
|
}
|
|
7213
7213
|
if (INFINITY_CALC_REGEXP.test(decl.value)) {
|
|
@@ -7617,7 +7617,8 @@ function unwrapTailwindSourceMedia(root) {
|
|
|
7617
7617
|
});
|
|
7618
7618
|
}
|
|
7619
7619
|
function finalizeMiniProgramCssRoot(root, options = {}) {
|
|
7620
|
-
const
|
|
7620
|
+
const shouldInjectTailwindcssV4Defaults = options.isTailwindcssV4 === true;
|
|
7621
|
+
const tailwindcssV4DefaultNodes = shouldInjectTailwindcssV4Defaults ? createMissingCssVarsV4Nodes(root, collectUsedTailwindcssV4Variables(root)) : [];
|
|
7621
7622
|
removeUnsupportedCascadeLayers(root);
|
|
7622
7623
|
unwrapTailwindSourceMedia(root);
|
|
7623
7624
|
root.walkAtRules("property", (atRule) => {
|
|
@@ -7628,6 +7629,7 @@ function finalizeMiniProgramCssRoot(root, options = {}) {
|
|
|
7628
7629
|
removeDisplayP3Declarations(root);
|
|
7629
7630
|
removeUnsupportedModernColorDeclarations(root);
|
|
7630
7631
|
root.walkDecls((decl) => {
|
|
7632
|
+
if (shouldInjectTailwindcssV4Defaults) normalizeTailwindcssV4Declaration(decl);
|
|
7631
7633
|
normalizeMiniProgramPrefixedDeclaration(decl);
|
|
7632
7634
|
});
|
|
7633
7635
|
root.walkAtRules((atRule) => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-tailwindcss/postcss",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.2",
|
|
4
4
|
"description": "@weapp-tailwindcss/postcss",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -57,7 +57,6 @@
|
|
|
57
57
|
},
|
|
58
58
|
"dependencies": {
|
|
59
59
|
"@weapp-core/escape": "~8.0.0",
|
|
60
|
-
"@weapp-tailwindcss/postcss-calc": "^1.0.0",
|
|
61
60
|
"autoprefixer": "^10.5.0",
|
|
62
61
|
"lru-cache": "11.5.1",
|
|
63
62
|
"postcss": "^8.5.15",
|
|
@@ -66,6 +65,7 @@
|
|
|
66
65
|
"postcss-rule-unit-converter": "^0.2.2",
|
|
67
66
|
"postcss-selector-parser": "~7.1.1",
|
|
68
67
|
"postcss-value-parser": "^4.2.0",
|
|
68
|
+
"@weapp-tailwindcss/postcss-calc": "^1.0.1",
|
|
69
69
|
"@weapp-tailwindcss/shared": "2.0.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|