<html><head><meta http-equiv="content-type" content="text/html; charset=UTF-8"/></head><body style="overflow-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;">Hi Ken,<div><br/></div><div>Sorry for the confusion. The reason for this seemingly strange behavior is that the width of container is fixed. The colored boxes expand to it. In CSS, if they are too big they just overflow. I hate that.</div><div><br/></div><div>For larger margin values the container width needs to be increased: <a href="https://codepen.io/bpieber/pen/PoraLjm">https://codepen.io/bpieber/pen/PoraLjm</a></div><div><br/></div><div>To summarize: margin would be useful to add additional space around a single morph inside a LayoutMorph without the need of a wrapper morph.</div><div><br/></div><div>The distance between red and green are: red's margin bottom + container's gap + green's margin top.</div><div><br/></div><div>Cheers,</div><div>Bernhard</div><div><br/></div><div><br/><blockquote type="cite"><div>Am 27.08.2024 um 21:14 schrieb <ken.dickey@whidbey.com> <ken.dickey@whidbey.com>:</div><br class="Apple-interchange-newline"/><div><div>On 2024-08-27 08:32, Bernhard Pieber via Cuis-dev wrote:<br/><br/><blockquote type="cite">Hi Ken,<br/><br/>I agree that the margin functionality could be introduced in a separate<br/>step.<br/><br/>Here is an example where a margin is useful, though:<br/><br/>The container has a gap of 30px and a padding of 0px. Only red has a<br/>margin of 8px in addition.<br/><br/>You can play around with the values here:<br/>https://codepen.io/bpieber/pen/PoraLjm<br/><br/>Note that only four morphs are needed, neither spacers nor wrappers.<br/><br/>Maybe margin could be emulated by a wrapper with transparent border<br/>color.<br/></blockquote><br/>Bernhard,<br/><br/>Thanks for the example. I am looking for something both explainable and<br/>easy to calculate. What is the simplest thing that will work?<br/><br/>I changed the green margin to 30px, result attached.<br/><br/>I would not have predicted this result and don't see how it would help<br/>me.<br/><br/>$0.02,<br/>-KenD<br/><span id="cid:27A1A42C-3878-4DEC-99B5-7A8097AF00EB"><PastedGraphic-1.png></span><span id="cid:A576DA50-4A27-4C6B-9961-86BF57F186F0"><Screenshot_2024-08-27_12-09-23.png></span><span id="cid:253B8F9F-94DF-4C77-B416-8D5A05D67632"><PastedGraphic-1.png></span></div></div></blockquote></div><br/></body></html>