Gradient on Objects
By default a gradient layer cover the whole canvas. This short tutorial shows you how to cover an object with the gradient.
3. Select all layers, right click, and select Encapsulate. Make sure the gradient is above the shapes it should fill.
The gradient will clip to the visible area of the region below it inside the Inline Canvas. (and any other layers in that section).