[FEAT] 스크롤바 사이즈 유틸리티 클래스 추가#135
Conversation
- 한두 곳에서만 덮어쓸 수 있는 scrollbar-sm 유틸리티 클래스를 추가했습니다
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Walkthrough기본 스크롤바 크기를 8px로 조정하고, 전역 Changes스크롤바 스타일
Estimated code review effort: 2 (Simple) | ~10 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
packages/tailwind-config/scrollbar.css (1)
10-13: 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win
::-webkit-scrollbar-thumb:hover규칙 삭제로 인터랙션 피드백이 사라졌습니다.
thumb:hover스타일이 제거되어 WebKit 기반 브라우저에서 스크롤바 thumb에 마우스를 올렸을 때 시각적 변화가 없습니다. 사용자가 스크롤바가 상호작용 가능한 요소인지 인지하기 어려워질 수 있습니다.의도적 삭제라면 무시하셔도 되지만, 실수로 삭제된 경우라면 hover 상태를 복원하는 것을 권장합니다.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@packages/tailwind-config/scrollbar.css` around lines 10 - 13, Restore the missing *::-webkit-scrollbar-thumb:hover rule alongside the existing scrollbar thumb styles, using an appropriate hover color to provide visual interaction feedback while preserving the current base background-color and border-radius behavior.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@packages/tailwind-config/scrollbar.css`:
- Around line 1-4: Restore the global Firefox scrollbar declarations alongside
the existing *::-webkit-scrollbar rule in scrollbar.css, using scrollbar-width
and scrollbar-color with values matching the intended scrollbar appearance; if
needed, keep Firefox-specific styling in a separate selector while preserving
cross-browser compatibility.
---
Outside diff comments:
In `@packages/tailwind-config/scrollbar.css`:
- Around line 10-13: Restore the missing *::-webkit-scrollbar-thumb:hover rule
alongside the existing scrollbar thumb styles, using an appropriate hover color
to provide visual interaction feedback while preserving the current base
background-color and border-radius behavior.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: ccd80fae-96ad-498a-be51-e8a7d10aae40
📒 Files selected for processing (1)
packages/tailwind-config/scrollbar.css
| *::-webkit-scrollbar { | ||
| width: 6px; | ||
| height: 6px; | ||
| width: 8px; | ||
| height: 8px; | ||
| } |
There was a problem hiding this comment.
🩺 Stability & Availability | 🔴 Critical | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check if scrollbar-width/scrollbar-color are re-defined in consumer globals.css
rg -n 'scrollbar-(width|color)' --type cssRepository: Team-Timo/Timo-client
Length of output: 159
Firefox용 전역 스크롤바 선언을 다시 넣어주세요.
packages/tailwind-config/scrollbar.css:1-4에서 scrollbar-width/scrollbar-color를 제거하면 Firefox는 ::-webkit-scrollbar를 지원하지 않아 기본 스크롤바로 돌아갑니다. 전역 스타일의 호환성을 유지하려면 이 선언을 복원하거나, Firefox용 스타일을 별도로 유지해야 합니다.
참고: MDN scrollbar-width, MDN scrollbar-color
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@packages/tailwind-config/scrollbar.css` around lines 1 - 4, Restore the
global Firefox scrollbar declarations alongside the existing
*::-webkit-scrollbar rule in scrollbar.css, using scrollbar-width and
scrollbar-color with values matching the intended scrollbar appearance; if
needed, keep Firefox-specific styling in a separate selector while preserving
cross-browser compatibility.
Timo Performance ReportBundle Size — timo-web
Lighthouse — timo-web
Image Optimization — timo-web
측정 커밋: |
yumin-kim2
left a comment
There was a problem hiding this comment.
PR에 원인 분석부터 결정 근거까지 적혀있어서 좋네용👍👍 고생하셨습니다!
ISSUE 🔗
close #132
What is this PR? 🔍
전역 스크롤바 스타일 위에, 필요한 곳에서만 덮어쓸 수 있는 작은 스크롤바 유틸리티 클래스를 추가했습니다.
배경
packages/tailwind-config/scrollbar.css에서*셀렉터로 전역 스크롤바 두께(8px)를 고정하고 있었습니다.*selector보다 specificity가 높다는 점을 이용해, opt-in 클래스를 추가해 필요한 요소에만 덮어쓰도록 했습니다.스크롤바 사이즈 유틸리티
.scrollbar-sm클래스를 추가해::-webkit-scrollbar두께를 4px로 오버라이드할 수 있게 했습니다..scrollbar-sm::-webkit-scrollbar { width: 4px; height: 4px; }로 선언했습니다. class selector가 기존*::-webkit-scrollbarselector보다 specificity가 높아!important없이 오버라이드됩니다. Firefox의scrollbar-width는 전역에서 이미thin(가장 얇은 옵션)으로 설정돼 있어 별도 오버라이드는 필요 없었습니다. 필요한 요소에className="scrollbar-sm"만 추가하면 적용됩니다.scrollbar-sm 유틸리티 클래스가 적용되지 않는 문제 해결
문제 상황
scrollbar-sm 클래스로 스크롤바 두께를 4px로 줄이려고 했는데, 기본 스크롤바(8px)와 시각적으로 전혀 구분되지 않는 문제가 있었어요.
CSS 선언 순서도 맞고, DevTools상으로도 .scrollbar-sm::-webkit-scrollbar { width: 4px }가 activated 상태로 잡혔는데도 실제 렌더링에는 전혀 반영되지 않았습니다.

원인 파악
DevTools Computed 탭에서 값을 극단적으로(2px, 20px 등) 바꿔가며 테스트한 결과, ::-webkit-scrollbar 자체가 완전히 무시되고 있다는 것을 확인했습니다.
원인은 같은 요소에 공존하던 표준 스펙 속성이었습니다.
Chrome 최신 버전은 scrollbar-width/scrollbar-color 같은 표준 스크롤바 속성이 하나라도 지정되어 있으면, 해당 요소를 "표준 스크롤바 렌더링 모드"로 전환하고, 이 모드에서는 ::-webkit-scrollbar/::-webkit-scrollbar-thumb 등 webkit 전용 pseudo-element 커스터마이징을 전부 무시합니다. scrollbar-width만 지웠을 때도 안 됐던 건 scrollbar-color가 여전히 남아있어 계속 표준 모드로 렌더링됐기 때문이었어요.
해결책
두 스펙(webkit 전용 vs 표준)은 같은 요소에서 세밀하게 병행 사용이 불가능하다는 걸 확인했고, 두 가지 옵션을 검토했습니다.
옵션 A: webkit 전용으로 완전 통일 → 두께/색상 모두 세밀 조정 가능, 단 Firefox 미지원
옵션 B: 표준 속성만 사용 → 브라우저 전체 지원, 단 두께는 auto/thin/none 3단계로 제한되어 scrollbar-sm 같은 세밀한 px 조정 불가능
최종 결정
옵션 A를 선택했습니다. scrollbar-width/scrollbar-color를 제거하고 ::-webkit-scrollbar 계열로 통일하여, gray-600 등 디자인 시스템 컬러와 세밀한 두께 조정(scrollbar-sm)을 모두 유지했습니다. 대신 Firefox에서는 스크롤바 커스터마이징이 적용되지 않고 브라우저 기본 스타일로 노출되는데, 이 부분은 디자이너와 협의하여 Firefox 지원 범위에서 제외하기로 합의했습니다.
To Reviewers
단순 CSS 유틸리티 추가이며, 별도 판단이 필요한 구조 선택은 없습니다.
Screenshot 📷
Test Checklist ✔
pnpm lint통과pnpm check-types통과scrollbar-sm적용 시 스크롤바 두께가 얇아지는 것을 확인 (테스트 페이지는 커밋에서 제외하고 삭제)pnpm build— 미실행: CI에서 확인 예정