Skip to content

Commit

Permalink
refactor: layout shift 최소화를 위한 reflow 작업 제거
Browse files Browse the repository at this point in the history
  • Loading branch information
D0Dam committed Sep 5, 2023
1 parent a40d31b commit 176e675
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
3 changes: 1 addition & 2 deletions src/pages/Home/components/CustomCursor/CustomCursor.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ const CustomCursor = ({ text = '' }: CustomCursorProps) => {

useEffect(() => {
if (cursorRef.current) {
cursorRef.current.style.top = `${mousePosition.pageY}px`;
cursorRef.current.style.left = `${mousePosition.pageX}px`;
cursorRef.current.style.transform = `translate(${mousePosition.pageX}px, ${mousePosition.pageY}px)`;
}
}, [mousePosition]);

Expand Down
3 changes: 2 additions & 1 deletion src/pages/Search/components/GifItem/GifItem.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,8 @@
}

.gifItem:hover {
top: -0.75rem;
/* top: -0.75rem; */
transform: translateY(-0.75rem);
}

.gifImage {
Expand Down
2 changes: 1 addition & 1 deletion src/pages/Search/components/HelpPanel/HelpPanel.module.css
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
}

.selectedItemContainer.showSheet {
right: 0;
transform: translateX(-320px);
opacity: 1;
}

Expand Down

0 comments on commit 176e675

Please sign in to comment.