[css-regions] margin of first paragrah of a region

Issue of the day: inter-paragraph margin.

Let's pretend I was trying to port over this "manual-region" code to [css-regions]:

  <div class="region">
   Abc...<BR>
   <figure>...</figure>
   Def...<BR>
  </div>
  
  <div class="region">
   <figure>...</figure>
   Ghi...<BR>
   Jkl...<BR>
  </div>
  

  p { margin: 10px }
  figure { margin: 30px; }

  .region {padding:5px}
  .region> :first-child { margin-top: 0px; }

How can I get this special effect that the first-paragraph in each region do not get pushed down by ther inter-paragraph margin?

My current trick has been to put all the margin on the bottom of paragraphs (which is probably how things should be in this case) but it cannot possibly work if I've a <figure> sibling to my paragraphs which requires a 30px on both top and bottom (but still 0px top margin as first visual child of a box, ie: the margin collapses in the inter-region world).

Any suggestion?
François 		 	   		  

Received on Friday, 16 August 2013 21:20:58 UTC