|
9 | 9 | rel=dcterms.rights> |
10 | 10 | <meta content=" CSS Paged Media Module Level 3" name=dcterms.title> |
11 | 11 | <meta content=text name=dcterms.type> |
12 | | - <meta content=2012-11-04 name=dcterms.issued> |
| 12 | + <meta content=2012-11-05 name=dcterms.issued> |
13 | 13 | <meta content="Melinda Grant" name=dcterms.creator> |
14 | 14 | <meta content="Håkon Wium Lie" name=dcterms.creator> |
15 | 15 | <meta content="Elika J. Etemad" name=dcterms.creator> |
16 | 16 | <meta content=W3C name=dcterms.publisher> |
17 | | - <meta content="http://www.w3.org/TR/2012/ED-css3-page-20121104/" |
| 17 | + <meta content="http://www.w3.org/TR/2012/ED-css3-page-20121105/" |
18 | 18 | name=dcterms.identifier> |
19 | 19 | <meta content="text/html; charset=utf-8" http-equiv=Content-Type> |
20 | 20 | <link href="../default.css" rel=stylesheet type="text/css"> |
|
99 | 99 |
|
100 | 100 | <h1>CSS Paged Media Module Level 3</h1> |
101 | 101 |
|
102 | | - <h2 class="no-num no-toc" id=w3c-working>Editor's Draft 4 November 2012</h2> |
| 102 | + <h2 class="no-num no-toc" id=w3c-working>Editor's Draft 5 November 2012</h2> |
103 | 103 |
|
104 | 104 | <dl> |
105 | 105 | <dt>This version: |
106 | 106 |
|
107 | 107 | <dd><a |
108 | 108 | href="http://dev.w3.org/csswg/css3-page/">http://dev.w3.org/csswg/css3-page/</a></dd> |
109 | | - <!-- <dd><a href="http://www.w3.org/TR/2012/ED-css3-page-20121104/">http://www.w3.org/TR/2012/WD-css3-page-20121104</a></dd> --> |
| 109 | + <!-- <dd><a href="http://www.w3.org/TR/2012/ED-css3-page-20121105/">http://www.w3.org/TR/2012/WD-css3-page-20121105</a></dd> --> |
110 | 110 |
|
111 | 111 | <dt>Latest version: |
112 | 112 |
|
@@ -191,7 +191,7 @@ <h2 class="no-num no-toc" id=status>Status of this Document</h2> |
191 | 191 | <p>This document contains the <abbr |
192 | 192 | title="Cascading Style Sheets">CSS3</abbr> Paged Media Module W3C Last |
193 | 193 | Call <a href="/2005/10/Process-20051014/tr.html#RecsWD">Working Draft</a> |
194 | | - of 4 November 2012. The Last Call period ends on <span |
| 194 | + of 5 November 2012. The Last Call period ends on <span |
195 | 195 | class=fudge>TBD</span>. |
196 | 196 |
|
197 | 197 | <p>Relative to the previous Last Call Working Draft, this version has |
@@ -1378,49 +1378,49 @@ <h4 id=max-margin-dimension><span class=secno>6.3.1. </span>Margin Box |
1378 | 1378 | defined for use in the subsequent margin box calculations: |
1379 | 1379 |
|
1380 | 1380 | <dl> |
1381 | | - <dt id=MaxBoxWidth>max box width |
| 1381 | + <dt id=MaxBoxWidth><dfn id=max-box-width>max box width</dfn> |
1382 | 1382 |
|
1383 | | - <dd>the sum of the page's left border width, left padding, <a |
| 1383 | + <dd>the sum of the page’s left border width, left padding, <a |
1384 | 1384 | href="#page-box">page area</a> width, right padding, and right border |
1385 | 1385 | width. In other words, it is the distance between the <a |
1386 | | - href="#page-box">page box</a>‘<code class=css>s left border edge and |
1387 | | - right border edge. This quantity is used when calculating dimensions of |
1388 | | - the top and bottom margin boxes.</code> |
| 1386 | + href="#page-box">page box</a>’s left border edge and right border |
| 1387 | + edge. This quantity is used when calculating dimensions of the top and |
| 1388 | + bottom margin boxes. |
1389 | 1389 |
|
1390 | | - <dt id=MaxBoxHeight>max box height |
| 1390 | + <dt id=MaxBoxHeight><dfn id=max-box-height>max box height</dfn> |
1391 | 1391 |
|
1392 | 1392 | <dd>the sum of the page’s top border width, top padding, <a |
1393 | 1393 | href="#page-box">page area</a> height, bottom padding, and bottom border |
1394 | 1394 | width. In other words, it is the distance between the <a |
1395 | | - href="#page-box">page box</a>‘<code class=css>s top border edge and |
1396 | | - bottom border edge. This quantity is used when calculating dimensions of |
1397 | | - the left and right margin boxes.</code> |
| 1395 | + href="#page-box">page box</a>’s top border edge and bottom border |
| 1396 | + edge. This quantity is used when calculating dimensions of the left and |
| 1397 | + right margin boxes. |
1398 | 1398 |
|
1399 | | - <dt>outer width |
| 1399 | + <dt><dfn id=outer-width>outer width</dfn> |
1400 | 1400 |
|
1401 | | - <dd>the sum of a margin box’s left and right margins, left and right |
| 1401 | + <dd>the sum of a margin box's left and right margins, left and right |
1402 | 1402 | border widths, left and right padding, and content-box width. |
1403 | 1403 |
|
1404 | | - <dt>outer height |
| 1404 | + <dt><dfn id=outer-height>outer height</dfn> |
1405 | 1405 |
|
1406 | 1406 | <dd>the sum of a margin box's top and bottom margins, top and bottom |
1407 | 1407 | border widths, top and bottom padding, and content-box height. |
1408 | 1408 | </dl> |
1409 | 1409 |
|
1410 | 1410 | <dl> |
1411 | | - <dt>preferred outer width |
| 1411 | + <dt><dfn id=outer-min-content>outer min-content</dfn> width |
1412 | 1412 |
|
1413 | | - <dd>the sum of a margin box's left and right margins, left and right |
1414 | | - border widths, left and right padding, and <a |
1415 | | - href="http://www.w3.org/TR/CSS21/visudet.html#float-width">preferred |
1416 | | - width</a>. |
| 1413 | + <dd>Like the <a href="#outer-width"><i>outer width</i></a>, except that |
| 1414 | + <a href="http://www.w3.org/TR/css3-sizing/#min-content">‘<code |
| 1415 | + class=css>min-content</code>’</a> is used when ‘<code |
| 1416 | + class=property>width</code>’ is ‘<code class=css>auto</code>’. |
1417 | 1417 |
|
1418 | | - <dt>preferred minimum outer width |
| 1418 | + <dt><dfn id=outer-max-content>outer max-content</dfn> width |
1419 | 1419 |
|
1420 | | - <dd>the sum of a margin box's left and right margins, left and right |
1421 | | - border widths, left and right padding, and <a |
1422 | | - href="http://www.w3.org/TR/CSS21/visudet.html#float-width">preferred |
1423 | | - minimum width</a>. |
| 1420 | + <dd>Like the <a href="#outer-width"><i>outer width</i></a>, except that |
| 1421 | + <a href="http://www.w3.org/TR/css3-sizing/#max-content">‘<code |
| 1422 | + class=css>max-content</code>’</a> is used when ‘<code |
| 1423 | + class=property>width</code>’ is ‘<code class=css>auto</code>’. |
1424 | 1424 | </dl> |
1425 | 1425 |
|
1426 | 1426 | <p>The <dfn id=containing-block>containing block</dfn> for a corner margin |
@@ -1466,132 +1466,133 @@ <h4 id=margin-dimension><span class=secno>6.3.2. </span>Margin Box |
1466 | 1466 | are replaced by empty boxes with all properties set to their initial |
1467 | 1467 | values. In particular, margins, border widths and padding are all zero. |
1468 | 1468 |
|
1469 | | - <p class=note> Note: The high-level goals are, in order of priority, to |
| 1469 | + <p class=note> Note: The high-level goals are (in order of priority) to |
1470 | 1470 | center the middle box (B) if it is generated, to minimize overflow and |
1471 | 1471 | overlap, and to distribute space proportionally to the amount of content. |
1472 | 1472 |
|
1473 | 1473 | <ul> |
1474 | 1474 | <li>If B is not <a href="#generated"><em>generated</em></a>: |
1475 | 1475 | <ul> |
1476 | 1476 | <li>If both A’s and C’s widths are ‘<code |
1477 | | - class=property>auto</code>’ |
| 1477 | + class=css>auto</code>’ |
1478 | 1478 | <ul> |
1479 | | - <li>If the sum of their preferred outer widths is less than or equal |
1480 | | - to the width of the containing block, their used width are their |
1481 | | - respective preferred widths. |
| 1479 | + <li>If the sum of their <a href="#outer-max-content"><em>outer |
| 1480 | + max-content</em></a> is less than or equal to <a |
| 1481 | + href="#max-box-width"><var>max box width</var></a>, the used width |
| 1482 | + for A and C is the respective ‘<code |
| 1483 | + class=css>max-content</code>’. |
1482 | 1484 |
|
1483 | 1485 | <li>Otherwise, |
1484 | 1486 | <ul> |
1485 | | - <li>The remaining width is the containing block’s with minus |
1486 | | - A’s and C’s outer preferred minimum widths. |
1487 | | - |
1488 | | - <li>If the remaining width is negative or zero, the used widths for |
1489 | | - A and C are their respective preferred minimum widths. |
1490 | | - |
1491 | | - <li>Otherwise, |
1492 | | - <ul> |
1493 | | - <li>The respective weights for A and C are the preferred width |
1494 | | - minus the preferred minimum width |
1495 | | - |
1496 | | - <li>The respective used widths for A and C are: <em>preferred |
1497 | | - minimum width + (remaining width × weight ÷ sum of both |
1498 | | - weights)</em> |
1499 | | - </ul> |
1500 | | - (In other words, the preferred minimum widths are increased by |
1501 | | - distributing the remaining width proportionally to the weights.) |
1502 | | - Note: weights by definition can not be negative, and this rule |
1503 | | - only applies when at least one of them is greater than zero: this |
1504 | | - rule never needs to divide by zero. |
| 1487 | + <li>Let <var>remaining width</var> be <a |
| 1488 | + href="#max-box-width"><var>max box width</var></a> minus A’s and |
| 1489 | + C’s <a href="#outer-min-content"><var>outer |
| 1490 | + min-content</var></a> |
| 1491 | + |
| 1492 | + <li>If <var>remaining width</var> is negative or zero, the used |
| 1493 | + widths for A and C are the respective ‘<code |
| 1494 | + class=css>min-content</code>’. |
| 1495 | + |
| 1496 | + <li>Otherwise, the respective used widths for A and C are: |
| 1497 | + <code>min-content + (<var>remaining width</var> × weight ÷ sum |
| 1498 | + of both weights)</code>, where the respective weights are ‘<code |
| 1499 | + class=css>max-content</code>’ minus ‘<code |
| 1500 | + class=css>min-content</code>’. |
1505 | 1501 | </ul> |
| 1502 | + |
| 1503 | + <p class=note>Note: Each box gets at least ‘<code |
| 1504 | + class=css>min-content</code>’. The remaining space, if any, is |
| 1505 | + distributed proportionally to ‘<code |
| 1506 | + class=css>max-content</code>’ minus ‘<code |
| 1507 | + class=css>min-content</code>’. The rules are construted to never |
| 1508 | + divide by zero. |
1506 | 1509 | </ul> |
1507 | | - </ul> |
1508 | 1510 |
|
1509 | | - <ul> |
1510 | | - <li>Otherwise, if A’s width is ‘<code |
1511 | | - class=property>auto</code>’, its used width is the "shrink-to-fit" |
1512 | | - width with the available width set to: |
| 1511 | + <li>Otherwise, if A’s width is ‘<code class=css>auto</code>’, the |
| 1512 | + used width is <code>min(max-content, max(min-content, |
| 1513 | + available))</code> where <var>available</var> is: |
1513 | 1514 | <ul> |
1514 | | - <li>the containing block’s width |
| 1515 | + <li><a href="#max-box-width"><var>max box width</var></a> |
1515 | 1516 |
|
1516 | | - <li>minus the C’s outer width |
| 1517 | + <li>minus C’s <a href="#outer-width"><i>outer width</i></a> |
1517 | 1518 |
|
1518 | | - <li>minus the A’s own margins, borders and padding |
| 1519 | + <li>minus A’s own margins, borders and padding |
1519 | 1520 | </ul> |
1520 | 1521 |
|
1521 | | - <li>Otherwise, if C’s width is ‘<code |
1522 | | - class=property>auto</code>’, its used width is the "shrink-to-fit" |
1523 | | - width with the available width set to: |
| 1522 | + <li>Otherwise, if C’s width is ‘<code class=css>auto</code>’, the |
| 1523 | + used width is <code>min(max-content, max(min-content, |
| 1524 | + available))</code> where <var>available</var> is: |
1524 | 1525 | <ul> |
1525 | | - <li>the containing block’s width |
| 1526 | + <li><a href="#max-box-width"><var>max box width</var></a> |
1526 | 1527 |
|
1527 | | - <li>minus the A’s outer width |
| 1528 | + <li>minus A’s <a href="#outer-width"><i>outer width</i></a> |
1528 | 1529 |
|
1529 | | - <li>minus the C’s own margins, borders and padding |
| 1530 | + <li>minus C’s own margins, borders and padding |
1530 | 1531 | </ul> |
1531 | 1532 | </ul> |
1532 | 1533 |
|
1533 | 1534 | <li>Otherwise (if B is generated) |
1534 | 1535 | <ul> |
1535 | | - <li>If B’s width is ‘<code class=property>auto</code>’ |
| 1536 | + <li>If B’s width is ‘<code class=css>auto</code>’ |
1536 | 1537 | <ul> |
1537 | | - <li>Define AC-minimum as twice the greater of A’s and C’s |
1538 | | - preferred minimum outer width, and AC-preferred as twice the greater |
1539 | | - of their preferred outer width. |
| 1538 | + <li>Let <var>AC-min</var> be <code>2 × max(A’s outer min-content, |
| 1539 | + C’s outer min-content)</code>. |
| 1540 | + |
| 1541 | + <li>Let <var>AC-max</var> be <code>2 × max(A’s outer max-content, |
| 1542 | + C’s outer max-content)</code>. |
1540 | 1543 |
|
1541 | | - <li>If B’s preferred minimum outer width plus AC-minimum is greater |
1542 | | - than the width of the containing block, the used width for B is its |
1543 | | - preferred minimum width. |
| 1544 | + <li>If B’s <a href="#outer-max-content"><i>outer |
| 1545 | + max-content</i></a> is less than or equal to <a |
| 1546 | + href="#max-box-width"><i>max box width</i></a> minus |
| 1547 | + <var>AC-max</var>, the used width for B is ‘<code |
| 1548 | + class=css>max-content</code>’. |
| 1549 | + |
| 1550 | + <li>Otherwise, if B’s <a href="#outer-min-content"><i>outer |
| 1551 | + min-content</i></a> is greater than <a href="#max-box-width"><i>max |
| 1552 | + box width</i></a> minus <var>AC-min</var>, the used width for B is |
| 1553 | + ‘<code class=css>min-content</code>’. |
1544 | 1554 |
|
1545 | 1555 | <li>Otherwise, |
1546 | 1556 | <ul> |
1547 | | - <li>The remaining width is the containing block’s with minus |
1548 | | - AC-minimum minus B’s outer preferred minimum width. |
1549 | | - |
1550 | | - <li>If the remaining width is negative or zero, the used widths for |
1551 | | - B is the preferred minimum width. |
1552 | | - |
1553 | | - <li>Otherwise, |
1554 | | - <ul> |
1555 | | - <li>The weight for B is its preferred width minus its preferred |
1556 | | - minimum width. The weight for AC is AC-preferred minus |
1557 | | - AC-minimum. |
1558 | | - |
1559 | | - <li>The used width for B is: <em>preferred minimum width + |
1560 | | - (remaining width × weight ÷ sum of both weights)</em> |
1561 | | - </ul> |
1562 | | - (In other words, the preferred minimum width is increased by a |
1563 | | - portion of the remaining width proportional to the relative |
1564 | | - weight.) Note: weights by definition can not be negative, and this |
1565 | | - rule only applies when at least one of them is greater than zero: |
1566 | | - this rule never needs to divide by zero. |
| 1557 | + <li>Let the weight for B be ‘<code |
| 1558 | + class=css>max-content</code>’ minus ‘<code |
| 1559 | + class=css>min-content</code>’. |
| 1560 | + |
| 1561 | + <li>Let the weight for AC be <var>AC-max</var> minus |
| 1562 | + <var>AC-min</var> |
| 1563 | + |
| 1564 | + <li>The used width for B is: <code>min-content + (remaining × |
| 1565 | + weight ÷ sum of both weights)</code>, where <var>remaining</var> |
| 1566 | + is <a href="#max-box-width"><i>max box width</i></a> minus |
| 1567 | + <var>AC-min</var> minus B’s <a |
| 1568 | + href="#outer-min-content"><i>outer min-content</i></a>. |
1567 | 1569 | </ul> |
1568 | 1570 | </ul> |
1569 | 1571 |
|
1570 | | - <li>If A’s width is ‘<code class=property>auto</code>’, the used |
1571 | | - width is the "shrink-to-fit" width with the available width set to: |
| 1572 | + <li>Then, if A’s width is ‘<code class=css>auto</code>’, the used |
| 1573 | + width is <code>min(max-content, max(min-content, available))</code> |
| 1574 | + where <var>available</var> is: |
1572 | 1575 | <ul> |
1573 | | - <li>half of the containing block’s width |
| 1576 | + <li>half of <a href="#max-box-width"><var>max box width</var></a> |
1574 | 1577 |
|
1575 | | - <li>minus half of the outer width of B. |
| 1578 | + <li>minus half of B’s <a href="#outer-width"><i>outer width</i></a> |
1576 | 1579 |
|
1577 | 1580 | <li>minus the A’s own margins, borders and padding |
1578 | 1581 | </ul> |
1579 | 1582 |
|
1580 | | - <li>If C’s width is ‘<code class=property>auto</code>’, the used |
1581 | | - width is the "shrink-to-fit" width with the available width set to: |
| 1583 | + <li>Then, if C’s width is ‘<code class=css>auto</code>’, the used |
| 1584 | + width is <code>min(max-content, max(min-content, available))</code> |
| 1585 | + where <var>available</var> is: |
1582 | 1586 | <ul> |
1583 | | - <li>half of the containing block’s width |
| 1587 | + <li>half of <a href="#max-box-width"><var>max box width</var></a> |
1584 | 1588 |
|
1585 | | - <li>minus half of the outer width of B. |
| 1589 | + <li>minus half of B’s <a href="#outer-width"><i>outer width</i></a> |
1586 | 1590 |
|
1587 | 1591 | <li>minus the C’s own margins, borders and padding |
1588 | 1592 | </ul> |
1589 | 1593 | </ul> |
1590 | 1594 | </ul> |
1591 | 1595 |
|
1592 | | - <p class=note> Note: By their definitions, margins can be negative, but |
1593 | | - widths cannot. |
1594 | | - |
1595 | 1596 | <p>The used values for ‘<code class=property>bottom-left</code>’, |
1596 | 1597 | ‘<code class=property>bottom-center</code>’ and ‘<code |
1597 | 1598 | class=property>bottom-right</code>’ margin boxes are established by the |
|
0 commit comments