Skip to content

Commit

Permalink
feat: better blur performance on Safari (#104)
Browse files Browse the repository at this point in the history
  • Loading branch information
QuiiBz authored Sep 7, 2024
1 parent 5aad83b commit fce014d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions apps/dashboard/src/lib/__tests__/elements.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ describe("createElementStyle", () => {
"position": "absolute",
"top": "20px",
"width": "100px",
"willChange": "filter",
}
`);
});
Expand Down
1 change: 1 addition & 0 deletions apps/dashboard/src/lib/elements.ts
Original file line number Diff line number Diff line change
Expand Up @@ -168,6 +168,7 @@ export function createElementStyle(element: OGElement): CSSProperties {
element.rotate !== 0 ? `rotate(${element.rotate}deg)` : undefined,
boxShadow: boxShadows.length ? boxShadows.join(", ") : undefined,
filter: element.blur !== 0 ? `blur(${element.blur}px)` : undefined,
willChange: element.blur !== 0 ? "filter" : undefined,
};

if (element.tag === "p" || element.tag === "span") {
Expand Down

0 comments on commit fce014d

Please sign in to comment.