Margin stack...Margin or Padding?

Does it matter if you use the margin or padding setting? In other which is preferred since it seems to do the same thing.

Does you margin stack video from your structure stack apply to this stack as well?


With padding, the content would have spacing inside the container but with margin, the content is right up to the border of the container and the spacing is outside the container.

It’s most noticeable if the container has a background colour. Is this what you mean?

1 Like

Hi, thanks for your reply, what I’m trying to know is does it matter which method is used since they both add spacing

Someone may know better than me but I don’t think it matters unless the background of the Margin stack is different from the background of what’s outside it (whether that’s an image or plain colour).

1 Like

Like @webinjection mentioned, the difference only becomes noticeable depending on your particular application of the stack. If you’re just wanting spacing around something generally it does not matter.

As in @webinjection’s example it would matte which one is used. You can also use them in tandem to do cool things with borders on stacks and such as well.

But generally, it won’t matter if you’re just trying to put a little space between items and have it change at the different breakpoints.

Additionally – I think that the Margin stack is one of the most versatile stacks in Foundry.

1 Like