Skip to content

Commit 453229a

Browse files
committedOct 14, 2024
fix(tailwind): float-left utility being converted to cssFloat: "left" (#1687)
1 parent 827cc70 commit 453229a

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed
 

‎.changeset/selfish-garlics-clap.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@react-email/tailwind": patch
3+
---
4+
5+
Fix `css-float` being used for utilities such as `float-left`

‎packages/tailwind/src/utils/compatibility/css-to-jsx-style.spec.ts

-4
Original file line numberDiff line numberDiff line change
@@ -76,10 +76,6 @@ test("transforms rules with browser prefixes", () => {
7676
});
7777
});
7878

79-
test("transforms float rule property to cssFloat", () => {
80-
expect(cssToJsxStyle("float: left")).toEqual({ cssFloat: "left" });
81-
});
82-
8379
test("transforms rules with urls", () => {
8480
expect(
8581
cssToJsxStyle(

‎packages/tailwind/src/utils/compatibility/css-to-jsx-style.ts

-4
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@ const convertPropertyName = (prop: string) => {
88

99
modifiedProp = modifiedProp.toLowerCase();
1010

11-
if (modifiedProp === "float") {
12-
return "cssFloat";
13-
}
14-
1511
if (modifiedProp.startsWith("--")) {
1612
return modifiedProp;
1713
}

0 commit comments

Comments
 (0)
Please sign in to comment.