DWilliames / paddy-sketch-plugin

Automated padding, spacing and alignment for your Sketch layers
MIT License
2.17k stars 61 forks source link

[BUG]Paddy doesn't ignore masked layers #81

Closed equinusocio closed 6 years ago

equinusocio commented 6 years ago

Bug report

Hi, i'm working with paddy and a symbol used as fill color. By this way i can just make one component and change it's fill. Unfortunately paddy apply paddings from the edges of fill layer. I think it should ignore any element inside the layer that have paddings defined ([..., ...])

Expected behavior:

Paddy should ignore masked elements inside the element with padding.

Actual behavior:

Paddy doesn't ignore masked elements. Example sample

There is a way to make this work?

Steps to reproduce:

Make a mask and put a layer with the same size of the background.

Raghav789 commented 6 years ago

turn the color layer +mask to a symbol and then add Paddy parameter. I always keep the color symbols as small as possible like 1x1 then, you can stretch color symbol to any size you want later.

equinusocio commented 6 years ago

@Raghav789 By this way i will have two symbols overrides because my fill color is an imported symbol. Can you show me some example?

mikeozornin commented 6 years ago

@equinusocio in the suggestion https://github.com/DWilliames/paddy-sketch-plugin/issues/70 I showed how to use Paddy with symbol as BG and mask. The same way you create a button, you can find sketch sources examples there.

I you case you need to set - in front of symbol name.

equinusocio commented 6 years ago

@mikeozornin ~It doesn't work, even the sketch files in the linked issue. Paddy doesn't update layers (even after a restart).~

Sketch 49.1 + last paddy release

EDIT: It works if i don't group masked layers and use the - to ignore elements: screen shot 2018-03-16 at 11 51 50

Mask