Skip to content

[Bugfix Repro] 차트 높이 무한 늘어남 버그 수정#15

Open
seongbin9786 wants to merge 4 commits into
mainfrom
bugfix-fixture
Open

[Bugfix Repro] 차트 높이 무한 늘어남 버그 수정#15
seongbin9786 wants to merge 4 commits into
mainfrom
bugfix-fixture

Conversation

@seongbin9786

Copy link
Copy Markdown
Owner

원인

  • CSS 기본값:
    • grid/flex item의 min-height: auto가 기본이므로, 최소 높이가 content 높이
  • Recharts ResponsiveContainer:
    • ResponsiveContainer는 부모 높이에 맞춰서 커짐

해결 방법

  • min-height: 0;을 추가해서 auto 동작을 제거해서 무한 루프를 제거해야 함. 이 때 모든 조상에서 설정해줘야 함
    • ResponsiveContainermin-h-0: ResponsiveContainer의 부모가 flex여서 필요
    • grid 컨테이너 요소의 min-h-0: ResponsiveContainer 부모의 부모이고, 해당 요소의 부모가 flex여서 필요

배운 점

  • flex/grid에서 min-height: auto가 기본값이라는 점.
  • CSS로 렌더링된 결과를 찬찬히 분석해보면 명확한 이유를 찾을 수 있다는 점(그리고 이 과정이 오래 걸린다는 점).

@seongbin9786 seongbin9786 self-assigned this Dec 20, 2025
@seongbin9786 seongbin9786 added bug Something isn't working documentation Improvements or additions to documentation labels Dec 20, 2025
@vercel

vercel Bot commented Dec 20, 2025

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
my-time-waea Ready Ready Preview, Comment Dec 20, 2025 6:05am

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant