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-gcpm/Overview.src.html
+76-28Lines changed: 76 additions & 28 deletions
Original file line number
Diff line number
Diff line change
@@ -84,13 +84,7 @@ <h2 class="no-num no-toc">Status of this document</h2>
84
84
85
85
<!--end-status-->
86
86
87
-
<p>This WD contains functionality that the CSS WG finds interesting
88
-
and useful. In general, the earlier a feature appears in this draft,
89
-
the more stable it is. Significant changes in functionality and syntax
90
-
must be expected from <ahref="#paged-presentations">paged
91
-
presentations</a> and onwards. Also, functionality described in this
92
-
module may be moved to other modules. Since the <ahref="http://www.w3.org/TR/2010/WD-css3-gcpm-20100608">previous WD</a>, hyphenation has been moved to <ahref="http://www.w3.org/TR/2011/WD-css3-text-20110901/#hyphenation">css3-text</a> and the <ahref="http://www.w3.org/TR/2010/WD-css3-gcpm-20100608/#the-super-decimal-list-style-type">super-decimal</a> list-style-type value has been moved to <ahref="http://www.w3.org/TR/2011/WD-css3-lists-20110524/#super-decimal">css3-lists</a>. <ahref="http://www.w3.org/TR/2010/WD-css3-gcpm-20100608/#named-counter-styles">Named counter styles</a> and the <ahref="http://www.w3.org/TR/2010/WD-css3-gcpm-20100608/#the-symbols-list-style-type">symbols()</a> list-style-type value should also appear in a future css3-lists WD.
93
-
87
+
<p>This WD contains functionality that the CSS WG finds interesting and useful. In general, the earlier a feature appears in this draft, the more stable it is. Significant changes in functionality and syntax must be expected from <ahref="#paged-presentations">paged presentations</a> and onwards. Also, functionality described in this module may be moved to other modules. Since the <ahref="http://www.w3.org/TR/2010/WD-css3-gcpm-20100608">previous WD</a>, hyphenation has been moved to <ahref="http://www.w3.org/TR/2011/WD-css3-text-20110901/#hyphenation">css3-text</a> and the <ahref="http://www.w3.org/TR/2010/WD-css3-gcpm-20100608/#the-super-decimal-list-style-type">super-decimal</a> list-style-type value has been moved to <ahref="http://www.w3.org/TR/2011/WD-css3-lists-20110524/#super-decimal">css3-lists</a>. <ahref="http://www.w3.org/TR/2010/WD-css3-gcpm-20100608/#named-counter-styles">Named counter styles</a> and the <ahref="http://www.w3.org/TR/2010/WD-css3-gcpm-20100608/#the-symbols-list-style-type">symbols()</a> list-style-type value should also appear in a future css3-lists WD.
94
88
95
89
<h2class="no-num no-toc"><aname="contents">Table of contents</a></h2>
96
90
@@ -2732,53 +2726,90 @@ <h3>Floating to the top/bottom: top, bottom, snap</h3>
2732
2726
</div>
2733
2727
2734
2728
<divclass=example>
2735
-
<p>Float figure to top of the natural column, spanning all columns:
2729
+
<p>In this example, a figure naturally appears close to a column break. There is not enough space for the figure in the first column, and it is therefore placed in the second column, leaving white space at the bottom of the first column.</p>
2730
+
2731
+
<imgalt="sample rendering" src=23.png>
2732
+
2733
+
<p>To avoid the white space, the image can be floated to the nearest edge (in the block direction):</p>
2734
+
2736
2735
<pre>
2737
-
.figure { float: top; column-span: all }
2736
+
.figure { float: snap }
2738
2737
</pre>
2739
2738
2740
-
<imgalt="sample redering" src=15.png>
2739
+
<p>In this example, the figure is already at the nearest edge, so it does not move. However, page floats allow subsequent content to be displayed before the page float and the white space can therefore be filled:</p>
2741
2740
2741
+
<imgalt="sample rendering" src=7.png>
2742
2742
</div>
2743
2743
2744
2744
<divclass=example>
2745
-
<p>In this example, tables will snap to the top/bottom if the top/bottom of the border box is closer than '3em' from the top/bottom of the page/column.
2745
+
2746
+
<p>In this example, two figures naturally appear in the text flow:</p>
2747
+
2748
+
<imgalt="sample rendering" src=20.png>
2749
+
2750
+
<p>A typographer would typically try to avoid single lines of text above/below figures, which can be achieved with:
2746
2751
2747
2752
<pre>
2748
-
table { float: snap }
2749
-
table { float: snap(3em) }
2750
-
table { float: snap(3em, bottom) }
2751
-
table { float: snap(3em 2em, bottom) }
2753
+
div.figure { float: snap(1.5em) }
2752
2754
</pre>
2755
+
2756
+
<p>The length value specifies the reach of the snap function; in this example the second figure is affected, but not the first.
2753
2757
</div>
2754
2758
2759
+
<divclass=example>
2755
2760
2756
-
<pclass=issue>Do numeric values, to represent line numbers, make sense, like for orphans/widows?
2761
+
<p>In this example, two figures naturally appear in the text flow:</p>
2757
2762
2763
+
<imgalt="sample rendering" src=20.png>
2758
2764
2759
-
<h3>Spanning columns</h3>
2765
+
<p>To make the figures snap to the nearest edges, this code can be applied:
2766
+
2767
+
<pre>
2768
+
div.figure { float: snap(2.5em) }
2769
+
</pre>
2770
+
2771
+
<p>The resultant rendering is:</p>
2772
+
2773
+
<imgalt="sample rendering" src=22.png>
2774
+
2775
+
</div>
2760
2776
2761
-
<p>The 'column-span' property is extended with integer values so that elements can span several columns. If the specified integer value is equal to, or larger than the number of columns in the multicol element, the number of columns spanned will be the same as if 'column-span: all' had been specified.
2762
2777
2763
2778
2764
2779
<divclass=example>
2765
-
<p>Float figure to top of the last column of the multicol element on the current page:
2780
+
2781
+
<p>Float figure to top of the natural column, spanning all columns:
2782
+
2766
2783
<pre>
2767
-
.figure { float: top; float-defer-column: last }
2784
+
.figure { float: top; column-span: all }
2768
2785
</pre>
2769
-
<imgalt="sample rendering" src=6.png>
2786
+
2787
+
<imgalt="sample redering" src=15.png>
2788
+
2770
2789
</div>
2771
2790
2772
2791
2773
2792
<divclass=example>
2774
-
<p>In combination with 'column-span', the figure is floated to the top corner of the multicol element on that page:
2793
+
<p>In this example, tables will snap to the top/bottom if the top/bottom of the border box is closer than '3em' from the top/bottom of the page/column.
<pclass=issue>Do numeric values, to represent line numbers, make sense, like for orphans/widows?
2805
+
2806
+
2807
+
<h3>Spanning columns</h3>
2808
+
2809
+
<p>The 'column-span' property is extended with integer values so that elements can span several columns. If the specified integer value is equal to, or larger than the number of columns in the multicol element, the number of columns spanned will be the same as if 'column-span: all' had been specified.
2810
+
2811
+
2812
+
2782
2813
<divclass=example>
2783
2814
<p>In this example, a commonly used newspaper layout is easily described:
<dd>A positive integer value indicates that the page float should be displayed in a following column/page.
2896
+
<dd>A positive integer value indicates that the page float should be displayed in a following column/page. A negative integer value indicates that the page float should be displayed in a following column/page, counted from the last column/page. When counting columns, the starting point is the last column of the multicol element on the natural page. When counting pages, the starting point is the last page of the multicol element.
2897
+
2898
+
</dl>
2899
+
2866
2900
2867
2901
<divclass=example>
2868
2902
<p>Float figure to the top of the column that follows the natural column:
@@ -2873,8 +2907,6 @@ <h4>'float-defer-page'</h4>
2873
2907
</pre>
2874
2908
</div>
2875
2909
2876
-
<dd>A negative integer value indicates that the page float should be displayed in a following column/page, counted from the last column/page. When counting columns, the starting point is the last column of the multicol element on the natural page. When counting pages, the starting point is the last page of the multicol element.
2877
-
2878
2910
<divclass=example>
2879
2911
<p>Float figure to the top of the next-to-last column:
0 commit comments