I’m attempting to add a a white overlay to a text only if the content is not scrolled when there is a scroll bar.
So I was trying to apply this trick : Scroll Shadows - CSS-Tricks but instead of black gradient colors using white but the problem is the white is applied below the text, based on https://codepen.io/chriscoyier/pen/YzXBYvL
if you replace
/* Shadow BOTTOM */
radial-gradient(
farthest-side at 50% 100%,
rgba(0, 0, 0, 0.2),
rgba(0, 0, 0, 0)
) center bottom;
by
radial-gradient(
farthest-side at 50% 100%,
rgba(255, 255, 255, 0.2),
rgba(255, 255, 255, 0)
) center bottom;
I guess thats the reason it doesn’t work but I don’t how to achieve this if I use :after to insert the gradient above the text it doesn’t work properly neither in relation to the scroll behavior…
You have white and black only so how if you put in a white overlay nothing would happen if it was the same color. Im only going off of the information from this link.