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