D
D
Dutymy2021-07-31 00:20:05
Sass
Dutymy, 2021-07-31 00:20:05

How to make scroll box-shadow not clipped?

Hello, I have such a scroll for webkit browsers

overflow-x: hidden;
overflow-y: auto;
    &::-webkit-scrollbar {
      width: 0.5vmin;
      height: 100%;
      background-color: rgba(0, 0, 0, 0.3);
      border-radius: $border-radius;
    }
    &::-webkit-scrollbar-thumb {
      background: blue;
      box-shadow: 0px 0px 0.5vmin 0.25vmin rgb(109, 93, 255);
      border-radius: $border-radius;
    }

But since the scroll in the final positions rests on the container with overflow:hidden and the glow is cut off ugly - how can this be prevented?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
I
iBird Rose, 2021-07-31
@Dutymy

there is no way to bypass it. you can only beat it, for example, by setting padding to a block with overflow so that there is a place for a shadow

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question