display_block_inside_inline.rml 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. <rml>
  2. <head>
  3. <title>CSS Display: Block box within inline</title>
  4. <link type="text/rcss" href="../style.rcss"/>
  5. <link rel="help" href="https://drafts.csswg.org/css2/#box-gen" />
  6. <meta name="description" content='"When an inline box contains an in-flow block-level box, the inline box (and its inline ancestors within the same line box) is broken around the block-level box (and any block-level siblings that are consecutive or separated only by collapsible whitespace and/or out-of-flow elements), splitting the inline box into two boxes (even if either side is empty), one on each side of the block-level box(es). The line boxes before the break and after the break are enclosed in anonymous block boxes, and the block-level box becomes a sibling of those anonymous boxes. When such an inline box is affected by relative positioning, any resulting translation also affects the block-level box contained in the inline box."' />
  7. <style>
  8. </style>
  9. </head>
  10. <body rmlui-debug-layout>
  11. <span id="wrap">
  12. <span id="a">
  13. <div id="block">Y</div>
  14. </span>
  15. <span id="b">Z</span>
  16. </span>
  17. <!--
  18. <span id="span">
  19. A
  20. <div id="div">B</div>
  21. C
  22. </span>
  23. <span id="span" style="text-align: center; border: 1px #000; background: #f00;">
  24. A<br/>B
  25. <div id="div">C LONG</div>
  26. D
  27. </span>
  28. <span id="wrap">
  29. <span id="a">
  30. <span id="block">Y</span>
  31. </span>
  32. <span id="b">Z</span>
  33. </span>
  34. <span id="wrap">
  35. This is anonymous text before the SPAN.
  36. <p id="p">This is the content of SPAN.</p>
  37. This is anonymous text after the SPAN.
  38. </span>
  39. <div id="outer">A<span id="inner">B</span>C</div>
  40. -->
  41. </body>
  42. </rml>