Possible to pass a color and a box shadow to the scrollbar track? #569
-
Hi! I am just wondering if it is possible to give the scrollbar track a specific color and a box shadow since there has not been a parameter to pass a shadow. I am trying it right now but I could not fix my issue yet. |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
@BenjaminHoefer Good day :) Besides the .os-scrollbar > .os-scrollbar-track {
box-shadow: 0 0 5px 0px rgba(0, 0, 0, 0.75);
} or if you need to apply different styles per scrollbar you can do: .os-scrollbar-horizontal > .os-scrollbar-track {
box-shadow: 0px -5px 5px 0px rgba(0, 0, 0, 0.75);
}
.os-scrollbar-vertical > .os-scrollbar-track {
box-shadow: -5px 0px 5px 0px rgba(0, 0, 0, 0.75);
} Here is a small example: https://stackblitz.com/edit/overlayscrollbars-xfyops?file=styles.css |
Beta Was this translation helpful? Give feedback.
@BenjaminHoefer Good day :)
Besides the
css custom properties
, you can pass add almost any style to the scrollbar, scrollbar-track or scrollbar-handle.For example you could do this:
or if you need to apply different styles per scrollbar you can do:
Here is a small example: https://stackblitz.com/edit/overlayscrollbars-xfyops?file=styles.css