css3-overflow/Overview.src.html

Mon, 25 Mar 2013 16:22:51 -0700

author
L. David Baron <[email protected]>
date
Mon, 25 Mar 2013 16:22:51 -0700
changeset 7813
2945b61850d0
parent 7812
d7ddd11519d1
child 7814
cbf03a5f6dba
permissions
-rw-r--r--

[css3-overflow] Note one issue that needs to be reworded for overflow-x and overflow-y, and specify that setting of display/position/float can't change display-inside between fragments.

dbaron@6470 1 <!DOCTYPE html>
dbaron@6470 2 <html lang="en">
dbaron@6470 3 <head>
dbaron@6470 4 <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
dbaron@6483 5 <title>CSS Overflow Module Level 3</title>
dbaron@6470 6 <link rel=contents href="#contents">
dbaron@6470 7 <link rel=index href="#index">
dbaron@6470 8 <link rel="stylesheet" type="text/css" href="../default.css">
dbaron@6470 9 <link rel="stylesheet" type="text/css"
dbaron@6470 10 href="http://www.w3.org/StyleSheets/TR/W3C-[STATUS].css">
dbaron@6475 11 <style>
dbaron@6477 12 table.source-demo-pair {
dbaron@6477 13 width: 100%;
dbaron@6477 14 }
dbaron@6481 15
dbaron@6475 16 .in-cards-demo {
dbaron@6475 17 width: 13em;
dbaron@6475 18 height: 8em;
dbaron@6475 19
dbaron@6475 20 padding: 4px;
dbaron@6475 21 border: medium solid blue;
dbaron@6475 22 margin: 6px;
dbaron@6475 23
dbaron@6475 24 font: medium/1.3 Times New Roman, Times, serif;
dbaron@6475 25 white-space: nowrap;
dbaron@6475 26 }
dbaron@6481 27
dbaron@6477 28 .bouncy-columns-demo {
dbaron@6477 29 width: 6em;
dbaron@6477 30 height: 10em;
dbaron@6477 31 float: left;
dbaron@6477 32 margin: 1em;
dbaron@6477 33 font: medium/1.25 Times New Roman, Times, serif;
dbaron@6477 34 white-space: nowrap;
dbaron@6477 35 }
dbaron@6477 36 .bouncy-columns-demo.one {
dbaron@6477 37 background: aqua; color: black;
dbaron@6477 38 transform: rotate(-3deg);
dbaron@6477 39 }
dbaron@6477 40 .bouncy-columns-demo.two {
dbaron@6477 41 background: yellow; color: black;
dbaron@6477 42 transform: rotate(3deg);
dbaron@6477 43 }
dbaron@6479 44
dbaron@6480 45 .article-font-inherit-demo {
dbaron@6480 46 font: 1em/1.25 Times New Roman, Times, serif;
dbaron@6480 47 white-space: nowrap;
dbaron@6480 48 }
dbaron@6480 49 .article-font-inherit-demo.one {
dbaron@6480 50 width: 12em;
dbaron@6480 51 font-size: 1.5em;
dbaron@6480 52 margin-bottom: 1em;
dbaron@6480 53 height: 4em;
dbaron@6480 54 }
dbaron@6480 55 .article-font-inherit-demo.two {
dbaron@6480 56 width: 11em;
dbaron@6480 57 margin-left: 5em;
dbaron@6480 58 margin-right: 2em;
dbaron@6480 59 }
dbaron@6480 60
dbaron@6481 61 .dark-columns-demo {
dbaron@6481 62 width: 6em;
dbaron@6481 63 height: 10em;
dbaron@6481 64 float: left;
dbaron@6481 65 margin-right: 1em;
dbaron@6481 66 font: medium/1.25 Times New Roman, Times, serif;
dbaron@6481 67 white-space: nowrap;
dbaron@6481 68 }
dbaron@6481 69 .dark-columns-demo.one {
dbaron@6481 70 background: aqua; color: black;
dbaron@6481 71 }
dbaron@6481 72 .dark-columns-demo.one :link {
dbaron@6481 73 color: blue;
dbaron@6481 74 }
dbaron@6481 75 .dark-columns-demo.one :visited {
dbaron@6481 76 color: purple;
dbaron@6481 77 }
dbaron@6481 78 .dark-columns-demo.two {
dbaron@6481 79 background: navy; color: white;
dbaron@6481 80 }
dbaron@6481 81 .dark-columns-demo.two :link {
dbaron@6481 82 color: aqua;
dbaron@6481 83 }
dbaron@6481 84 .dark-columns-demo.two :visited {
dbaron@6481 85 color: fuchsia;
dbaron@6481 86 }
dbaron@6481 87
dbaron@6479 88 .article-max-lines-demo {
dbaron@6479 89 font: 1em/1.25 Times New Roman, Times, serif;
dbaron@6479 90 white-space: nowrap;
dbaron@6479 91 }
dbaron@6479 92 .article-max-lines-demo.one::first-letter {
dbaron@6479 93 font-size: 2em;
dbaron@6479 94 line-height: 0.9;
dbaron@6479 95 }
dbaron@6479 96 .article-max-lines-demo.one {
dbaron@6479 97 font-size: 1.5em;
dbaron@6479 98 width: 16em;
dbaron@6479 99 }
dbaron@6479 100 .article-max-lines-demo.two {
dbaron@6479 101 width: 11.5em;
dbaron@6479 102 float: left; margin-right: 1em;
dbaron@6479 103 }
dbaron@6479 104 .article-max-lines-demo.three {
dbaron@6479 105 width: 11.5em;
dbaron@6479 106 float: left;
dbaron@6479 107 }
dbaron@6475 108 </style>
dbaron@6470 109 </head>
dbaron@6470 110
dbaron@6470 111 <div class="head">
dbaron@6470 112 <!--logo-->
dbaron@6470 113
dbaron@6483 114 <h1>CSS Overflow Module Level 3</h1>
dbaron@6470 115
dbaron@6470 116 <h2 class="no-num no-toc">[LONGSTATUS] [DATE]</h2>
dbaron@6470 117 <dl>
dbaron@6470 118 <dt>This version:
dbaron@7461 119 <dd><a href="[VERSION]">[VERSION]</a>
dbaron@6470 120
dbaron@6470 121 <dt>Latest version:
dbaron@7461 122 <dd><a href="http://www.w3.org/TR/css3-overflow/">http://www.w3.org/TR/css3-overflow/</a>
dbaron@6470 123
dbaron@6470 124 <dt>Editor's draft:
dbaron@6470 125 <dd><a href="http://dev.w3.org/csswg/[SHORTNAME]/">http://dev.w3.org/csswg/[SHORTNAME]/</a>
dbaron@7461 126 (<a href="https://dvcs.w3.org/hg/csswg/log/tip/[SHORTNAME]/Overview.src.html">change log</a>)
dbaron@6470 127
dbaron@6470 128 <dt>Previous version:
dbaron@7460 129 <dd>none
dbaron@6470 130
dbaron@7809 131 <dt>Editors:
dbaron@7809 132 <dd class="h-card vcard">
dbaron@7809 133 <a class="p-name fn u-url url" rel="author"
dbaron@7809 134 href="http://dbaron.org/">L. David Baron</a>,
dbaron@7809 135 <a class="p-org org" href="http://www.mozilla.org/">Mozilla</a>
dbaron@7809 136
dbaron@6470 137 <dt>Issue Tracking:</dt>
dbaron@6470 138 <dd>Maintained in document (only editor's draft is current)
dbaron@6470 139
dbaron@6470 140 <dt>Feedback:</dt>
dbaron@6470 141 <dd><a href="http://lists.w3.org/Archives/Public/www-style/">[email protected]</a> with subject line &ldquo;<kbd>[[SHORTNAME]] <var>&hellip; message topic &hellip;</var></kbd>&rdquo;
dbaron@6470 142
dbaron@7809 143 <dt>Test suite:
dbaron@7809 144 <dd>none yet
dbaron@6470 145 </dl>
dbaron@6470 146
dbaron@6470 147 <!--copyright-->
dbaron@6470 148
dbaron@6470 149 <hr title="Separator for header">
dbaron@6470 150 </div>
dbaron@6470 151
dbaron@6470 152 <h2 class="no-num no-toc" id="abstract">Abstract</h2>
dbaron@6470 153
dbaron@6470 154 <p>
dbaron@6470 155 <a href="http://www.w3.org/TR/CSS/">CSS</a> is
dbaron@6470 156 a language for describing
dbaron@6470 157 the rendering of structured documents (such as HTML and XML)
dbaron@6470 158 on screen, on paper, in speech, etc.
dbaron@6470 159 This module contains the features of CSS
dbaron@6470 160 relating to new mechanisms of overflow handling in visual media (e.g., screen or paper).
dbaron@6470 161 In interactive media,
dbaron@6470 162 it describes features that allow the overflow
dbaron@6470 163 from a fixed size container
dbaron@6470 164 to be handled by pagination (displaying one page at a time).
dbaron@6470 165 It also describes features, applying to all visual media,
dbaron@6470 166 that allow the contents of an element
dbaron@6484 167 to be spread across multiple fragments,
dbaron@6484 168 allowing the contents to flow across multiple regions
dbaron@6484 169 or to have different styles for different fragments.
dbaron@6470 170 </p>
dbaron@6470 171
dbaron@6470 172 <h2 class="no-num no-toc" id="status">Status of this document</h2>
dbaron@6470 173
dbaron@6470 174 <!--status-->
dbaron@6470 175
dbaron@6470 176 <p>The following features are at risk: &hellip;
dbaron@6470 177
dbaron@6470 178 <h2 class="no-num no-toc" id="contents">
dbaron@6470 179 Table of contents</h2>
dbaron@6470 180
dbaron@6470 181 <!--toc-->
dbaron@6470 182
dbaron@6470 183 <h2 id="intro">
dbaron@6470 184 Introduction</h2>
dbaron@6470 185
dbaron@6470 186 <p>
dbaron@6470 187 In CSS Level 1 [[CSS1]], placing more content than would fit
dbaron@6470 188 inside an element with a specified size
dbaron@6470 189 was generally an authoring error.
dbaron@6470 190 Doing so caused the content to extend
dbaron@6470 191 outside the bounds of the element,
dbaron@6470 192 which would likely cause
dbaron@6470 193 that content to overlap with other elements.
dbaron@6470 194 </p>
dbaron@6470 195
dbaron@6470 196 <p>
dbaron@6470 197 CSS Level 2 [[CSS21]] introduced the 'overflow' property,
dbaron@6470 198 which allows authors to have overflow be handled by scrolling,
dbaron@6470 199 which means it is no longer an authoring error.
dbaron@6470 200 It also allows authors to specify
dbaron@6470 201 that overflow is handled by clipping,
dbaron@6470 202 which makes sense when the author's intent
dbaron@6470 203 is that the content not be shown.
dbaron@6470 204 </p>
dbaron@6470 205
dbaron@6470 206 <p>
dbaron@6470 207 However, scrolling is not the only way
dbaron@6470 208 to present large amounts of content,
dbaron@6470 209 and may even not be the optimal way.
dbaron@6470 210 After all, the codex replaced the scroll
dbaron@6470 211 as the common format for large written works
dbaron@6470 212 because of its advantages.
dbaron@6470 213 </p>
dbaron@6470 214
dbaron@6470 215 <p>
dbaron@6470 216 This specification introduces
dbaron@6470 217 a mechanism for Web pages to specify
dbaron@6484 218 that an element of a page should handle overflow
dbaron@6470 219 through pagination rather than through scrolling.
dbaron@6470 220 </p>
dbaron@6470 221
dbaron@6470 222 <p>
dbaron@6470 223 This specification also extends the concept of overflow
dbaron@6470 224 in another direction.
dbaron@6484 225 Instead of requiring that authors specify a single area
dbaron@6470 226 into which the content of an element must flow,
dbaron@6484 227 this specification allows authors to specify multiple fragments,
dbaron@6470 228 each with their own dimensions and styles,
dbaron@6470 229 so that the content of the element can flow from one to the next,
dbaron@6470 230 using as many as needed to place the content without overflowing.
dbaron@6470 231 </p>
dbaron@6470 232
dbaron@6470 233 <p>
dbaron@6470 234 In both of these cases, implementations must
dbaron@6470 235 break the content in the block-progression dimension.
dbaron@6470 236 Implementations must do this is described
dbaron@6470 237 in the CSS Fragmentation Module [[!CSS3-BREAK]].
dbaron@6470 238 </p>
dbaron@6470 239
dbaron@7811 240 <h2 id="overflow-properties">Overflow properties</h2>
dbaron@7811 241
dbaron@7811 242 <table class=propdef>
dbaron@7811 243 <tr>
dbaron@7811 244 <th>Name:
dbaron@7811 245 <td><dfn>overflow-x</dfn>, <dfn>overflow-y</dfn>
dbaron@7811 246 <tr>
dbaron@7811 247 <th><a href="#values">Value</a>:
dbaron@7811 248 <td>visible | hidden | scroll | auto | paged-x | paged-y | paged-x-controls | paged-y-controls | fragments
dbaron@7811 249 <tr>
dbaron@7811 250 <th>Initial:
dbaron@7811 251 <td>visible
dbaron@7811 252 <tr>
dbaron@7811 253 <th>Applies to:
dbaron@7812 254 <td>block containers [[!CSS21]] and flex containers [[!CSS3-FLEXBOX]]
dbaron@7811 255 <tr>
dbaron@7811 256 <th>Inherited:
dbaron@7811 257 <td>no
dbaron@7811 258 <tr>
dbaron@7811 259 <th>Percentages:
dbaron@7811 260 <td>N/A
dbaron@7811 261 <tr>
dbaron@7811 262 <th>Media:
dbaron@7811 263 <td>visual
dbaron@7811 264 <tr>
dbaron@7811 265 <th>Computed&nbsp;value:
dbaron@7811 266 <td>see below
dbaron@7811 267 <tr>
dbaron@7811 268 <th>Animatable:
dbaron@7811 269 <td>no
dbaron@7811 270 <tr>
dbaron@7811 271 <th>Canonical order:
dbaron@7811 272 <td><abbr title="follows order of property value definition">per grammar</abbr>
dbaron@7811 273 </table>
dbaron@7811 274
dbaron@7811 275 <table class=propdef>
dbaron@7811 276 <tr>
dbaron@7811 277 <th>Name:
dbaron@7811 278 <td><dfn>overflow</dfn>
dbaron@7811 279 <tr>
dbaron@7811 280 <th><a href="#values">Value</a>:
dbaron@7811 281 <td>visible | hidden | scroll | auto | paged-x | paged-y | paged-x-controls | paged-y-controls | fragments
dbaron@7811 282 <tr>
dbaron@7811 283 <th>Initial:
dbaron@7811 284 <td>see individual properties
dbaron@7811 285 <tr>
dbaron@7811 286 <th>Applies to:
dbaron@7811 287 <td>block containers
dbaron@7811 288 <tr>
dbaron@7811 289 <th>Inherited:
dbaron@7811 290 <td>no
dbaron@7811 291 <tr>
dbaron@7811 292 <th>Percentages:
dbaron@7811 293 <td>N/A
dbaron@7811 294 <tr>
dbaron@7811 295 <th>Media:
dbaron@7811 296 <td>visual
dbaron@7811 297 <tr>
dbaron@7811 298 <th>Computed&nbsp;value:
dbaron@7811 299 <td>see individual properties
dbaron@7811 300 <tr>
dbaron@7811 301 <th>Animatable:
dbaron@7811 302 <td>no
dbaron@7811 303 <tr>
dbaron@7811 304 <th>Canonical order:
dbaron@7811 305 <td><abbr title="follows order of property value definition">per grammar</abbr>
dbaron@7811 306 </table>
dbaron@7811 307
dbaron@7811 308 <p>The values of these properties are:</p>
dbaron@7811 309
dbaron@7811 310 <dl>
dbaron@7811 311 <dt><dfn>visible</dfn>
dbaron@7811 312 <dd>
dbaron@7811 313 There is no special handling of overflow, that is, it
dbaron@7811 314 may be rendered outside the block container.
dbaron@7811 315 </dd>
dbaron@7811 316 <dt><dfn>hidden</dfn>
dbaron@7811 317 <dt><dfn>scroll</dfn>
dbaron@7811 318 <dt><dfn>auto</dfn>
dbaron@7811 319 <dd>
dbaron@7811 320 These values are collectively the <dfn>scrolling values</dfn>;
dbaron@7811 321 they are defined in the section on
dbaron@7811 322 <a href="#scrolling-overflow">scrolling and hidden overflow</a>.
dbaron@7811 323 </dd>
dbaron@7811 324 <dt><dfn>paged-x</dfn>
dbaron@7811 325 <dt><dfn>paged-y</dfn>
dbaron@7811 326 <dt><dfn>paged-x-controls</dfn>
dbaron@7811 327 <dt><dfn>paged-y-controls</dfn>
dbaron@7811 328 <dt><dfn>fragments</dfn>
dbaron@7811 329 <dd>
dbaron@7811 330 These values are collectively the <dfn>fragmenting values</dfn>;
dbaron@7811 331 they are defined in the sections on
dbaron@7811 332 <a href="#paginated-overflow">paginated overflow</a> and
dbaron@7811 333 <a href="#fragment-overflow">fragment overflow</a>.
dbaron@7811 334 </dd>
dbaron@7811 335 </dl>
dbaron@7811 336
dbaron@7811 337 <p>
dbaron@7811 338 The 'overflow' property is a shorthand property
dbaron@7811 339 that sets the specified values of both 'overflow-x' and 'overflow-y'
dbaron@7811 340 to the value specified for 'overflow'.
dbaron@7811 341 </p>
dbaron@7811 342
dbaron@7811 343 <div id="overflow-computed-values">
dbaron@7811 344 <p>The computed values of 'overflow-x' and 'overflow-y'
dbaron@7811 345 are determined from the cascaded values [[!CSS3CASCADE]]
dbaron@7811 346 based on the following rules:</p>
dbaron@7811 347
dbaron@7811 348 <ol>
dbaron@7811 349 <li>
dbaron@7811 350 If one or both of the cascaded values are
dbaron@7811 351 <i>fragmenting values</i>, then:
dbaron@7811 352 <ol>
dbaron@7811 353 <li>
dbaron@7811 354 If one of the cascaded values is one of the
dbaron@7811 355 <i>fragmenting values</i>
dbaron@7811 356 and the other is not,
dbaron@7811 357 then the computed values are
dbaron@7811 358 the same as the cascaded values.
dbaron@7811 359 </li>
dbaron@7811 360 <li>
dbaron@7811 361 If both of the cascaded values are <i>fragmenting values</i>, then:
dbaron@7811 362 <ol>
dbaron@7811 363 <li>
dbaron@7811 364 for horizontal writing mode [[!CSS3-WRITING-MODES]],
dbaron@7811 365 the computed value for ''overflow-y'' is the cascaded value
dbaron@7811 366 and the computed value for ''overflow-x'' is ''hidden'', or
dbaron@7811 367 </li>
dbaron@7811 368 <li>
dbaron@7811 369 for vertical writing mode [[!CSS3-WRITING-MODES]],
dbaron@7811 370 the computed value for ''overflow-x'' is the cascaded value
dbaron@7811 371 and the computed value for ''overflow-y'' is ''hidden''.
dbaron@7811 372 </li>
dbaron@7811 373 </ol>
dbaron@7811 374 </li>
dbaron@7811 375 </ol>
dbaron@7811 376 </li>
dbaron@7811 377 <li>
dbaron@7811 378 Otherwise, if one cascaded values is
dbaron@7811 379 one of the <i>scrolling values</i>
dbaron@7811 380 and the other is ''visible'',
dbaron@7811 381 then computed values are the cascaded values
dbaron@7811 382 with ''visible'' changed to ''hidden''.
dbaron@7811 383 </li>
dbaron@7811 384 <li>
dbaron@7811 385 Otherwise, the computed values are as specified.
dbaron@7811 386 </li>
dbaron@7811 387 </ol>
dbaron@7811 388 </div>
dbaron@7811 389
dbaron@7811 390 <p class="issue">
dbaron@7811 391 Are all 4 of the ''paged-*'' values really needed?
dbaron@7811 392 </p>
dbaron@7811 393
dbaron@7811 394 <p>
dbaron@7811 395 When the <i>fragmenting values</i> are used,
dbaron@7811 396 the overflow from the fragments themselves
dbaron@7811 397 treats the fragmenting value as ''hidden''.
dbaron@7811 398 <span class="issue">Is this the right behavior?</span>
dbaron@7811 399 <span class="issue">Give example.</span>
dbaron@7811 400 </p>
dbaron@7811 401
dbaron@6483 402 <h2 id="scrolling-overflow">Scrolling and hidden overflow</h2>
dbaron@6483 403
dbaron@6483 404 <p class="issue">
dbaron@6483 405 Move material from [[CSS21]] and [[CSS3BOX]] here.
dbaron@6483 406 </p>
dbaron@6470 407
dbaron@6470 408 <h2 id="paginated-overflow">Paginated overflow</h2>
dbaron@6470 409
dbaron@6497 410 <p class="issue">overflow:paginate or overflow:pages (or paged-x, paged-y, paged-x-controls, paged-y-controls as [[CSS3GCPM]] has?)</p>
dbaron@6470 411
dbaron@6470 412 <p class="issue">Ability to display N pages at once
dbaron@6470 413 rather than just one page at once?</p>
dbaron@6470 414
dbaron@6497 415 <p class="issue">
dbaron@6497 416 The current implementation of paginated overflow uses
dbaron@6497 417 the 'overflow'/'overflow-x'/'overflow-y' properties
dbaron@6497 418 rather than the 'overflow-style' property as proposed
dbaron@6497 419 in the [[CSS3GCPM]] draft
dbaron@6497 420 (which also matches the [[CSS3-MARQUEE]] proposal).
dbaron@6497 421 We should probably switch away from 'overflow-style',
dbaron@6497 422 but that's not 100% clear.
dbaron@6497 423 </p>
dbaron@6497 424
dbaron@6484 425 <h2 id="fragment-overflow">Fragment overflow</h2>
dbaron@6470 426
dbaron@6470 427 <p>
dbaron@6470 428 This section introduces and defines the meaning of
dbaron@6484 429 the new ''fragments'' value of the 'overflow' property.
dbaron@6470 430 </p>
dbaron@6470 431
dbaron@6470 432 <p>
dbaron@6484 433 When the computed value of 'overflow' for an element is ''fragments'',
dbaron@6470 434 and implementations would otherwise have created a box for the element,
dbaron@6491 435 then implementations must create a sequence of <dfn>fragment box</dfn>es
dbaron@6470 436 for that element.
dbaron@6491 437 (It is possible for an element with ''overflow: fragments''
dbaron@6491 438 to generate only one <i>fragment box</i>.
dbaron@6484 439 However, if an element's computed 'overflow' is not ''fragments'',
dbaron@6484 440 then its box is not a <i>fragment box</i>.)
dbaron@6484 441 Every <i>fragment box</i> is a fragmentation container,
dbaron@6491 442 and any overflow
dbaron@6491 443 that would cause that fragmentation container to fragment
dbaron@6491 444 causes another <i>fragment box</i> created as a next sibling
dbaron@6470 445 of the previous one.
dbaron@6470 446 <span class="issue">Or is it as though it's a next sibling of
dbaron@6470 447 the element? Need to figure out exactly how this interacts with
dbaron@6470 448 other box-level fixup.</span>
dbaron@6492 449 Additionally, if the <i>fragment box</i> is also
dbaron@6492 450 a multi-column box (as defined in [[!CSS3COL]]
dbaron@6492 451 <span class="issue">though it defines <i>multi-column element</i></span>)
dbaron@6492 452 any content that would lead to the creation of <i>overflow columns</i> [[!CSS3COL]]
dbaron@6492 453 instead is flown into an additional fragment box.
dbaron@6491 454 However, fragment boxes may themselves be broken
dbaron@6491 455 (due to fragmentation in a fragmentation context outside of them,
dbaron@6491 456 such as pages, columns, or other fragment boxes);
dbaron@6491 457 such breaking leads to fragments of the same fragment box
dbaron@6491 458 rather than multiple fragment boxes.
dbaron@6491 459 (This matters because fragment boxes may be styled by their index;
dbaron@6491 460 such breaking leads to multiple fragments of a fragment box
dbaron@6491 461 with a single index.
dbaron@6491 462 This design choice is so that
dbaron@6491 463 breaking a fragment box across pages does not break
dbaron@6491 464 the association of indices to particular pieces of content.)
dbaron@6491 465 <span class="issue">Should a forced break that breaks to
dbaron@6491 466 an outer fragmentation context cause a new fragment of a single
dbaron@6491 467 fragment box or a new fragment box?</span>
dbaron@6491 468 <span class="issue">Should we find a term other than
dbaron@6491 469 <i>fragment box</i> here to make this a little less confusing?</span>
dbaron@6470 470 </p>
dbaron@6470 471
dbaron@6470 472 <p class="issue">
dbaron@6491 473 What if we want to be able to style the pieces of an element
dbaron@6491 474 split within another type of fragmentation context?
dbaron@6491 475 These rules prevent ever using ''::nth-fragment()'' for that,
dbaron@6491 476 despite that the name seems the most logical name for such a feature.
dbaron@6470 477 </p>
dbaron@6470 478
dbaron@6475 479 <div class="example">
dbaron@6477 480 <table class="source-demo-pair"><tr><td><pre>&lt;!DOCTYPE HTML&gt;
dbaron@6475 481 &lt;title&gt;Breaking content into
dbaron@6475 482 equal-sized cards&lt;/title&gt;
dbaron@6475 483 &lt;style&gt;
dbaron@6475 484 .in-cards {
dbaron@6484 485 overflow: fragments;
dbaron@6475 486
dbaron@6475 487 width: 13em;
dbaron@6475 488 height: 8em;
dbaron@6475 489
dbaron@6475 490 padding: 4px;
dbaron@6475 491 border: medium solid blue;
dbaron@6475 492 margin: 6px;
dbaron@6475 493
dbaron@6475 494 font: medium/1.3 Times New
dbaron@6475 495 Roman, Times, serif;
dbaron@6475 496 }
dbaron@6475 497 &lt;/style&gt;
dbaron@6475 498 &lt;div class="in-cards"&gt;
dbaron@6475 499 In this example, the text in the div
dbaron@6475 500 is broken into a series of cards.
dbaron@6475 501 These cards all have the same style.
dbaron@6475 502 The presence of enough content to
dbaron@6475 503 overflow one of the cards causes
dbaron@6475 504 another one to be created. The second
dbaron@6475 505 card is created just like it's the
dbaron@6475 506 next sibling of the first.
dbaron@6477 507 &lt;/div&gt;</pre></td><td>
dbaron@6475 508 <div class="in-cards-demo">In this example, the text in the<br>div is broken into a series of<br>cards. These cards all have the<br>same style. The presence of<br>enough content to overflow<br>one of the cards causes another</div>
dbaron@6475 509 <div class="in-cards-demo">one to be created. The second<br>card is created just like it's the<br>next sibling of the first.</div>
dbaron@6475 510 </td></tr></table>
dbaron@6475 511 </div>
dbaron@6475 512
dbaron@6487 513 <p class="issue">
dbaron@6487 514 We should specify that ''overflow: fragments'' does not apply
dbaron@6487 515 to at least some table parts,
dbaron@6487 516 and perhaps other elements as well.
dbaron@6487 517 We need to determine exactly which ones.
dbaron@6487 518 </p>
dbaron@6487 519
dbaron@6488 520 <p class="issue">
dbaron@6488 521 This specification needs to say which type of
dbaron@6488 522 fragmentation context is created
dbaron@6488 523 so that it's clear which values of the 'break' property
dbaron@6488 524 cause breaks within this context.
dbaron@6488 525 We probably want ''break: regions'' to apply.
dbaron@6488 526 </p>
dbaron@6488 527
dbaron@6494 528 <p class="issue">
dbaron@6494 529 This specification needs a processing model
dbaron@6494 530 that will apply in cases where the layout containing the
dbaron@6494 531 fragments has characteristics that use the intrinsic size of the fragments
dbaron@6494 532 to change the amount of space available for them,
dbaron@6494 533 such as [[CSS3-GRID-LAYOUT]].
dbaron@6494 534 There has already been some work on such a processing model
dbaron@6494 535 in [[CSS3-REGIONS]],
dbaron@6494 536 and the work done on a model there,
dbaron@6494 537 and the editors of that specification,
dbaron@6494 538 should inform what happens in this specification.
dbaron@6494 539 </p>
dbaron@6494 540
dbaron@6484 541 <h3 id="fragment-styling">Fragment styling</h3>
dbaron@6470 542
dbaron@6484 543 <h4 id="fragment-pseudo-element">The ::nth-fragment() pseudo-element</h4>
dbaron@6470 544
dbaron@6470 545 <p>
dbaron@6484 546 The ::nth-fragment() pseudo-element is a pseudo-element
dbaron@6484 547 that describes some of the <i>fragment box</i>es generated by an element.
dbaron@6470 548 The argument to the pseudo-element takes the same syntax
dbaron@6470 549 as the argument to the :nth-child() pseudo-class
dbaron@6470 550 defined in [[!SELECT]], and has the same meaning
dbaron@6470 551 except that the number is relative to
dbaron@6484 552 <i>fragment box</i>es generated by the element
dbaron@6470 553 instead of siblings of the element.
dbaron@6470 554 </p>
dbaron@6470 555
dbaron@6470 556 <p class="note">
dbaron@6484 557 Selectors that allow addressing fragments
dbaron@6470 558 by counting from the end rather than the start
dbaron@6470 559 are intentionally not provided.
dbaron@6470 560 Such selectors would interfere with determining
dbaron@6484 561 the number of fragments.
dbaron@6470 562 </p>
dbaron@6470 563
dbaron@6489 564 <p class="issue">
dbaron@6489 565 Depending on future discussions,
dbaron@6489 566 this ''::nth-fragment(<var>an+b</var>)'' syntax
dbaron@6489 567 may be replaced with
dbaron@6489 568 the new ''::fragment:nth(<var>an+b</var>)'' syntax.
dbaron@6489 569 </p>
dbaron@6489 570
dbaron@6484 571 <h4 id="style-of-fragments">Styling of fragments</h4>
dbaron@6470 572
dbaron@6470 573 <p class="issue">
dbaron@6484 574 Should this apply to fragment overflow only,
dbaron@6470 575 or also to paginated overflow?
dbaron@6470 576 (If it applies,
dbaron@6470 577 then stricter property restrictions would be needed
dbaron@6470 578 for paginated overflow.)
dbaron@6470 579 </p>
dbaron@6470 580
dbaron@6470 581 <p>
dbaron@6484 582 In the absence of rules with ''::nth-fragment()'' pseudo-elements,
dbaron@6484 583 the computed style for each <i>fragment box</i>
dbaron@6470 584 is the computed style for the element
dbaron@6484 585 for which the <i>fragment box</i> was created.
dbaron@6484 586 However, the style for a <i>fragment box</i> is also influenced
dbaron@6470 587 by rules whose selector's <i>subject</i> [[!SELECT]]
dbaron@6484 588 has an ''::nth-fragment()'' pseudo-element,
dbaron@6484 589 if the 1-based number of the <i>fragment box</i> matches
dbaron@6484 590 that ''::nth-fragment()'' pseudo-element
dbaron@6484 591 and the selector (excluding the ''::nth-fragment()'' pseudo-element)
dbaron@6484 592 matches the element generating the fragments.
dbaron@6470 593 </p>
dbaron@6470 594
dbaron@6486 595 <p>
dbaron@6486 596 When determining the style of the <i>fragment box</i>,
dbaron@6486 597 these rules that match the fragment pseudo-element
dbaron@6486 598 cascade together with the rules that match the element,
dbaron@6486 599 with the fragment pseudo-element adding the specificity
dbaron@6486 600 of a pseudo-class to the specificity calculation.
dbaron@6486 601 <span class="issue">Does this need to be specified in
dbaron@6486 602 the cascading module as well?</span>
dbaron@6486 603 </p>
dbaron@6486 604
dbaron@6477 605 <div class="example">
dbaron@6477 606 <table class="source-demo-pair"><tr><td><pre>&lt;!DOCTYPE HTML&gt;
dbaron@6477 607 &lt;style&gt;
dbaron@6477 608 .bouncy-columns {
dbaron@6484 609 overflow: fragments;
dbaron@6477 610 width: 6em;
dbaron@6477 611 height: 10em;
dbaron@6477 612 float: left;
dbaron@6477 613 margin: 1em;
dbaron@6477 614 font: medium/1.25 Times New
dbaron@6477 615 Roman, Times, serif;
dbaron@6477 616 }
dbaron@6484 617 .bouncy-columns::nth-fragment(1) {
dbaron@6477 618 background: aqua; color: black;
dbaron@6477 619 transform: rotate(-3deg);
dbaron@6477 620 }
dbaron@6484 621 .bouncy-columns::nth-fragment(2) {
dbaron@6477 622 background: yellow; color: black;
dbaron@6477 623 transform: rotate(3deg);
dbaron@6477 624 }
dbaron@6477 625 &lt;/style&gt;
dbaron@6477 626 &lt;div class="bouncy-columns"&gt;
dbaron@6477 627 <i>...</i>
dbaron@6477 628 &lt;/div&gt;</pre></td><td>
dbaron@6477 629 <div class="bouncy-columns-demo one">In this<br>example, the<br>text in the div<br>is broken into<br>a series of<br>columns. The<br>author<br>probably</div>
dbaron@6477 630 <div class="bouncy-columns-demo two">intended the<br>text to fill two<br>columns. But<br>if it happens to<br>fill three<br>columns, the<br>third column is<br>still created. It</div>
dbaron@6484 631 <div class="bouncy-columns-demo">just doesn't<br>have any<br>fragment-specific<br>styling because<br>the author<br>didn't give it<br>any.</div>
dbaron@6477 632 </td></tr></table>
dbaron@6477 633 </div>
dbaron@6477 634
dbaron@6470 635 <p>
dbaron@6484 636 Styling an ''::nth-fragment()'' pseudo-element with the 'overflow'
dbaron@6490 637 property does take effect;
dbaron@6490 638 if a <i>fragment box</i> has a
dbaron@6490 639 computed value of 'overflow' other than ''fragments''
dbaron@6490 640 then that fragment box is the last fragment.
dbaron@6490 641 However, overriding ''overflow'' on the first fragment
dbaron@6490 642 does not cause the <i>fragment box</i> not to exist;
dbaron@6490 643 whether there are fragment boxes at all is determined by
dbaron@6490 644 the computed value of overflow for the element.
dbaron@7813 645 <span class="issue">Need to reword this to refer to the
dbaron@7813 646 appropriate choice of ''overflow-x'' or ''overflow-y'',
dbaron@7813 647 and then point to rule about the handling of the other one
dbaron@7813 648 of ''overflow-x'' or ''overflow-y''.</span>
dbaron@6470 649 </p>
dbaron@6470 650
dbaron@6470 651 <p>
dbaron@6485 652 Styling an ''::nth-fragment()'' pseudo-element with the 'content'
dbaron@6485 653 property has no effect;
dbaron@6485 654 the computed value of 'content' for the fragment box
dbaron@6485 655 remains the same as the computed value of content for the element.
dbaron@6485 656 </p>
dbaron@6485 657
dbaron@6485 658 <p>
dbaron@6484 659 Specifying ''display: none'' for a <i>fragment box</i> causes
dbaron@6484 660 the fragment box with that index not to be generated.
dbaron@6470 661 However, in terms of the indices
dbaron@6484 662 used for matching ''::nth-fragment()'' pseudo-elements
dbaron@6484 663 of later fragment boxes,
dbaron@6470 664 it still counts as though it was generated.
dbaron@6470 665 However, since it is not generated, it does not contain any content.
dbaron@6470 666 </p>
dbaron@6470 667
dbaron@7813 668 <p>
dbaron@7813 669 Specifying other values of 'display', 'position',
dbaron@7813 670 or 'float' is permitted, but is not allowed to change
dbaron@7813 671 the computed value of 'display-inside'.
dbaron@7813 672 (Since 'overflow', 'overflow-x', and 'overflow-y' only
dbaron@7813 673 apply to block containers and flex containers,
dbaron@7813 674 the computed value of 'display-inside' is always
dbaron@7813 675 ''block'' or ''flex''.
dbaron@7813 676 <span class="issue">Need to specify exactly how this works,
dbaron@7813 677 but it depends on
dbaron@7813 678 having 'display-inside' and 'display-outside' specified.</span>
dbaron@6470 679 </p>
dbaron@6470 680
dbaron@6470 681 <p>
dbaron@6470 682 To match the model for other pseudo-elements
dbaron@6470 683 where the pseudo-elements live inside their corresponding element,
dbaron@6484 684 declarations in ''::nth-fragment()'' pseudo-elements override
dbaron@6470 685 declarations in rules without the pseudo-element.
dbaron@6470 686 The relative priority within such declarations is determined
dbaron@6470 687 by normal cascading order (see [[!CSS21]]).
dbaron@6470 688 </p>
dbaron@6470 689
dbaron@6470 690 <p>
dbaron@6484 691 Styles specified on ''::nth-fragment()'' pseudo-elements
dbaron@6484 692 do affect inheritance to content within the <i>fragment box</i>.
dbaron@6484 693 In other words, the content within the <i>fragment box</i> must
dbaron@6484 694 inherit from the fragment box's style (i.e., the pseudo-element style)
dbaron@6470 695 rather than directly from the element.
dbaron@6484 696 This means that elements split between fragment boxes may
dbaron@6470 697 have different styles for different parts of the element.
dbaron@6470 698 </p>
dbaron@6470 699
dbaron@6472 700 <p class="issue">
dbaron@6472 701 This inheritance rule allows specifying styles indirectly
dbaron@6472 702 (by using explicit ''inherit'' or using default inheritance
dbaron@6472 703 on properties that don't apply to '':first-letter'')
dbaron@6472 704 that can't be specified directly
dbaron@6472 705 (based on the rules in the next section).
dbaron@6472 706 This is a problem.
dbaron@6484 707 The restrictions that apply to styling inside fragments
dbaron@6484 708 should also apply to inheritance from fragments.
dbaron@6472 709 </p>
dbaron@6472 710
dbaron@6480 711 <div class="example">
dbaron@6480 712 <table class="source-demo-pair"><tr><td><pre>&lt;!DOCTYPE HTML&gt;
dbaron@6480 713 &lt;style&gt;
dbaron@6480 714 .article {
dbaron@6484 715 overflow: fragments;
dbaron@6480 716 }
dbaron@6484 717 .article::nth-fragment(1) {
dbaron@6480 718 font-size: 1.5em;
dbaron@6480 719 margin-bottom: 1em;
dbaron@6480 720 height: 4em;
dbaron@6480 721 }
dbaron@6491 722 .article::nth-fragment(2) {
dbaron@6480 723 margin-left: 5em;
dbaron@6480 724 margin-right: 2em;
dbaron@6480 725 }
dbaron@6480 726 &lt;/style&gt;
dbaron@6480 727 &lt;div class="article"&gt;
dbaron@6480 728 The &lt;code&gt;font-size&lt;/code&gt; property<i>...</i>
dbaron@6480 729 &lt;/div&gt;</pre></td><td>
dbaron@6484 730 <div class="article-font-inherit-demo one">The <code>font-size</code> property<br>specified on the fragment<br>is inherited into the</div>
dbaron@6484 731 <div class="article-font-inherit-demo two">descendants of the fragment.<br>This means that inherited<br>properties can be used<br>reliably on a fragment, as in<br>this example.</div>
dbaron@6480 732 </td></tr></table>
dbaron@6480 733 </div>
dbaron@6478 734
dbaron@6484 735 <h4 id="style-in-fragments">Styling inside fragments</h4>
dbaron@6470 736
dbaron@6470 737 <p class="issue">
dbaron@6484 738 Should this apply to fragment overflow only,
dbaron@6470 739 or also to paginated overflow,
dbaron@6470 740 or even to pagination across pages?
dbaron@6470 741 </p>
dbaron@6470 742
dbaron@6470 743 <p>
dbaron@6484 744 The ''::nth-fragment()'' pseudo-element
dbaron@6470 745 can also be used to style
dbaron@6484 746 content inside of a <i>fragment box</i>.
dbaron@6470 747 Unlike the ''::first-line'' and ''::first-letter'' pseudo-elements,
dbaron@6484 748 the ''::nth-fragment()'' pseudo-element can be applied
dbaron@6470 749 to parts of the selector other than the subject:
dbaron@6470 750 in particular, it can match ancestors of the subject.
dbaron@6470 751 However, the only CSS properties applied
dbaron@6470 752 by rules with such selectors
dbaron@6470 753 are those that apply
dbaron@6470 754 to the ''::first-letter'' pseudo-element.
dbaron@6470 755 </p>
dbaron@6470 756
dbaron@6470 757 <p>
dbaron@6470 758 To be more precise,
dbaron@6484 759 when a rule's selector has ''::nth-fragment()'' pseudo-elements
dbaron@6470 760 attached to parts of the selector other than the subject,
dbaron@6470 761 the declarations in that rule apply to
dbaron@6470 762 a fragment (or pseudo-element thereof) when:
dbaron@6470 763 </p>
dbaron@6470 764 <ol>
dbaron@6470 765 <li>
dbaron@6470 766 the declarations are for properties that apply to the
dbaron@6470 767 ''::first-letter'' pseudo-element,
dbaron@6470 768 </li>
dbaron@6470 769 <li>
dbaron@6470 770 the declarations would apply to
dbaron@6470 771 that fragment (or pseudo-element thereof)
dbaron@6484 772 had those ''::nth-fragment()'' pseudo-elements been removed,
dbaron@6470 773 with a particular association between
dbaron@6470 774 each sequence of simple selectors and the element it matched,
dbaron@6470 775 and
dbaron@6470 776 </li>
dbaron@6470 777 <li>
dbaron@6484 778 for each removed ''::nth-fragment()'' pseudo-element,
dbaron@6484 779 the fragment lives within a <i>fragment box</i>
dbaron@6470 780 of the element associated in that association
dbaron@6470 781 with the selector that the pseudo-element was attached to,
dbaron@6470 782 and whose index matches the pseudo-element.
dbaron@6470 783 </li>
dbaron@6470 784 </ol>
dbaron@6470 785
dbaron@6481 786 <div class="example">
dbaron@6481 787 <table class="source-demo-pair"><tr><td><pre>&lt;!DOCTYPE HTML&gt;
dbaron@6481 788 &lt;style&gt;
dbaron@6481 789 .dark-columns {
dbaron@6484 790 overflow: fragments;
dbaron@6481 791 width: 6em;
dbaron@6481 792 height: 10em;
dbaron@6481 793 float: left;
dbaron@6481 794 margin-right: 1em;
dbaron@6481 795 font: medium/1.25 Times New
dbaron@6481 796 Roman, Times, serif;
dbaron@6481 797 }
dbaron@6484 798 .dark-columns::nth-fragment(1) {
dbaron@6481 799 background: aqua; color: black;
dbaron@6481 800 }
dbaron@6484 801 .dark-columns::nth-fragment(1) :link {
dbaron@6481 802 color: blue;
dbaron@6481 803 }
dbaron@6484 804 .dark-columns::nth-fragment(1) :visited {
dbaron@6481 805 color: purple;
dbaron@6481 806 }
dbaron@6484 807 .dark-columns::nth-fragment(2) {
dbaron@6481 808 background: navy; color: white;
dbaron@6481 809 }
dbaron@6484 810 .dark-columns::nth-fragment(2) :link {
dbaron@6481 811 color: aqua;
dbaron@6481 812 }
dbaron@6484 813 .dark-columns::nth-fragment(2) :visited {
dbaron@6481 814 color: fuchsia;
dbaron@6481 815 }
dbaron@6481 816 &lt;/style&gt;
dbaron@6481 817 &lt;div class="dark-columns"&gt;
dbaron@6481 818 <i>...</i>
dbaron@6481 819 &lt;/div&gt;</pre></td><td>
dbaron@6484 820 <div class="dark-columns-demo one">In this<br><a href="http://en.wiktionary.org/wiki/example">example</a>, the<br>text flows<br>from one<br>light-colored<br>fragment into<br>another<br>dark-colored</div>
dbaron@6484 821 <div class="dark-columns-demo two">fragment. We<br>therefore want<br>different styles<br>for <a href="http://www.w3.org/Provider/Style/IntoContext.html">hyperlinks</a><br>in the different<br>fragments.</div>
dbaron@6481 822 </td></tr></table>
dbaron@6481 823 </div>
dbaron@6481 824
dbaron@6478 825
dbaron@6470 826 <h3 id="max-lines">The 'max-lines' property</h3>
dbaron@6470 827
dbaron@6470 828 <p>
dbaron@6470 829 Authors may wish to style the opening lines of an element
dbaron@6470 830 with different styles
dbaron@6484 831 by putting those opening lines in a separate fragment.
dbaron@6470 832 However, since it may be difficult to predict the exact height
dbaron@6470 833 occupied by those lines
dbaron@6484 834 in order to restrict the first fragment to that height,
dbaron@6470 835 this specification introduces a 'max-lines' property
dbaron@6484 836 that forces a fragment to break
dbaron@6470 837 after a specified number of lines.
dbaron@6470 838 This forces a break after the given number of lines
dbaron@6470 839 contained within the element or its descendants,
dbaron@6470 840 as long as those lines are in the same block formatting context.
dbaron@6470 841 </p>
dbaron@6470 842
dbaron@6470 843 <table class=propdef>
dbaron@6470 844 <tr>
dbaron@6470 845 <th>Name:
dbaron@6470 846 <td><dfn>max-lines</dfn>
dbaron@6470 847 <tr>
dbaron@6470 848 <th><a href="#values">Value</a>:
dbaron@6470 849 <td>none | &lt;integer&gt;
dbaron@6470 850 <tr>
dbaron@6470 851 <th>Initial:
dbaron@6470 852 <td>none
dbaron@6470 853 <tr>
dbaron@6470 854 <th>Applies to:
dbaron@6484 855 <td>fragment boxes
dbaron@6470 856 <tr>
dbaron@6470 857 <th>Inherited:
dbaron@6470 858 <td>no
dbaron@6470 859 <tr>
dbaron@6482 860 <th>Animatable:
dbaron@6482 861 <td>as <a href="http://www.w3.org/TR/css3-transitions/#animatable-types">integer</a>
dbaron@6482 862 <tr>
dbaron@6470 863 <th>Percentages:
dbaron@6470 864 <td>N/A
dbaron@6470 865 <tr>
dbaron@6470 866 <th>Media:
dbaron@6470 867 <td>visual
dbaron@6470 868 <tr>
dbaron@6470 869 <th>Computed&nbsp;value:
dbaron@6470 870 <td>specified value
dbaron@6470 871 <tr>
dbaron@6470 872 <th>Canonical order:
dbaron@6470 873 <td><abbr title="follows order of property value definition">per grammar</abbr>
dbaron@6470 874 </table>
dbaron@6470 875
dbaron@6470 876 <dl>
dbaron@6470 877 <dt>none
dbaron@6470 878 <dd>
dbaron@6470 879 <p>
dbaron@6470 880 Breaks occur only as specified elsewhere.
dbaron@6470 881 </p>
dbaron@6470 882 </dd>
dbaron@6470 883
dbaron@6470 884 <dt>&lt;integer&gt;
dbaron@6470 885 <dd>
dbaron@6470 886 <p>
dbaron@6470 887 In addition to any breaks specified elsewhere,
dbaron@6470 888 a break is forced before any line that would exceed
dbaron@6470 889 the given number of lines
dbaron@6470 890 being placed inside the element
dbaron@6470 891 (excluding lines that are in
dbaron@6470 892 a different block formatting context from
dbaron@6470 893 the block formatting context to which
dbaron@6470 894 an unstyled child of the element would belong).
dbaron@6470 895 </p>
dbaron@6470 896
dbaron@6470 897 <p class="issue">
dbaron@6470 898 If there are multiple boundaries between this line
dbaron@6470 899 and the previous, where exactly (in terms of element
dbaron@6470 900 boundaries) is the break forced?
dbaron@6470 901 </p>
dbaron@6470 902
dbaron@6470 903 <p>
dbaron@6470 904 Only positive integers are accepted.
dbaron@6470 905 Zero or negative integers are a parse error.
dbaron@6470 906 </p>
dbaron@6470 907 </dd>
dbaron@6470 908 </dl>
dbaron@6470 909
dbaron@6484 910 <p class="issue">Should this apply to fragment overflow only, or also
dbaron@6470 911 to pagination?</p>
dbaron@6470 912
dbaron@6479 913 <div class="example">
dbaron@6479 914 <table class="source-demo-pair"><tr><td><pre>&lt;!DOCTYPE HTML&gt;
dbaron@6479 915 &lt;style&gt;
dbaron@6479 916 .article {
dbaron@6484 917 overflow: fragments;
dbaron@6479 918 }
dbaron@6479 919 .article::first-letter {
dbaron@6479 920 font-size: 2em;
dbaron@6479 921 line-height: 0.9;
dbaron@6479 922 }
dbaron@6484 923 .article::nth-fragment(1) {
dbaron@6479 924 font-size: 1.5em;
dbaron@6479 925 max-lines: 3;
dbaron@6479 926 }
dbaron@6491 927 .article::nth-fragment(2) {
dbaron@6479 928 column-count: 2;
dbaron@6479 929 }
dbaron@6479 930 &lt;/style&gt;
dbaron@6479 931 &lt;div class="article"&gt;
dbaron@6479 932 <i>...</i>
dbaron@6479 933 &lt;/div&gt;</pre></td><td>
dbaron@6479 934 <div class="article-max-lines-demo one">The max-lines property allows<br>authors to use a larger font for the first<br>few lines of an article. Without the</div>
dbaron@6479 935 <div class="article-max-lines-demo two">max-lines property, authors<br>might have to use the<br>'height' property instead, but<br>that would leave a slight gap<br>if the author miscalculated<br>how much height a given<br>number of lines would<br>occupy (which might be</div>
dbaron@6479 936 <div class="article-max-lines-demo three">particularly hard if the author<br>didn't know what text would<br>be filling the space, exactly<br>what font would be used, or<br>exactly which platform's font<br>rendering would be used to<br>display the font).</div>
dbaron@6479 937 </td></tr></table>
dbaron@6479 938 </div>
dbaron@6478 939
dbaron@6493 940 <h2 id="static-media">Overflow in static media</h2>
dbaron@6493 941
dbaron@6493 942 <p class="issue">
dbaron@6493 943 This specification should define useful behavior
dbaron@6493 944 for all values of 'overflow'
dbaron@6493 945 in static media (such as print).
dbaron@6493 946 Current implementation behavior is quite poor and
dbaron@6493 947 produces unexpected results when authors have not considered
dbaron@6493 948 what will happen when
dbaron@6493 949 the content they produce for interactive media
dbaron@6493 950 is printed.
dbaron@6493 951 </p>
dbaron@6493 952
dbaron@6470 953 <h2 id="conformance">
dbaron@6470 954 Conformance</h2>
dbaron@6470 955
dbaron@6470 956 <h3 id="placement">
dbaron@6470 957 Module interactions</h3>
dbaron@6470 958
dbaron@6470 959 <p>This module extends the 'overflow'
dbaron@6470 960 feature defined in [[CSS21]] section 11.1.1. It defines additional
dbaron@6470 961 overflow handling mechanisms that implementations must implement as
dbaron@6470 962 described in this module in order to conform to this module.</p>
dbaron@6470 963
dbaron@6470 964 <p>No properties in this module apply to the <code>::first-line</code> or
dbaron@6470 965 <code>::first-letter</code> pseudo-elements.</p>
dbaron@6470 966
dbaron@6470 967 <h3 id="values">
dbaron@6470 968 Values</h3>
dbaron@6470 969
dbaron@6470 970 <p>This specification follows the
dbaron@6470 971 <a href="http://www.w3.org/TR/CSS21/about.html#property-defs">CSS property
dbaron@6470 972 definition conventions</a> from [[!CSS21]]. Value types not defined in
dbaron@6470 973 this specification are defined in CSS Level 2 Revision 1 [[!CSS21]].
dbaron@6470 974 Other CSS modules may expand the definitions of these value types: for
dbaron@6470 975 example [[CSS3COLOR]], when combined with this module, expands the
dbaron@6470 976 definition of the &lt;color&gt; value type as used in this specification.</p>
dbaron@6470 977
dbaron@6470 978 <p>In addition to the property-specific values listed in their definitions,
dbaron@6470 979 all properties defined in this specification also accept the
dbaron@6470 980 <a href="http://www.w3.org/TR/CSS21/cascade.html#value-def-inherit">inherit</a>
dbaron@6470 981 keyword as their property value. For readability it has not been repeated
dbaron@6470 982 explicitly.
dbaron@6470 983
dbaron@6470 984
dbaron@6470 985 <h3 id="conventions">
dbaron@6470 986 Document conventions</h3>
dbaron@6470 987
dbaron@6470 988 <p>Conformance requirements are expressed with a combination of
dbaron@6470 989 descriptive assertions and RFC 2119 terminology. The key words “MUST”,
dbaron@6470 990 “MUST NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”, “SHOULD NOT”,
dbaron@6470 991 “RECOMMENDED”, “MAY”, and “OPTIONAL” in the normative parts of this
dbaron@6470 992 document are to be interpreted as described in RFC 2119.
dbaron@6470 993 However, for readability, these words do not appear in all uppercase
dbaron@6470 994 letters in this specification.
dbaron@6470 995
dbaron@6470 996 <p>All of the text of this specification is normative except sections
dbaron@6470 997 explicitly marked as non-normative, examples, and notes. [[!RFC2119]]</p>
dbaron@6470 998
dbaron@6470 999 <p>Examples in this specification are introduced with the words “for example”
dbaron@6470 1000 or are set apart from the normative text with <code>class="example"</code>,
dbaron@6470 1001 like this:
dbaron@6470 1002
dbaron@6470 1003 <div class="example">
dbaron@6470 1004 <p>This is an example of an informative example.</p>
dbaron@6470 1005 </div>
dbaron@6470 1006
dbaron@6470 1007 <p>Informative notes begin with the word “Note” and are set apart from the
dbaron@6470 1008 normative text with <code>class="note"</code>, like this:
dbaron@6470 1009
dbaron@6470 1010 <p class="note">Note, this is an informative note.</p>
dbaron@6470 1011
dbaron@6470 1012 <h3 id="conformance-classes">
dbaron@6470 1013 Conformance classes</h3>
dbaron@6470 1014
dbaron@6483 1015 <p>Conformance to CSS Overflow Module Level 3
dbaron@6470 1016 is defined for three conformance classes:
dbaron@6470 1017 <dl>
dbaron@6470 1018 <dt><dfn title="style sheet!!as conformance class">style sheet</dfn>
dbaron@6470 1019 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
dbaron@6470 1020 style sheet</a>.
dbaron@6470 1021 <dt><dfn>renderer</dfn></dt>
dbaron@6470 1022 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
dbaron@6470 1023 that interprets the semantics of a style sheet and renders
dbaron@6470 1024 documents that use them.
dbaron@6470 1025 <dt><dfn id="authoring-tool">authoring tool</dfn></dt>
dbaron@6470 1026 <dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
dbaron@6470 1027 that writes a style sheet.
dbaron@6470 1028 </dl>
dbaron@6470 1029
dbaron@6483 1030 <p>A style sheet is conformant to CSS Overflow Module Level 3
dbaron@6470 1031 if all of its statements that use syntax defined in this module are valid
dbaron@6470 1032 according to the generic CSS grammar and the individual grammars of each
dbaron@6470 1033 feature defined in this module.
dbaron@6470 1034
dbaron@6483 1035 <p>A renderer is conformant to CSS Overflow Module Level 3
dbaron@6470 1036 if, in addition to interpreting the style sheet as defined by the
dbaron@6470 1037 appropriate specifications, it supports all the features defined
dbaron@6483 1038 by CSS Overflow Module Level 3 by parsing them correctly
dbaron@6470 1039 and rendering the document accordingly. However, the inability of a
dbaron@6470 1040 UA to correctly render a document due to limitations of the device
dbaron@6470 1041 does not make the UA non-conformant. (For example, a UA is not
dbaron@6470 1042 required to render color on a monochrome monitor.)
dbaron@6470 1043
dbaron@6483 1044 <p>An authoring tool is conformant to CSS Overflow Module Level 3
dbaron@6470 1045 if it writes style sheets that are syntactically correct according to the
dbaron@6470 1046 generic CSS grammar and the individual grammars of each feature in
dbaron@6470 1047 this module, and meet all other conformance requirements of style sheets
dbaron@6470 1048 as described in this module.
dbaron@6470 1049
dbaron@6470 1050 <h3 id="partial">
dbaron@6470 1051 Partial implementations</h3>
dbaron@6470 1052
dbaron@6470 1053 <p>So that authors can exploit the forward-compatible parsing rules to
dbaron@6470 1054 assign fallback values, CSS renderers <strong>must</strong>
dbaron@6470 1055 treat as invalid (and <a href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore
dbaron@6470 1056 as appropriate</a>) any at-rules, properties, property values, keywords,
dbaron@6470 1057 and other syntactic constructs for which they have no usable level of
dbaron@6470 1058 support. In particular, user agents <strong>must not</strong> selectively
dbaron@6470 1059 ignore unsupported component values and honor supported values in a single
dbaron@6470 1060 multi-value property declaration: if any value is considered invalid
dbaron@6470 1061 (as unsupported values must be), CSS requires that the entire declaration
dbaron@6470 1062 be ignored.</p>
dbaron@6470 1063
dbaron@6470 1064 <h3 id="experimental">
dbaron@6470 1065 Experimental implementations</h3>
dbaron@6470 1066
dbaron@6470 1067 <p>To avoid clashes with future CSS features, the CSS2.1 specification
dbaron@6470 1068 reserves a <a href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
dbaron@6470 1069 syntax</a> for proprietary and experimental extensions to CSS.
dbaron@6470 1070
dbaron@6470 1071 <p>Prior to a specification reaching the Candidate Recommendation stage
dbaron@6470 1072 in the W3C process, all implementations of a CSS feature are considered
dbaron@6470 1073 experimental. The CSS Working Group recommends that implementations
dbaron@6470 1074 use a vendor-prefixed syntax for such features, including those in
dbaron@6470 1075 W3C Working Drafts. This avoids incompatibilities with future changes
dbaron@6470 1076 in the draft.
dbaron@6470 1077 </p>
dbaron@6470 1078
dbaron@6470 1079 <h3 id="testing">
dbaron@6470 1080 Non-experimental implementations</h3>
dbaron@6470 1081
dbaron@6470 1082 <p>Once a specification reaches the Candidate Recommendation stage,
dbaron@6470 1083 non-experimental implementations are possible, and implementors should
dbaron@6470 1084 release an unprefixed implementation of any CR-level feature they
dbaron@6470 1085 can demonstrate to be correctly implemented according to spec.
dbaron@6470 1086
dbaron@6470 1087 <p>To establish and maintain the interoperability of CSS across
dbaron@6470 1088 implementations, the CSS Working Group requests that non-experimental
dbaron@6470 1089 CSS renderers submit an implementation report (and, if necessary, the
dbaron@6470 1090 testcases used for that implementation report) to the W3C before
dbaron@6470 1091 releasing an unprefixed implementation of any CSS features. Testcases
dbaron@6470 1092 submitted to W3C are subject to review and correction by the CSS
dbaron@6470 1093 Working Group.
dbaron@6470 1094
dbaron@6470 1095 <p>Further information on submitting testcases and implementation reports
dbaron@6470 1096 can be found from on the CSS Working Group's website at
dbaron@6470 1097 <a href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
dbaron@6470 1098 Questions should be directed to the
dbaron@6470 1099 <a href="http://lists.w3.org/Archives/Public/public-css-testsuite">[email protected]</a>
dbaron@6470 1100 mailing list.
dbaron@6470 1101
dbaron@6470 1102 <h3 id="cr-exit-criteria">
dbaron@6470 1103 CR exit criteria</h3>
dbaron@6470 1104
dbaron@6470 1105 <p class=issue>[Change or remove the following CR exit criteria if
dbaron@6470 1106 the spec is not a module, but, e.g., a Note or a profile. This text was <a
dbaron@6470 1107 href="http://www.w3.org/Style/CSS/Tracker/actions/44"> decided on 2008-06-04.</a>]</p>
dbaron@6470 1108
dbaron@6470 1109 <p>
dbaron@6470 1110 For this specification to be advanced to Proposed Recommendation,
dbaron@6470 1111 there must be at least two independent, interoperable implementations
dbaron@6470 1112 of each feature. Each feature may be implemented by a different set of
dbaron@6470 1113 products, there is no requirement that all features be implemented by
dbaron@6470 1114 a single product. For the purposes of this criterion, we define the
dbaron@6470 1115 following terms:
dbaron@6470 1116
dbaron@6470 1117 <dl>
dbaron@6470 1118 <dt>independent <dd>each implementation must be developed by a
dbaron@6470 1119 different party and cannot share, reuse, or derive from code
dbaron@6470 1120 used by another qualifying implementation. Sections of code that
dbaron@6470 1121 have no bearing on the implementation of this specification are
dbaron@6470 1122 exempt from this requirement.
dbaron@6470 1123
dbaron@6470 1124 <dt>interoperable <dd>passing the respective test case(s) in the
dbaron@6470 1125 official CSS test suite, or, if the implementation is not a Web
dbaron@6470 1126 browser, an equivalent test. Every relevant test in the test
dbaron@6470 1127 suite should have an equivalent test created if such a user
dbaron@6470 1128 agent (UA) is to be used to claim interoperability. In addition
dbaron@6470 1129 if such a UA is to be used to claim interoperability, then there
dbaron@6470 1130 must one or more additional UAs which can also pass those
dbaron@6470 1131 equivalent tests in the same way for the purpose of
dbaron@6470 1132 interoperability. The equivalent tests must be made publicly
dbaron@6470 1133 available for the purposes of peer review.
dbaron@6470 1134
dbaron@6470 1135 <dt>implementation <dd>a user agent which:
dbaron@6470 1136
dbaron@6470 1137 <ol class=inline>
dbaron@6470 1138 <li>implements the specification.
dbaron@6470 1139
dbaron@6470 1140 <li>is available to the general public. The implementation may
dbaron@6470 1141 be a shipping product or other publicly available version
dbaron@6470 1142 (i.e., beta version, preview release, or “nightly build”).
dbaron@6470 1143 Non-shipping product releases must have implemented the
dbaron@6470 1144 feature(s) for a period of at least one month in order to
dbaron@6470 1145 demonstrate stability.
dbaron@6470 1146
dbaron@6470 1147 <li>is not experimental (i.e., a version specifically designed
dbaron@6470 1148 to pass the test suite and is not intended for normal usage
dbaron@6470 1149 going forward).
dbaron@6470 1150 </ol>
dbaron@6470 1151 </dl>
dbaron@6470 1152
dbaron@6470 1153 <p>The specification will remain Candidate Recommendation for at least
dbaron@6470 1154 six months.
dbaron@6470 1155
dbaron@6470 1156 <h2 class=no-num id="acknowledgments">
dbaron@6470 1157 Acknowledgments</h2>
dbaron@6470 1158
dbaron@6470 1159 <p>
dbaron@6470 1160 Thanks especially to the feedback from
dbaron@6496 1161 Rossen Atanassov,
dbaron@6496 1162 Bert Bos,
dbaron@6496 1163 Tantek Çelik,
dbaron@6496 1164 John Daggett,
dbaron@6496 1165 fantasai,
dbaron@6496 1166 Daniel Glazman,
dbaron@6496 1167 Vincent Hardy,
dbaron@6470 1168 H&aring;kon Wium Lie,
dbaron@6496 1169 Peter Linss,
dbaron@6470 1170 Florian Rivoal,
dbaron@6473 1171 Alan Stearns,
dbaron@6496 1172 Steve Zilles,
dbaron@6470 1173 and all the rest of the
dbaron@6470 1174 <a href="http://lists.w3.org/Archives/Public/www-style/">www-style</a> community.
dbaron@6470 1175 </p>
dbaron@6470 1176
dbaron@6470 1177 <h2 class=no-num id="references">
dbaron@6470 1178 References</h2>
dbaron@6470 1179
dbaron@6470 1180 <h3 class="no-num" id="normative-references">
dbaron@6470 1181 Normative references</h3>
dbaron@6470 1182 <!--normative-->
dbaron@6470 1183
dbaron@6470 1184 <h3 class="no-num" id="other-references">
dbaron@6470 1185 Other references</h3>
dbaron@6470 1186 <!--informative-->
dbaron@6470 1187
dbaron@6470 1188 <h2 class="no-num" id="index">
dbaron@6470 1189 Index</h2>
dbaron@6470 1190 <!--index-->
dbaron@6470 1191
dbaron@6470 1192 <h2 class="no-num" id="property-index">
dbaron@6470 1193 Property index</h2>
dbaron@6470 1194 <!-- properties -->
dbaron@6470 1195
dbaron@6470 1196 </body>
dbaron@6470 1197 </html>
dbaron@6470 1198 <!-- Keep this comment at the end of the file
dbaron@6470 1199 Local variables:
dbaron@6470 1200 mode: sgml
dbaron@6470 1201 sgml-declaration:"~/SGML/HTML4.decl"
dbaron@6470 1202 sgml-default-doctype-name:"html"
dbaron@6470 1203 sgml-minimize-attributes:t
dbaron@6470 1204 sgml-nofill-elements:("pre" "style" "br")
dbaron@6470 1205 sgml-live-element-indicator:t
dbaron@6470 1206 sgml-omittag:nil
dbaron@6470 1207 sgml-shorttag:nil
dbaron@6470 1208 sgml-namecase-general:t
dbaron@6470 1209 sgml-general-insert-case:lower
dbaron@6470 1210 sgml-always-quote-attributes:t
dbaron@6470 1211 sgml-indent-step:nil
dbaron@6470 1212 sgml-indent-data:t
dbaron@6470 1213 sgml-parent-document:nil
dbaron@6470 1214 sgml-exposed-tags:nil
dbaron@6470 1215 sgml-local-catalogs:nil
dbaron@6470 1216 sgml-local-ecat-files:nil
dbaron@6470 1217 End:
dbaron@6470 1218 -->
dbaron@6470 1219

mercurial