DWilliames / paddy-sketch-plugin

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

[Enhancement] Ability to define [left center right] for padding with [width=] or [top middle bottom] for [height=] #60

Open JesseBilsten opened 6 years ago

JesseBilsten commented 6 years ago

Feature request / enhancement

Current functionality seems to be that the other layers in the group are centered based on the size of the background.

Would like the ability to have the background resize to the left, right or center based on width. And the ability to have the background resize up, down or middle based on height.

DWilliames commented 6 years ago

Great idea @JesseBilsten.

thaWeeDz commented 6 years ago

An addition. If no specific resize rule is given, the background should stay where it is, only respecting the padding rules, wrapping around the items. The example animations show this behaviour, but the latest version seems to resize the the background around the items, leaving equal (css margin:auto) space around the inner items.

JesseBilsten commented 6 years ago

Good point Wytze.

The background moving was the issue that prompted this Feature Request so if Paddy respected it's current location, that would satisfy the request at a minimum.

E.g. I had a bar with buttons inside it and aligned to the left inside. Paddy will now shift the background to be centered on the children which then cascades the layout shift up to all containing padding groups. Not at all what was intended.

On Wed, Mar 28, 2018 at 6:49 AM, Wytze Voerman notifications@github.com wrote:

An addition. If no specific resize rule is given, the background should stay where it is, only respecting the padding rules, wrapping around the items. The example animations show this behaviour, but the latest version seems to resize the the background around the items, leaving equal (css margin:auto) space around the inner items.

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/DWilliames/paddy-sketch-plugin/issues/60#issuecomment-376893538, or mute the thread https://github.com/notifications/unsubscribe-auth/AAqt4o1fw-ZxbJO_Xc5OUPNN9U3BpqsBks5ti5T5gaJpZM4SaR9H .