Outline is not border
An outline draws outside the box and does not affect layout, which makes it the right tool for debugging a box without moving anything. A border changes the size, which is why it is the wrong tool for that check.
Space between elements, not inside them
When two elements need a gap, decide which one owns it. Setting it on the parent with one property is easier to maintain than setting it on each child, and it survives children being added.