You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: css-multicol-1/Overview.bs
+38Lines changed: 38 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -810,6 +810,43 @@ Spanning columns</h2>
810
810
</figure>
811
811
</div>
812
812
813
+
A spanning element may be lower than the first level of descendants as long as they are part of the same formatting context. If the fragment before the spanner is empty, nothing special happens; the top margin/border/padding is above the spanning element, as an empty fragment.
814
+
815
+
<div class="example">
816
+
In this example the multicol container is the article element. Inside this parent is a paragraph and then a section element. The section contains an h2 heading set to ''column-span/all'' this spans all three columns while the containing section remains inside the column boxes.
817
+
818
+
The h2 is the first child of the section. This means that the margin, border (shown in red in the diagram) and padding on this section appear before the spanning h2 as an empty fragment.
819
+
820
+
<pre highlight="markup">
821
+
<article>
822
+
<p>...</p>
823
+
<section>
824
+
<h2>An h2 element</h2>
825
+
<p>...</p>
826
+
</section>
827
+
</article>
828
+
</pre>
829
+
830
+
<pre highlight="css">
831
+
section {
832
+
border: 2px solid red;
833
+
margin-top: 3em;
834
+
padding-top: 2em;
835
+
}
836
+
837
+
h2 {
838
+
column-span: all;
839
+
background: silver
840
+
}
841
+
</pre>
842
+
843
+
<figure>
844
+
<img src="images/nested-spanner.svg" alt="An element spans all three columns, the red border around the section breaks before the spanner.">
845
+
<figcaption>The h2 element is set to column-span: all, the section has a red border and top padding and margin</figcaption>
846
+
</figure>
847
+
848
+
</div>
849
+
813
850
A spanning element takes up more space than the element would take
814
851
up otherwise. When space is limited, it may be impossible to find room
815
852
for the spanning element. In these cases, user agents may treat the
@@ -1173,6 +1210,7 @@ This appendix is <em>informative</em>.
1173
1210
<li>Replaced the HTML mock-up examples with SVG versions, as the examples were unclear. <a href="https://github.com/w3c/csswg-drafts/issues/1087">Issue 1087</a>.</li>
1174
1211
<li>Changed the value of normal for column-gap to be 1em, rather than a UA-specified length with a suggestion of 1em. <a href="https://github.com/w3c/csswg-drafts/issues/2145#issuecomment-378781507">Resolved: 4 Apr 2018</a></li>
1175
1212
<li>Clarified that negative values are not allowed for column-width, and that while 0 may be specified, used values will be clamped to a minimum of 1px. <a href="https://github.com/w3c/csswg-drafts/issues/1741#issuecomment-373091628">Resolved: 14 Mar 2018</a></li>
1213
+
<li>Added clarification plus an additional example that spanning elements may be lower the the first level of descendents, and that in the case of margins, borders and padding on the element containing the spanning, this would be drawn above the spanner. <a href="https://github.com/w3c/csswg-drafts/issues/1072#issuecomment-342668025">Resolved: 8 Nov 2017</a></li>
1176
1214
<li>Changed the sentence <em>Column rules are painted in the inline content layer, but below all inline content inside the multicol element.</em> to <em>Column rules are painted just above the border of the multicol element. For scrollable multicol elements, note that while the border and background of the multicol element obviously aren’t scrolled, the rules need to scroll along with the columns.</em><a href="https://github.com/w3c/csswg-drafts/issues/1739#issuecomment-342659978">Resolved: 7 Nov 2017</a></li>
1177
1215
<li>Under section The Multi-column Model, removed two sentences <em>That is, column boxes behave like block-level, table cell, and inline-block boxes as per CSS 2.1, section 10.1, item 2 CSS21. However, column boxes do not establish block container boxes for elements with ''position: fixed or position: absolute''.</em>. THese were replaced with a clarification about the principal box and a new example showing how abspos elements refer to the multicol container. <a href="https://github.com/w3c/csswg-drafts/issues/1738#issuecomment-342661881">Resolved: 7 Nov 2017</a></li>
1178
1216
<li>Removed the sentence "To indicate where column breaks should (or should not) appear, new keyword values are introduced." and following example (Example 7 in the WD published <a href="https://www.w3.org/TR/2017/WD-css-multicol-1-20171005/">5 Oct 2017</a>) as the multicol specification no longer introduces these properties. <a href="https://github.com/w3c/csswg-drafts/issues/1966">Editorial</a></li>
0 commit comments