@unocss/postcss 0.60.2 → 0.60.4

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.
Files changed (2) hide show
  1. package/dist/esm.mjs +3 -2
  2. package/package.json +4 -4
package/dist/esm.mjs CHANGED
@@ -126,7 +126,7 @@ async function parseScreen(root, uno, directiveName) {
126
126
  });
127
127
  }
128
128
  function calcMaxWidthBySize(size) {
129
- const value = size.match(/^-?[0-9]+\.?[0-9]*/)?.[0] || "";
129
+ const value = size.match(/^-?\d+\.?\d*/)?.[0] || "";
130
130
  const unit = size.slice(value.length);
131
131
  const maxWidth = Number.parseFloat(value) - 0.1;
132
132
  return Number.isNaN(maxWidth) ? size : `${maxWidth}${unit}`;
@@ -161,8 +161,9 @@ function createPlugin(options) {
161
161
  if (targetRE.test(root.toString())) {
162
162
  if (!isTarget) {
163
163
  root.walkAtRules((rule) => {
164
- if (rule.name === directiveMap.unocss || rule.name === directiveMap.apply || rule.name === directiveMap.screen)
164
+ if (rule.name === directiveMap.unocss || rule.name === directiveMap.apply || rule.name === directiveMap.screen) {
165
165
  isTarget = true;
166
+ }
166
167
  if (isTarget)
167
168
  return false;
168
169
  });
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@unocss/postcss",
3
3
  "type": "module",
4
- "version": "0.60.2",
4
+ "version": "0.60.4",
5
5
  "description": "PostCSS plugin for UnoCSS",
6
6
  "author": "sibbng <sibbngheid@gmail.com>",
7
7
  "license": "MIT",
@@ -58,9 +58,9 @@
58
58
  "fast-glob": "^3.3.2",
59
59
  "magic-string": "^0.30.10",
60
60
  "postcss": "^8.4.38",
61
- "@unocss/core": "0.60.2",
62
- "@unocss/rule-utils": "0.60.2",
63
- "@unocss/config": "0.60.2"
61
+ "@unocss/config": "0.60.4",
62
+ "@unocss/rule-utils": "0.60.4",
63
+ "@unocss/core": "0.60.4"
64
64
  },
65
65
  "scripts": {
66
66
  "build": "unbuild",