@unocss/preset-mini 0.15.0 → 0.15.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.
package/dist/chunks/default2.cjs
CHANGED
|
@@ -815,6 +815,10 @@ const transformBase = {
|
|
|
815
815
|
"transform": "rotate(var(--un-rotate)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z))",
|
|
816
816
|
[pseudo.CONTROL_BYPASS_PSEUDO]: ""
|
|
817
817
|
};
|
|
818
|
+
const transformGpu = {
|
|
819
|
+
transform: "rotate(var(--un-rotate)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) translate3d(var(--un-translate-x), var(--un-translate-y), var(--un-translate-z))",
|
|
820
|
+
[pseudo.CONTROL_BYPASS_PSEUDO]: ""
|
|
821
|
+
};
|
|
818
822
|
const transforms = [
|
|
819
823
|
["transform", transformBase],
|
|
820
824
|
[/^preserve-(3d|flat)$/, ([, value]) => ({ "transform-style": value === "3d" ? `preserve-${value}` : value })],
|
|
@@ -823,6 +827,7 @@ const transforms = [
|
|
|
823
827
|
[/^scale()-([^-]+)$/, handleScale],
|
|
824
828
|
[/^scale-([xyz])-([^-]+)$/, handleScale],
|
|
825
829
|
[/^rotate-([^-]+)(?:deg)?$/, handleRotate],
|
|
830
|
+
["transform-gpu", transformGpu],
|
|
826
831
|
["origin-center", { "transform-origin": "center" }],
|
|
827
832
|
["origin-top", { "transform-origin": "top" }],
|
|
828
833
|
["origin-top-right", { "transform-origin": "top right" }],
|
package/dist/chunks/default2.mjs
CHANGED
|
@@ -813,6 +813,10 @@ const transformBase = {
|
|
|
813
813
|
"transform": "rotate(var(--un-rotate)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) translateX(var(--un-translate-x)) translateY(var(--un-translate-y)) translateZ(var(--un-translate-z))",
|
|
814
814
|
[CONTROL_BYPASS_PSEUDO]: ""
|
|
815
815
|
};
|
|
816
|
+
const transformGpu = {
|
|
817
|
+
transform: "rotate(var(--un-rotate)) scaleX(var(--un-scale-x)) scaleY(var(--un-scale-y)) scaleZ(var(--un-scale-z)) skewX(var(--un-skew-x)) skewY(var(--un-skew-y)) translate3d(var(--un-translate-x), var(--un-translate-y), var(--un-translate-z))",
|
|
818
|
+
[CONTROL_BYPASS_PSEUDO]: ""
|
|
819
|
+
};
|
|
816
820
|
const transforms = [
|
|
817
821
|
["transform", transformBase],
|
|
818
822
|
[/^preserve-(3d|flat)$/, ([, value]) => ({ "transform-style": value === "3d" ? `preserve-${value}` : value })],
|
|
@@ -821,6 +825,7 @@ const transforms = [
|
|
|
821
825
|
[/^scale()-([^-]+)$/, handleScale],
|
|
822
826
|
[/^scale-([xyz])-([^-]+)$/, handleScale],
|
|
823
827
|
[/^rotate-([^-]+)(?:deg)?$/, handleRotate],
|
|
828
|
+
["transform-gpu", transformGpu],
|
|
824
829
|
["origin-center", { "transform-origin": "center" }],
|
|
825
830
|
["origin-top", { "transform-origin": "top" }],
|
|
826
831
|
["origin-top-right", { "transform-origin": "top right" }],
|
package/dist/chunks/index.cjs
CHANGED
|
@@ -36,9 +36,12 @@ const xyzMap = {
|
|
|
36
36
|
|
|
37
37
|
const numberWithUnitRE = /^(-?[0-9.]+)(px|pt|pc|rem|em|%|vh|vw|in|cm|mm|ex|ch|vmin|vmax)?$/i;
|
|
38
38
|
const numberRE = /^(-?[0-9.]+)$/i;
|
|
39
|
+
const unitOnlyRE = /^(px)$/i;
|
|
39
40
|
function rem(str) {
|
|
40
41
|
if (str === "auto" || str === "a")
|
|
41
42
|
return "auto";
|
|
43
|
+
if (str.match(unitOnlyRE))
|
|
44
|
+
return `1${str}`;
|
|
42
45
|
const match = str.match(numberWithUnitRE);
|
|
43
46
|
if (!match)
|
|
44
47
|
return;
|
|
@@ -50,6 +53,8 @@ function rem(str) {
|
|
|
50
53
|
return `${num / 4}rem`;
|
|
51
54
|
}
|
|
52
55
|
function px(str) {
|
|
56
|
+
if (str.match(unitOnlyRE))
|
|
57
|
+
return `1${str}`;
|
|
53
58
|
const match = str.match(numberWithUnitRE);
|
|
54
59
|
if (!match)
|
|
55
60
|
return;
|
package/dist/chunks/index.mjs
CHANGED
|
@@ -34,9 +34,12 @@ const xyzMap = {
|
|
|
34
34
|
|
|
35
35
|
const numberWithUnitRE = /^(-?[0-9.]+)(px|pt|pc|rem|em|%|vh|vw|in|cm|mm|ex|ch|vmin|vmax)?$/i;
|
|
36
36
|
const numberRE = /^(-?[0-9.]+)$/i;
|
|
37
|
+
const unitOnlyRE = /^(px)$/i;
|
|
37
38
|
function rem(str) {
|
|
38
39
|
if (str === "auto" || str === "a")
|
|
39
40
|
return "auto";
|
|
41
|
+
if (str.match(unitOnlyRE))
|
|
42
|
+
return `1${str}`;
|
|
40
43
|
const match = str.match(numberWithUnitRE);
|
|
41
44
|
if (!match)
|
|
42
45
|
return;
|
|
@@ -48,6 +51,8 @@ function rem(str) {
|
|
|
48
51
|
return `${num / 4}rem`;
|
|
49
52
|
}
|
|
50
53
|
function px(str) {
|
|
54
|
+
if (str.match(unitOnlyRE))
|
|
55
|
+
return `1${str}`;
|
|
51
56
|
const match = str.match(numberWithUnitRE);
|
|
52
57
|
if (!match)
|
|
53
58
|
return;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@unocss/preset-mini",
|
|
3
|
-
"version": "0.15.
|
|
3
|
+
"version": "0.15.4",
|
|
4
4
|
"description": "The minimal preset for UnoCSS",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"unocss",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"*.css"
|
|
62
62
|
],
|
|
63
63
|
"dependencies": {
|
|
64
|
-
"@unocss/core": "0.15.
|
|
64
|
+
"@unocss/core": "0.15.4"
|
|
65
65
|
},
|
|
66
66
|
"scripts": {
|
|
67
67
|
"build": "unbuild",
|