I have two layers; one with a gradient style on it directly, and one inside a group with the exact same gradient style applied. However, the gradient's range is the entire canvas, instead of the bounds of the shape(s) inside it. Here's a picture:

Two shapes with gradients. One inside a group

Is there anyway to constrain the bounds of the gradient to the shapes inside of the group instead of the entire canvas? All other layer styles respect the layer bounds. One solution I've found is to use a mask on the group. However, that gets tedious with multiple shapes very quickly as you have to get the aggregate of the shapes and reapply the mask for every change.

  • Is there a reason you can't apply the gradient layer style directly to the shape ("child" in your image)?
    – Scott
    Sep 26, 2013 at 0:01
  • I assume they'd have multiple shapes.
    – Hanna
    Sep 26, 2013 at 0:05
  • Correct. This is a very simple example to show what's going on. It's more of a problem when there are multiple shapes. Sep 26, 2013 at 2:43

2 Answers 2


There are basically four ways to handle this....

Method A

Masking the layer group. But you know that. And as you pointed out, regenerating the mask can be cumbersome.

Method B

A Smart Object with the Gradient Overlay applied to that. This can make altering or editing the internal items of the group a bit more cumbersome though.

Method C

Add the Gradient Overlay to each layer inside the group. Ahh, but you say, "Then the gradient is different on each shape." Not if you uncheck the Align with Layer option in the Gradient Overlay dialog window.

grad overlay

using C you can move the internal group items around and the gradient stays at the document bounds.


Method D

Nested Groups. There's nothing stopping you from adding a nested group and applying the Gradient Overlay to that nested group. This will only alter the items inside the nested group.

nested group

Be aware, you can only nest groups up to a certain number. I think it's 5 or 10 levels, but I'm not certain. Don't ask me why nested groups work when non-nested groups don't work. I have no idea.

  • These are great suggestions. I'm leaning towards the smart object as it seems the most flexible. I'm not sure I understand Method D however. How does this change the bounds of the group? The issue wasn't so much applying a gradient to the wrong shapes, but the gradient it self wasn't starting and stopping in the places I wanted. Sep 26, 2013 at 15:17
  • Ahh, perhaps I misunderstood the issue.
    – Scott
    Sep 26, 2013 at 15:27

Masking is one way to go.

Another way to go is to convert your layer group to a smart object (right-click the layer group and select Convert to Smart Object) and then applying the layer styles to the smart object. You can of course, at any time edit the smart object (right-click the smart object and select Edit Contents) which will open as a layer group with each layer inside of it).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.