Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
17 commits
Select commit Hold shift + click to select a range
5ad6875
fix(transforms): give every transform entry one property
YevheniiKotyrlo Oct 9, 2026
81af42b
fix(transforms): a transform value React Native cannot take leaves none
YevheniiKotyrlo Oct 9, 2026
c16f0e6
fix(transforms): a transform list holding anything but entries is none
YevheniiKotyrlo Oct 9, 2026
f26df66
fix(transforms): read an operand list a var() supplies whole
YevheniiKotyrlo Oct 9, 2026
870760f
test(transforms): run each invalid function beside a valid one too
YevheniiKotyrlo Oct 9, 2026
fab45c9
fix(transforms): give each transform property a cascade slot, compose…
YevheniiKotyrlo Oct 9, 2026
edc1086
fix(transforms): read translate, rotate and scale by their own grammars
YevheniiKotyrlo Oct 9, 2026
ca6c8e5
fix(transforms): render a scale as the scaleX / scaleY pair on both r…
YevheniiKotyrlo Oct 9, 2026
42444d8
perf(native): record transform declarations without per-render closures
sammoore Nov 11, 2026
00494c5
test(transforms): render a written translate() pair and translateZ()
sammoore Nov 11, 2026
a7b029e
refactor(compiler): add the first-pass transform visitor beside the v…
sammoore Nov 11, 2026
675f24f
refactor(compiler): leave a calc() translate parsed instead of re-tok…
sammoore Nov 11, 2026
d5de42e
perf(native): compose and read transforms without per-render collections
sammoore Nov 11, 2026
15f6ee9
refactor(transforms): keep only the longhand grammar Tailwind reaches
sammoore Nov 17, 2026
556cdc1
perf(native): resolve a transform list's functions one by one
sammoore Nov 17, 2026
d492b14
test: read comma-separated arguments through translate(), not rotate()
sammoore Nov 17, 2026
ddf5648
perf(native): compose a lone transform declaration directly
sammoore Nov 18, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions src/__tests__/compiler/compiler.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -382,6 +382,48 @@ test("warnings", () => {
});
});

test("a transform value the compiler cannot convert is ignored, with a warning", () => {
const compiled = compile(`
.my-class {
transform: translate(10px, 1cap);
rotate: 1grad;
scale: 2;
}
.alone {
translate: calc(1em + 5px) 5px;
}`);

expect(compiled.stylesheet()).toStrictEqual({
s: [
[
"my-class",
[
{
d: [
[
[
[{}, "scaleX", 2],
[{}, "scaleY", 2],
],
"scale",
],
],
s: [1, 1],
},
],
],
],
});

expect(compiled.warnings()).toStrictEqual({
values: {
transform: ["1cap"],
translate: ["calc()"],
rotate: ["1 grad"],
},
});
});

test("simplifies rem", () => {
const compiled = compile(`.test {
border-width: calc(10rem + 2px);
Expand Down
4 changes: 2 additions & 2 deletions src/__tests__/compiler/declarations.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ const tests = [
["-rn-ripple-layer: foreground;", [{ d: [[true, ["android_ripple", "foreground"]]], s: [1, 1] }]],
["caret-color: black", [{ d: [["#000", ["cursorColor"]]], s: [1, 1] }]],
["fill: black;", [{ d: [["#000", ["fill"]]], s: [1, 1] }]],
["rotate: 3deg;", [{ d: [[[{}, "rotateZ", "3deg"], "rotateZ"]], s: [1, 1] }]],
["rotate: x 3deg;", [{ d: [[[{}, "rotateX", "3deg"], "rotateX"]], s: [1, 1] }]],
["rotate: 3deg;", [{ d: [[[{}, "rotateZ", "3deg"], "rotate"]], s: [1, 1] }]],
["rotate: x 3deg;", [{ d: [[[{}, "rotateX", "3deg"], "rotate"]], s: [1, 1] }]],
["stroke-width: 1px;", [{ d: [[1, ["strokeWidth"]]], s: [1, 1] }]],
["stroke: black;", [{ d: [["#000", ["stroke"]]], s: [1, 1] }]],
] as const;
Expand Down
Loading
Loading