Skip to content

Commit

Permalink
fix(tailwind): float-left utility being converted to `cssFloat: "le…
Browse files Browse the repository at this point in the history
…ft"` (#1687)
  • Loading branch information
gabrielmfern authored Sep 17, 2024
1 parent 077360f commit 6c20067
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 8 deletions.
5 changes: 5 additions & 0 deletions .changeset/selfish-garlics-clap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@react-email/tailwind": patch
---

Fix `css-float` being used for utilities such as `float-left`
Original file line number Diff line number Diff line change
Expand Up @@ -76,10 +76,6 @@ test("transforms rules with browser prefixes", () => {
});
});

test("transforms float rule property to cssFloat", () => {
expect(cssToJsxStyle("float: left")).toEqual({ cssFloat: "left" });
});

test("transforms rules with urls", () => {
expect(
cssToJsxStyle(
Expand Down
4 changes: 0 additions & 4 deletions packages/tailwind/src/utils/compatibility/css-to-jsx-style.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,6 @@ const convertPropertyName = (prop: string) => {

modifiedProp = modifiedProp.toLowerCase();

if (modifiedProp === "float") {
return "cssFloat";
}

if (modifiedProp.startsWith("--")) {
return modifiedProp;
}
Expand Down

0 comments on commit 6c20067

Please sign in to comment.