@weapp-tailwindcss/postcss 1.0.14 → 1.0.16
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 +15 -9
- package/dist/index.mjs +15 -9
- package/package.json +2 -2
package/dist/index.js
CHANGED
|
@@ -184,6 +184,8 @@ function createRuleTransform(rule, options) {
|
|
|
184
184
|
node.prop = "margin-right";
|
|
185
185
|
} else if (node.prop === "margin-right") {
|
|
186
186
|
node.prop = "margin-left";
|
|
187
|
+
} else if (node.prop === "-webkit-margin-start" || node.prop === "-webkit-margin-end" || node.prop === "-webkit-margin-before" || node.prop === "-webkit-margin-after") {
|
|
188
|
+
node.remove();
|
|
187
189
|
}
|
|
188
190
|
}
|
|
189
191
|
}
|
|
@@ -857,16 +859,20 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
|
857
859
|
let layerProperties;
|
|
858
860
|
p.Once = (root) => {
|
|
859
861
|
root.walkAtRules((atRule) => {
|
|
860
|
-
if (atRule.name === "layer"
|
|
861
|
-
if (atRule.
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
if (
|
|
865
|
-
layerProperties
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
862
|
+
if (atRule.name === "layer") {
|
|
863
|
+
if (atRule.params === "properties") {
|
|
864
|
+
if (atRule.nodes === void 0 || _optionalChain([atRule, 'access', _30 => _30.nodes, 'optionalAccess', _31 => _31.length]) === 0) {
|
|
865
|
+
layerProperties = atRule;
|
|
866
|
+
} else if (_optionalChain([atRule, 'access', _32 => _32.first, 'optionalAccess', _33 => _33.type]) === "atrule" && isTailwindcssV4ModernCheck(atRule.first)) {
|
|
867
|
+
if (layerProperties) {
|
|
868
|
+
layerProperties.replaceWith(atRule.first.nodes);
|
|
869
|
+
atRule.remove();
|
|
870
|
+
} else {
|
|
871
|
+
atRule.replaceWith(atRule.first.nodes);
|
|
872
|
+
}
|
|
869
873
|
}
|
|
874
|
+
} else {
|
|
875
|
+
atRule.replaceWith(atRule.nodes);
|
|
870
876
|
}
|
|
871
877
|
} else if (isTailwindcssV4ModernCheck(atRule)) {
|
|
872
878
|
if (_optionalChain([atRule, 'access', _34 => _34.first, 'optionalAccess', _35 => _35.type]) === "atrule" && atRule.first.name === "layer") {
|
package/dist/index.mjs
CHANGED
|
@@ -184,6 +184,8 @@ function createRuleTransform(rule, options) {
|
|
|
184
184
|
node.prop = "margin-right";
|
|
185
185
|
} else if (node.prop === "margin-right") {
|
|
186
186
|
node.prop = "margin-left";
|
|
187
|
+
} else if (node.prop === "-webkit-margin-start" || node.prop === "-webkit-margin-end" || node.prop === "-webkit-margin-before" || node.prop === "-webkit-margin-after") {
|
|
188
|
+
node.remove();
|
|
187
189
|
}
|
|
188
190
|
}
|
|
189
191
|
}
|
|
@@ -857,16 +859,20 @@ var postcssWeappTailwindcssPrePlugin = (options) => {
|
|
|
857
859
|
let layerProperties;
|
|
858
860
|
p.Once = (root) => {
|
|
859
861
|
root.walkAtRules((atRule) => {
|
|
860
|
-
if (atRule.name === "layer"
|
|
861
|
-
if (atRule.
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
if (
|
|
865
|
-
layerProperties
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
862
|
+
if (atRule.name === "layer") {
|
|
863
|
+
if (atRule.params === "properties") {
|
|
864
|
+
if (atRule.nodes === void 0 || atRule.nodes?.length === 0) {
|
|
865
|
+
layerProperties = atRule;
|
|
866
|
+
} else if (atRule.first?.type === "atrule" && isTailwindcssV4ModernCheck(atRule.first)) {
|
|
867
|
+
if (layerProperties) {
|
|
868
|
+
layerProperties.replaceWith(atRule.first.nodes);
|
|
869
|
+
atRule.remove();
|
|
870
|
+
} else {
|
|
871
|
+
atRule.replaceWith(atRule.first.nodes);
|
|
872
|
+
}
|
|
869
873
|
}
|
|
874
|
+
} else {
|
|
875
|
+
atRule.replaceWith(atRule.nodes);
|
|
870
876
|
}
|
|
871
877
|
} else if (isTailwindcssV4ModernCheck(atRule)) {
|
|
872
878
|
if (atRule.first?.type === "atrule" && atRule.first.name === "layer") {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@weapp-tailwindcss/postcss",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.16",
|
|
4
4
|
"description": "@weapp-tailwindcss/postcss",
|
|
5
5
|
"author": "ice breaker <1324318532@qq.com>",
|
|
6
6
|
"license": "MIT",
|
|
@@ -41,7 +41,7 @@
|
|
|
41
41
|
"dependencies": {
|
|
42
42
|
"@weapp-core/escape": "~4.0.1",
|
|
43
43
|
"postcss": "~8.5.6",
|
|
44
|
-
"postcss-preset-env": "^10.2.
|
|
44
|
+
"postcss-preset-env": "^10.2.4",
|
|
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.2"
|