Grsmto / Grsmto/simplebar

when padding is present on scrollable div, the scrollbar does not reach the bottom

Open
#441 1 comment 2 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
6.4k
Forks
527
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
When padding is present on scrollable div, the scrollbar does not go all the way to the bottom. I found a workaround where adding box-sizing:border-box solves it. It seems like simplebar could detect this case, and account for the padding when propagating the padding to the .simplebar-content element.

**To Reproduce**
Go to https://grsmto.github.io/simplebar. Bring up the web inspector. Remove box-sizing:border-box from the HTML element's style.

**Expected behavior**
Expect the scrollbar to go to the bottom, but it does not (when box-sizing is not given).

macOS Safari 13.0.5. simplebar 5.0.7.

Contributor guide

No contributing guide indexed for this repository

Research direction

Reproduce the issue in the SimpleBar demo by removing box-sizing:border-box from the HTML element's style, then inspect how padding is propagated to the .simplebar-content element. Compare the scrollbar behavior with and without the workaround; done means the scrollbar reaches the bottom without requiring box-sizing:border-box.

Written by the indexing model from the issue text.

Assessment

Tech stack
css, typescript
Domain
frontend
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.