@weapp-tailwindcss/postcss 1.0.0 → 1.0.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 CHANGED
@@ -188,6 +188,7 @@ function getFallbackRemove(rule) {
188
188
  }
189
189
 
190
190
  // src/plugins/post.ts
191
+ var OklabSuffix = "in oklab";
191
192
  var postcssWeappTailwindcssPostPlugin = (options = {
192
193
  isMainChunk: true
193
194
  }) => {
@@ -205,6 +206,11 @@ var postcssWeappTailwindcssPostPlugin = (options = {
205
206
  if (rule.selectors.length === 0 || rule.selectors.length === 1 && rule.selector.trim() === "") {
206
207
  rule.remove();
207
208
  }
209
+ rule.walkDecls((decl) => {
210
+ if (decl.prop === "--tw-gradient-position" && decl.value.endsWith(OklabSuffix)) {
211
+ decl.value = decl.value.slice(0, decl.value.length - OklabSuffix.length);
212
+ }
213
+ });
208
214
  });
209
215
  };
210
216
  }
package/dist/index.mjs CHANGED
@@ -188,6 +188,7 @@ function getFallbackRemove(rule) {
188
188
  }
189
189
 
190
190
  // src/plugins/post.ts
191
+ var OklabSuffix = "in oklab";
191
192
  var postcssWeappTailwindcssPostPlugin = (options = {
192
193
  isMainChunk: true
193
194
  }) => {
@@ -205,6 +206,11 @@ var postcssWeappTailwindcssPostPlugin = (options = {
205
206
  if (rule.selectors.length === 0 || rule.selectors.length === 1 && rule.selector.trim() === "") {
206
207
  rule.remove();
207
208
  }
209
+ rule.walkDecls((decl) => {
210
+ if (decl.prop === "--tw-gradient-position" && decl.value.endsWith(OklabSuffix)) {
211
+ decl.value = decl.value.slice(0, decl.value.length - OklabSuffix.length);
212
+ }
213
+ });
208
214
  });
209
215
  };
210
216
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@weapp-tailwindcss/postcss",
3
- "version": "1.0.0",
3
+ "version": "1.0.1",
4
4
  "description": "@weapp-tailwindcss/postcss",
5
5
  "author": "ice breaker <1324318532@qq.com>",
6
6
  "license": "MIT",
@@ -35,7 +35,7 @@
35
35
  "dependencies": {
36
36
  "@weapp-core/escape": "~4.0.0",
37
37
  "postcss": "~8.5.2",
38
- "postcss-preset-env": "^10.1.3",
38
+ "postcss-preset-env": "^10.1.4",
39
39
  "postcss-rem-to-responsive-pixel": "~6.0.2",
40
40
  "postcss-selector-parser": "~7.1.0",
41
41
  "@weapp-tailwindcss/shared": "1.0.0"