Random beginner-question: invisible mask for gradient transparency

:information_source: Attention Topic was automatically imported from the old Question2Answer platform.
:bust_in_silhouette: Asked By pferft

Hi everyone,

I have a scroll container full of text, buttons and pictures etc. What I’d like to achieve is all that content not to be “cut off” at the top and bottom edge of the window when scrolling through but a “gradient area” so that everything fades to complete transparency towards these edges. (Something like a vignette not darkening but gradiently transparencing anything behind…)

Inspired by this:
https://www.reddit.com/r/godot/comments/ervkse/how_to_make_text_fade_partially_like_a_gradient/
I created a white100%-to-white0% gradient png and placed it into position via Light2D node. The different modes make the background appear gradiently darker or brighter, but fading everything into invisibility doesn’t seem to be that easy.

Is there any way to achieve such an effect? (And actually preferably indeed by some custom made gradient-graphics if possible!)