|
22 | 22 |
|
23 | 23 | <h1>CSS Backgrounds and Borders Module Level 3</h1> |
24 | 24 |
|
25 | | - <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 07 October |
26 | | - 2009</h2> |
| 25 | + <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 7 October 2009</h2> |
27 | 26 |
|
28 | 27 | <dl> |
29 | 28 | <dt>This version: |
@@ -1452,9 +1451,29 @@ <h3 id=the-background-size><span class=secno>3.9 </span>The ‘<code |
1452 | 1451 | <var>W</var> is the width of the background positioning area, then the |
1453 | 1452 | rounded width <var>X'</var> = <var>W</var> / round(<var>W</var> / |
1454 | 1453 | <var>X</var>) where round() is a function that returns the nearest |
1455 | | - natural number. |
| 1454 | + natural number (integer greater than zero). |
1456 | 1455 | </blockquote> |
1457 | 1456 |
|
| 1457 | + <p class=issue>This will round to the nearest whole number of tiles, which |
| 1458 | + keeps closer to the intended size and, in the case where one dimension is |
| 1459 | + fixed (e.g. in ‘<code class=property><a |
| 1460 | + href="#border-image">border-image</a></code>’), keeps the image |
| 1461 | + closer to the intended aspect ratio. This is almost certainly the best |
| 1462 | + solution for vector images and high-resolution raster images. However, if |
| 1463 | + the given image is a low-resolution raster image, it will require |
| 1464 | + interpolating pixels, which can look bad. See <a |
| 1465 | + href="http://www.bradclicks.com/cssplay/border-image/round-test1.html">Rounding |
| 1466 | + Extremes</a> for illustrations. The workaround is to specify a |
| 1467 | + higher-resolution image (e.g. by shrinking with ‘<code |
| 1468 | + class=property><a |
| 1469 | + href="#background-size">background-size</a></code>’ or ‘<code |
| 1470 | + class=property><a |
| 1471 | + href="#border-image-width">border-image-width</a></code>’). Possible |
| 1472 | + spec solutions include introducing a separate keyword that always scales |
| 1473 | + down, or to change the algorithm so that we force scaling down when |
| 1474 | + interpolation would be required for scaling up. The CSSWG is looking for |
| 1475 | + feedback on this issue. |
| 1476 | + |
1458 | 1477 | <p>If ‘<code class=property><a |
1459 | 1478 | href="#background-repeat">background-repeat</a></code>’ is |
1460 | 1479 | ‘<code class=css>round</code>’ for one dimension only and if |
|
0 commit comments