3

I am using perfect-scrollbar. The documentation says, that the scrollbar is fully customizable, but there is no such setting like width

This is how it looks default: default scrollbar width, and it is only 8px width.

But I need at least 12px: desired scrollbar width[3]

How to achieve this?

Cœur
  • 37,241
  • 25
  • 195
  • 267
msangel
  • 9,895
  • 3
  • 50
  • 69

2 Answers2

1

Change the CSS:

Width and height.

There's no harm in including your own stylesheet, in fact, it's expected. That way you can style it however you want (not just thickness of the bar, but color and so on). Just download the unminimized verison from GitHub and include it on your page with any tweaks you want.

Or you can override the values with javascript/jQuery.

1

To those using Angular 2+, if you find that you're unable to style the perfect-scrollbar with SCSS, add the prefix ::ng-deep before your selector. For example, in componentname.component.scss add

::ng-deep perfect-scrollbar > div > div.ps__rail-y {
  //styles go here
}
New-Way
  • 507
  • 3
  • 12