Files
yoga/docs/_docs/flexbox/margin-padding-border.md
Emil Sjolander f2080e520f Move yoga docs into docs folder on master branch
Summary: Move yoga docs into master branch so that pull requests are able to include doc updates as part of other changes.

Reviewed By: JoelMarcey

Differential Revision: D4365700

fbshipit-source-id: 2f46a88974104c454c00bcdf1257abb5c4075a68
2016-12-28 04:09:48 -08:00

2.4 KiB

docid, title, layout, permalink
docid title layout permalink
margin-padding-border Margin, Padding, Border docs /docs/margin-padding-border/

Margin, Padding are similar but have some important differences. By applying Margin to an item you specify the offset a certain edge of the item should have from it's closest sibling or parent. With Padding on the other hand you specify the offset children should have from a certain edge on the parent. Border behaves nearly identically to Padding and is only separate from Padding to make it easier to implement border effect such as color. In the below illustrations the green box is a child of the dark gray box.

MarginStart = 50;

MarginEnd = 50;

MarginAll = 50;

PaddingAll = 50;

BorderWidth = 50;