@@ -1553,14 +1553,15 @@ Mathematical Expressions: ''calc()''</h3>
15531553 </div>
15541554
15551555 <div class='example'>
1556- The following example stacks two centered background images,
1557- with one offset slightly from the other.
1556+ The following example stacks two background images,
1557+ with the first perfectly centered
1558+ and the second offset 20px to the bottom and to the left of the first.
15581559
15591560 <pre>
15601561 .foo {
15611562 background: url(top.png), url(bottom.png);
15621563 background-repeat: no-repeat;
1563- background-position: calc(50% + 20px) calc(50% + 20px), 50% 50% ;
1564+ background-position: 50% 50%, calc(50% + 20px) calc(50% + 20px);
15641565 }
15651566 </pre>
15661567 </div>
@@ -1715,24 +1716,14 @@ Computed Value</h4>
17151716 they apply whenever a ''calc()'' expression contains percentages.
17161717
17171718 <div class='example'>
1718- For example, 'background-position' has special behavior for percentage values, different from lengths:
1719-
1720- <pre>
1721- .foo {
1722- width: 200px;
1723- background-image: url(bg.png);
1724- background-position: left 50%;
1725- /* different than: */
1726- background-position: left 100px;
1727- /* despite 50% of 200px being 100px */
1728- }
1729- </pre>
1719+ For example,
1720+ whereas 'font-size' computes percentage values at <a>computed value time</a>
1721+ so that <a>font-relative length</a> units can be computed,
1722+ 'background-position' has layout-dependent behavior for percentage values,
1723+ and thus does not resolve percentages until used-value time.
17301724
1731- Due to this, 'background-position' preserves the percentage in a ''calc()''
1732- rather than resolving it directly into a length,
1733- so that an expression like ''background-position: left calc(50% + 20px) center''
1734- properly centers the background and then shifts it ''20px'' to the right,
1735- rather than placing its <em> left edge</em> 20px off of center.
1725+ Due to this, 'background-position' computation preserves the percentage in a ''calc()''
1726+ whereas 'font-size' will compute such expressions directly into a length.
17361727 </div>
17371728
17381729 <!-- http://lists.w3.org/Archives/Public/www-style/2010May/0001.html
@@ -2169,6 +2160,8 @@ Changes</h2>
21692160 <ins> unless otherwise specified,</ins>
21702161 the declaration is invalid and must be <a href="https://www.w3.org/TR/CSS21/conform.html#ignore">ignored</a> .
21712162 </blockquote>
2163+ <li> Fixed some 'background-position' examples to be less confusing.
2164+ (<a href="https://github.com/w3c/csswg-drafts/issues/3482#issuecomment-453257033">Issue 3482</a> )
21722165 </ul>
21732166
21742167 Changes since the <a href="https://www.w3.org/TR/2016/CR-css-values-3-20160929/">29 September 2016 Candidate Recommendation</a> are:
0 commit comments