Skip to content

Commit 0a68a56

Browse files
committed
revising snap()
1 parent 8c00c97 commit 0a68a56

1 file changed

Lines changed: 59 additions & 26 deletions

File tree

css3-gcpm/Overview.src.html

Lines changed: 59 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ <h4>Setting named strings: the 'string-set' property</h4>
255255
<p>The name space of named strings is different from other sets of
256256
names in CSS.
257257

258-
<p>The 'string-set' property copies text as well as white-space into
259-
the named string.
258+
<p>The textual content is processed as if 'white-space: normal' had been set.
259+
260260

261261
<div class="example">
262262
<pre>
@@ -2094,13 +2094,13 @@ <h2>Page marks and bleed area</h2>
20942094

20952095

20962096

2097-
<h2>Bookmarks</h2>
2097+
<h2>Bookmarks: 'bookmark-level', </h2>
20982098

20992099
<p>Some document formats have the capability of holding bookmarks.
2100-
Bookmarks are typically shown outside the document itself, often a
2101-
tree-structured and clickable table of contents to help navigate in
2102-
the electronic version of the document. To generate bookmarks, these
2103-
properties are defined:
2100+
Bookmarks are typically shown outside the document itself, often in a
2101+
tree-structured and clickable table of contents. To generate
2102+
bookmarks, these properties are defined: 'bookmark-level',
2103+
'bookmark-label', and 'bookmark-state'.
21042104

21052105
<table class=propdef>
21062106
<tr>
@@ -2129,9 +2129,22 @@ <h2>Bookmarks</h2>
21292129
<td>specified value
21302130
</table>
21312131

2132+
21322133
<p>This property describes what level a certain bookmark has in a
2133-
hierarchical bookmark structure. The highest level is ''1'', then
2134-
''2'', ''3'' etc.
2134+
hierarchical bookmark structure. The values are:
2135+
2136+
<dl>
2137+
2138+
<dt>none
2139+
2140+
<dd>no bookmark is generated
2141+
2142+
<dt>&lt;integer>
2143+
2144+
<dd>Indicates the level of the bookmark; the highest level is ''1'', then ''2'', ''3'' etc. A bookmark will be generated only if 'bookmark-label' also has a value different from 'none'.
2145+
2146+
</dl>
2147+
21352148

21362149
<div class="example">
21372150
<pre>
@@ -2148,7 +2161,7 @@ <h2>Bookmarks</h2>
21482161
<td><dfn>bookmark-label</dfn>
21492162
<tr>
21502163
<td><em>Value:</em>
2151-
<td>[ &lt;content-list> ]+ | none
2164+
<td>&lt;content-list> | none
21522165
<tr>
21532166
<td><em>Initial:</em>
21542167
<td>none
@@ -2169,7 +2182,18 @@ <h2>Bookmarks</h2>
21692182
<td>specified value
21702183
</table>
21712184

2172-
<p>This property specifies the label of the bookmark, i.e., the text that will represent the bookmark in the bookmark structure. &lt;content-list> is defined on the 'string-set' property.
2185+
<p>This property specifies the label of the bookmark, i.e., the text that will represent the bookmark in the bookmark structure. The values are:
2186+
2187+
<dl>
2188+
2189+
<dt>&lt;content-list>, as defined on the 'string-set' property. A bookmark will be generated only if 'bookmark-level' also has a value different from 'none'.
2190+
2191+
<dt>none
2192+
2193+
<dd>no bookmark is generated
2194+
2195+
</dl>
2196+
21732197

21742198
<div class="example">
21752199
<pre>
@@ -2181,6 +2205,8 @@ <h2>Bookmarks</h2>
21812205
</pre>
21822206
</div>
21832207

2208+
<!--
2209+
21842210
<table class=propdef>
21852211
<tr>
21862212
<td><em>Name:</em>
@@ -2225,6 +2251,7 @@ <h2>Bookmarks</h2>
22252251
.example { bookmark-target: url(http://www.example.com) }
22262252
</div>
22272253
2254+
-->
22282255

22292256
<table class=propdef>
22302257
<tr>
@@ -2569,37 +2596,43 @@ <h2>Page and column floats</h2>
25692596
<dt>bottom-corner
25702597
<dd>similar to 'top-corner', exept the box is floated to the bottom
25712598

2572-
<dt>snap(&lt;length>)
2599+
<dt>snap(&lt;length>, [top | bottom])
25732600

25742601
<dd>same as 'top' if the box is naturally near the top; same as
25752602
'bottom' if the box is naturally near the bottom. If the box naturally
25762603
leads to a (page/column) break, the box is floated to the top of the
2577-
next page/column. The length value specifies how far from the
2578-
top/bottom the element can be influenced.
2604+
next page/column. The first optionaloptional length value specifies how far from the
2605+
top/bottom the element can be influenced, The second
25792606

2580-
<div class=example>
2581-
<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.
2607+
<dt>snap(&lt;length> &lt;length>? [, top | bottom | near ]?)
25822608

2583-
<pre>
2584-
table { float: snap(3em) }
2585-
</pre>
2586-
</div>
2609+
<dd>Makes the element float to the top or bottom if it naturally appears within a certain distance from the top or bottom. The length value(s) specifies the maxium distance from the top/bottom that an element must be within in order to be floated; one length value specifies the distance from both the top and the bottom, two length values specify the distance from the top and bottom, respectively. If an element is within the specified distance from both the top and the bottom, bottom wins.
2610+
2611+
<p>The optional keyword value specifies where the element is floated: top, bottom, or the nearest of the two. The initial value is 'near'.
2612+
2613+
<dt>snap
2614+
2615+
<dd>same as <tt>snap(2em, near)</tt>
2616+
2617+
</dl>
25872618

2588-
<p>If the functional notation is not used, an implementation-dependent value is used.
25892619

25902620
<div class=example>
2621+
<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.
2622+
25912623
<pre>
25922624
table { float: snap }
2625+
table { float: snap(3em) }
2626+
table { float: snap(3em, bottom) }
2627+
table { float: snap(3em 2em, bottom) }
25932628
</pre>
25942629
</div>
25952630

25962631
<p class=issue>Should we define a reasonable default (say, 3em) instead of relying on implementation-specific values?
2597-
<p class=issue>Do numberic values make sense, like for orphans/widows
2598-
<p class=issue>Does the "snap" solution address all use cases for "unless-room"/"unless-fit"?
2632+
<p class=issue>Do numberic values (in addition to length values) make sense, like for orphans/widows
2633+
<p class=issue>is an element with a snap() value considered to be a float? only when it really floats, or always?
25992634

26002635

2601-
</dl>
2602-
26032636
<!--
26042637
The 'widows'/'orphans' properties may be consulted to determine if the box is near the top/bottom.
26052638
-->
@@ -3623,7 +3656,7 @@ <h2 class=no-num id=acknowledgments>Acknowledgments</h2>
36233656
Miller, Werner Donn&eacute;, Tarquin (Mark) Wilton-Jones, Michel Fortin,
36243657
Christian Roth, Brady Duga, Del Merritt, Ladd Van Tol, Tab Atkins Jr.,
36253658
Jacob Grundtvig Refstrup, James Elmore, Ian Tindale, Murakami Shinyu, Paul E.
3626-
Merrell, Philip Taylor, Brad Kemper, Peter Linss, Daniel Glazman, Tantek &#xC7;elik, Florian Rivoal, Alex Mogilevsky.</p>
3659+
Merrell, Philip Taylor, Brad Kemper, Peter Linss, Daniel Glazman, Tantek &#xC7;elik, Florian Rivoal, Alex Mogilevsky, Simon Sapin, Cameron McCormack, Liam R E Quin, Werner Donné, Peter Moulder.</p>
36273660

36283661
<h2 class=no-num id=references>References</h2>
36293662

0 commit comments

Comments
 (0)