Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: scrollbar measure should consider scrollbar-color ::webkit-scrollbar mixing #507

Merged
merged 4 commits into from
Mar 6, 2024

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Mar 6, 2024

css 设置 scrollbar-color 后会导致 ::webkit-scrollbar 伪类失效。测量仍然使用 ::webkit-scrollbar 的数值导致滚动条宽度的计算错误。修复成实际测量值。

Copy link

vercel bot commented Mar 6, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
util ✅ Ready (Inspect) Visit Preview Mar 6, 2024 6:37am

Copy link

codecov bot commented Mar 6, 2024

Codecov Report

Attention: Patch coverage is 69.04762% with 13 lines in your changes are missing coverage. Please review.

Project coverage is 90.48%. Comparing base (871c2c1) to head (307c616).

Files Patch % Lines
src/getScrollBarSize.tsx 69.04% 13 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #507      +/-   ##
==========================================
- Coverage   91.58%   90.48%   -1.11%     
==========================================
  Files          38       38              
  Lines         927      935       +8     
  Branches      287      295       +8     
==========================================
- Hits          849      846       -3     
- Misses         76       87      +11     
  Partials        2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@crazyair
Copy link
Contributor

crazyair commented Mar 6, 2024

69.04

@zombieJ
Copy link
Member Author

zombieJ commented Mar 6, 2024

69.04

测试盖不住,jsdom 没有真实的 DOM 环境。测试里写的也是假的。

@zombieJ zombieJ merged commit e96b0c6 into master Mar 6, 2024
9 of 11 checks passed
@delete-merged-branch delete-merged-branch bot deleted the fix-scrollbar branch March 6, 2024 07:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants