Skip to content

Commit 750a64a

Browse files
committed
[css-backgrounds] Handle errors in spread radius formula.
--HG-- extra : rebase_source : 1546e3c442de5fd9cab03832d05497c66bd7def0
1 parent 83e8016 commit 750a64a

5 files changed

Lines changed: 121 additions & 54 deletions

File tree

css-backgrounds/Overview.html

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
<meta content="CSS Backgrounds and Borders Module Level 3"
1313
name=dcterms.title>
1414
<meta content=text name=dcterms.type>
15-
<meta content=2014-01-28 name=dcterms.date>
15+
<meta content=2014-03-31 name=dcterms.date>
1616
<meta content="Bert Bos" name=dcterms.creator>
1717
<meta content="Elika J. Etemad" name=dcterms.creator>
1818
<meta content="Brad Kemper" name=dcterms.creator>
@@ -42,7 +42,7 @@
4242

4343
<h1>CSS Backgrounds and Borders Module Level 3</h1>
4444

45-
<h2 class="no-num no-toc">Editor's Draft 28 January 2014</h2>
45+
<h2 class="no-num no-toc">Editor's Draft 31 March 2014</h2>
4646

4747
<dl>
4848
<dt>This version:
@@ -4108,7 +4108,9 @@ <h4 id=shadow-shape><span class=secno>7.1.1. </span> Shadow Shape, Spread,
41084108
radii of the spread shadow shape. For example, if the border radius is
41094109
10px and the <a href="#spread-distance"><i>spread distance</i></a> is 20px
41104110
(<var>r</var> = .5), the corner radius of the shadow shape will be 10px +
4111-
20px×(1 + (.5 - 1)<sup>3</sup>.
4111+
20px×(1 + (.5 - 1)<sup>3</sup>) = 27.5px. This adjustment is applied
4112+
independently in each dimension, and does not apply to negative spread
4113+
distances.
41124114

41134115
<p>The ‘<a href="#border-image"><code
41144116
class=property>border-image</code></a>’ does not affect the shape of the
@@ -4768,8 +4770,8 @@ <h3 class=no-num id=normative-references> Normative References</h3>
47684770
<dt id=ref-RFC2119>[RFC2119]
47694771

47704772
<dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
4771-
words for use in RFCs to Indicate Requirement Levels.</cite></a> Internet
4772-
RFC 2119. URL: <a
4773+
words for use in RFCs to Indicate Requirement Levels.</cite></a> RFC
4774+
2119. URL: <a
47734775
href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
47744776
</dd>
47754777
<!---->
@@ -4806,10 +4808,10 @@ <h3 class=no-num id=other-references> Other References</h3>
48064808
<dt id=ref-CSS-SHAPES>[CSS-SHAPES]
48074809

48084810
<dd>Vincent Hardy; Rossen Atanassov; Alan Stearns. <a
4809-
href="http://www.w3.org/TR/2013/WD-css-shapes-1-20130620/"><cite>CSS
4810-
Shapes Module Level 1.</cite></a> 20 June 2013. W3C Working Draft. URL:
4811-
<a
4812-
href="http://www.w3.org/TR/2013/WD-css-shapes-1-20130620/">http://www.w3.org/TR/2013/WD-css-shapes-1-20130620/</a>
4811+
href="http://www.w3.org/TR/2014/WD-css-shapes-1-20140211/"><cite>CSS
4812+
Shapes Module Level 1.</cite></a> 11 February 2014. W3C Last Call Working
4813+
Draft. (Work in progress.) URL: <a
4814+
href="http://www.w3.org/TR/2014/WD-css-shapes-1-20140211/">http://www.w3.org/TR/2014/WD-css-shapes-1-20140211/</a>
48134815
</dd>
48144816
<!---->
48154817

@@ -4826,10 +4828,10 @@ <h3 class=no-num id=other-references> Other References</h3>
48264828
<dt id=ref-CSS3-BREAK>[CSS3-BREAK]
48274829

48284830
<dd>Rossen Atanassov; Elika J. Etemad. <a
4829-
href="http://www.w3.org/TR/2012/WD-css3-break-20120823/"><cite>CSS
4830-
Fragmentation Module Level 3.</cite></a> 23 August 2012. W3C Working
4831+
href="http://www.w3.org/TR/2014/WD-css3-break-20140116/"><cite>CSS
4832+
Fragmentation Module Level 3.</cite></a> 16 January 2014. W3C Working
48314833
Draft. (Work in progress.) URL: <a
4832-
href="http://www.w3.org/TR/2012/WD-css3-break-20120823/">http://www.w3.org/TR/2012/WD-css3-break-20120823/</a>
4834+
href="http://www.w3.org/TR/2014/WD-css3-break-20140116/">http://www.w3.org/TR/2014/WD-css3-break-20140116/</a>
48334835
</dd>
48344836
<!---->
48354837

css-backgrounds/Overview.src.html

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2981,7 +2981,9 @@ <h4 id="shadow-shape">
29812981
the <i>spread distance</i> is multiplied by the proportion 1 + (<var>r</var>-1)<sup>3</sup>
29822982
in calculating the corner radii of the spread shadow shape.
29832983
For example, if the border radius is 10px and the <i>spread distance</i> is 20px (<var>r</var> = .5),
2984-
the corner radius of the shadow shape will be 10px + 20px&times;(1 + (.5 - 1)<sup>3</sup>.
2984+
the corner radius of the shadow shape will be 10px + 20px&times;(1 + (.5 - 1)<sup>3</sup>) = 27.5px.
2985+
This adjustment is applied independently to the radii in each dimension,
2986+
and does not apply to negative spread distances.
29852987

29862988
<p>The 'border-image' does not affect the shape of the box-shadow.
29872989

Lines changed: 54 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN">
2-
<title>CSS Backgrounds and Borders Level 3 Disposition of Comments for 2014-02-04 LCWD</title>
2+
<title>CSS Backgrounds and Borders Level 3 Disposition of Comments for 2014-01-16 LCWD</title>
33
<style type="text/css">
44
.a { background: lightgreen }
55
.d { background: lightblue }
@@ -9,9 +9,9 @@
99
:target { box-shadow: 0.25em 0.25em 0.25em; }
1010
</style>
1111

12-
<h1>CSS Backgrounds and Borders Level 3 Disposition of Comments for 2014-02-04 LCWD</h1>
12+
<h1>CSS Backgrounds and Borders Level 3 Disposition of Comments for 2014-01-16 LCWD</h1>
1313

14-
<p>Last call document: <a href="http://www.w3.org/TR/2014/WD-css3-background-20140204/">http://www.w3.org/TR/2014/WD-css3-background-20140204/</a>
14+
<p>Last call document: <a href="http://www.w3.org/TR/2014/WD-css3-background-20140116/">http://www.w3.org/TR/2014/WD-css3-background-20140116/</a>
1515

1616
<p>Editor's draft: <a href="http://dev.w3.org/csswg/css3-background/">http://dev.w3.org/csswg/css3-background/</a>
1717

@@ -30,30 +30,63 @@ <h1>CSS Backgrounds and Borders Level 3 Disposition of Comments for 2014-02-04 L
3030
<p>An issue can be closed as <code>Accepted</code>, <code>OutOfScope</code>,
3131
<code>Invalid</code>, <code>Rejected</code>, or <code>Retracted</code>.
3232
<code>Verified</code> indicates commentor's acceptance of the response.</p>
33-
<pre class='oi' id='issue-1'>
33+
<pre class='open' id='issue-1'>
3434
Issue 1. <a href="#issue-1">#</a>
35-
Summary: Add start/end keywords to background-position
36-
From: i18nWG
37-
Comment: <a href="http://lists.w3.org/Archives/Public/www-style/2014Feb/0619.html">http://lists.w3.org/Archives/Public/www-style/2014Feb/0619.html</a>
38-
Response: <a href="http://lists.w3.org/Archives/Public/www-style/2014Mar/0124.html">http://lists.w3.org/Archives/Public/www-style/2014Mar/0124.html</a>
39-
Closed: OutOfScope
35+
Summary: Inconsistencies in background-position shorthand examples
36+
From: Stewart Brodie
37+
Comment: <a href="http://www.w3.org/mid/gemini.n0mnze00h7xm70dj5.sbrodie@espial.com">http://www.w3.org/mid/gemini.n0mnze00h7xm70dj5.sbrodie@espial.com</a>
38+
Response:
39+
Open
4040
Verified:
41+
Resolved:
4142
</pre>
42-
<pre class='oi' id='issue-2'>
43+
<pre class='open' id='issue-2'>
4344
Issue 2. <a href="#issue-2">#</a>
44-
Summary: Add logical border properties
45-
From: i18nWG
46-
Comment: <a href="http://lists.w3.org/Archives/Public/www-style/2014Feb/0620.html">http://lists.w3.org/Archives/Public/www-style/2014Feb/0620.html</a>
47-
Response: <a href="http://lists.w3.org/Archives/Public/www-style/2014Mar/0125.html">http://lists.w3.org/Archives/Public/www-style/2014Mar/0125.html</a>
48-
Closed: OutOfScope
45+
Summary: Clarify that color clips with bottom layer, even if no image.
46+
From: Stewart Brodie
47+
Comment: <a href="http://www.w3.org/mid/gemini.n1587i00ew64g00mj.sbrodie@espial.com">http://www.w3.org/mid/gemini.n1587i00ew64g00mj.sbrodie@espial.com</a>
48+
Response:
49+
Open
4950
Verified:
51+
Resolved:
5052
</pre>
51-
<pre class='a' id='issue-2'>
52-
Issue 2. <a href="#issue-2">#</a>
53+
<pre class='a' id='issue-3'>
54+
Issue 3. <a href="#issue-3">#</a>
5355
Summary: Restore box-decoration-break
54-
From: i18nWG
55-
Comment: <a href="http://lists.w3.org/Archives/Public/www-style/2014Mar/0044.html">http://lists.w3.org/Archives/Public/www-style/2014Mar/0044.html</a>
56-
Response: <a href="http://lists.w3.org/Archives/Public/www-style/2014Mar/0091.html">http://lists.w3.org/Archives/Public/www-style/2014Mar/0091.html</a>
56+
From:
57+
Comment: <a href="http://www.w3.org/mid/CACQ=j+fCg8su8eRCNT=Az9NXTWRmcQhsFva-jqNgjKeBoYKEng@mail.gmail.com">http://www.w3.org/mid/CACQ=j+fCg8su8eRCNT=Az9NXTWRmcQhsFva-jqNgjKeBoYKEng@mail.gmail.com</a>
58+
Response: <a href="http://www.w3.org/mid/5316DD28.8010202@inkedblade.net">http://www.w3.org/mid/5316DD28.8010202@inkedblade.net</a>
5759
Closed: Rejected
58-
Verified: <a href="http://lists.w3.org/Archives/Public/www-style/2014Mar/0102.html">http://lists.w3.org/Archives/Public/www-style/2014Mar/0102.html</a>
60+
Verified: <a href="http://www.w3.org/mid/CACQ=j+cW+_cg+VfGYWiyPnL42rBB27XWPDkH3hGGDVBuJ7ym5A@mail.gmail.com">http://www.w3.org/mid/CACQ=j+cW+_cg+VfGYWiyPnL42rBB27XWPDkH3hGGDVBuJ7ym5A@mail.gmail.com</a>
61+
Resolved: Editor's discretion
62+
</pre>
63+
<pre class='a' id='issue-4'>
64+
Issue 4. <a href="#issue-4">#</a>
65+
Summary: Add logical border-side properties
66+
From: i18nWG
67+
Comment: <a href="http://www.w3.org/mid/E1WGbaC-0002uZ-7V@shauna.w3.org">http://www.w3.org/mid/E1WGbaC-0002uZ-7V@shauna.w3.org</a>
68+
Response: <a href="http://www.w3.org/mid/5317EAAC.3020507@inkedblade.net">http://www.w3.org/mid/5317EAAC.3020507@inkedblade.net</a>
69+
Closed: Deferred to L4
70+
Verified: <a href="http://www.w3.org/mid/7C0AF84C6D560544A17DDDEB68A9DFB517D9C5E8@ex10-mbx-36009.ant.amazon.com">http://www.w3.org/mid/7C0AF84C6D560544A17DDDEB68A9DFB517D9C5E8@ex10-mbx-36009.ant.amazon.com</a>
71+
Resolved: CR feature deference policy
72+
</pre>
73+
<pre class='a' id='issue-5'>
74+
Issue 5. <a href="#issue-5">#</a>
75+
Summary: Add logical keywords to background-position
76+
From: i18nWG
77+
Comment: <a href="http://www.w3.org/mid/E1WGbXF-0002yo-CT@stuart.w3.org">http://www.w3.org/mid/E1WGbXF-0002yo-CT@stuart.w3.org</a>
78+
Response: <a href="http://www.w3.org/mid/5317EA59.7020500@inkedblade.net">http://www.w3.org/mid/5317EA59.7020500@inkedblade.net</a>
79+
Closed: Deferred to L4
80+
Verified: <a href="http://www.w3.org/mid/7C0AF84C6D560544A17DDDEB68A9DFB517D9C64A@ex10-mbx-36009.ant.amazon.com">http://www.w3.org/mid/7C0AF84C6D560544A17DDDEB68A9DFB517D9C64A@ex10-mbx-36009.ant.amazon.com</a>
81+
Resolved: CR feature deference policy
82+
</pre>
83+
<pre class='open' id='issue-1'>
84+
Issue 1. <a href="#issue-1">#</a>
85+
Summary: Fixes to box-shadow spread formula
86+
From: Matt Rakow
87+
Comment: <a href="http://www.w3.org/mid/b4bcb3ecb1f84db5878dee89b3263622@BL2PR03MB260.namprd03.prod.outlook.com">http://www.w3.org/mid/b4bcb3ecb1f84db5878dee89b3263622@BL2PR03MB260.namprd03.prod.outlook.com</a>
88+
Response:
89+
Open
90+
Verified:
91+
Resolved:
5992
</pre>

css-backgrounds/issues-lc-2014.txt

Lines changed: 46 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,58 @@
1-
Draft: http://www.w3.org/TR/2014/WD-css3-background-20140204/
1+
Draft: http://www.w3.org/TR/2014/WD-css3-background-20140116/
22
Title: CSS Backgrounds and Borders Level 3
33

44
----
55
Issue 1.
6-
Summary: Add start/end keywords to background-position
7-
From: i18nWG
8-
Comment: http://lists.w3.org/Archives/Public/www-style/2014Feb/0619.html
9-
Response: http://lists.w3.org/Archives/Public/www-style/2014Mar/0124.html
10-
Closed: OutOfScope
6+
Summary: Inconsistencies in background-position shorthand examples
7+
From: Stewart Brodie
8+
Comment: http://www.w3.org/mid/gemini.n0mnze00h7xm70dj5.sbrodie@espial.com
9+
Response:
10+
Open
1111
Verified:
12+
Resolved:
1213
----
1314
Issue 2.
14-
Summary: Add logical border properties
15-
From: i18nWG
16-
Comment: http://lists.w3.org/Archives/Public/www-style/2014Feb/0620.html
17-
Response: http://lists.w3.org/Archives/Public/www-style/2014Mar/0125.html
18-
Closed: OutOfScope
15+
Summary: Clarify that color clips with bottom layer, even if no image.
16+
From: Stewart Brodie
17+
Comment: http://www.w3.org/mid/gemini.n1587i00ew64g00mj.sbrodie@espial.com
18+
Response:
19+
Open
1920
Verified:
21+
Resolved:
2022
----
21-
Issue 2.
23+
Issue 3.
2224
Summary: Restore box-decoration-break
23-
From: i18nWG
24-
Comment: http://lists.w3.org/Archives/Public/www-style/2014Mar/0044.html
25-
Response: http://lists.w3.org/Archives/Public/www-style/2014Mar/0091.html
25+
From:
26+
Comment: http://www.w3.org/mid/CACQ=j+fCg8su8eRCNT=Az9NXTWRmcQhsFva-jqNgjKeBoYKEng@mail.gmail.com
27+
Response: http://www.w3.org/mid/5316DD28.8010202@inkedblade.net
2628
Closed: Rejected
27-
Verified: http://lists.w3.org/Archives/Public/www-style/2014Mar/0102.html
29+
Verified: http://www.w3.org/mid/CACQ=j+cW+_cg+VfGYWiyPnL42rBB27XWPDkH3hGGDVBuJ7ym5A@mail.gmail.com
30+
Resolved: Editor's discretion
31+
----
32+
Issue 4.
33+
Summary: Add logical border-side properties
34+
From: i18nWG
35+
Comment: http://www.w3.org/mid/E1WGbaC-0002uZ-7V@shauna.w3.org
36+
Response: http://www.w3.org/mid/5317EAAC.3020507@inkedblade.net
37+
Closed: Deferred to L4
38+
Verified: http://www.w3.org/mid/7C0AF84C6D560544A17DDDEB68A9DFB517D9C5E8@ex10-mbx-36009.ant.amazon.com
39+
Resolved: CR feature deference policy
40+
----
41+
Issue 5.
42+
Summary: Add logical keywords to background-position
43+
From: i18nWG
44+
Comment: http://www.w3.org/mid/E1WGbXF-0002yo-CT@stuart.w3.org
45+
Response: http://www.w3.org/mid/5317EA59.7020500@inkedblade.net
46+
Closed: Deferred to L4
47+
Verified: http://www.w3.org/mid/7C0AF84C6D560544A17DDDEB68A9DFB517D9C64A@ex10-mbx-36009.ant.amazon.com
48+
Resolved: CR feature deference policy
49+
----
50+
Issue 1.
51+
Summary: Fixes to box-shadow spread formula
52+
From: Matt Rakow
53+
Comment: http://www.w3.org/mid/b4bcb3ecb1f84db5878dee89b3263622@BL2PR03MB260.namprd03.prod.outlook.com
54+
Response:
55+
Open
56+
Verified:
57+
Resolved:
2858
----

css-backgrounds/spread-radius.html

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
}
1616

1717
.box > div {
18-
background: yellow;
18+
background: rgba(100%, 100%, 0%, 0.5);
1919
width: 100px;
2020
height: 100px;
2121
}
@@ -47,7 +47,7 @@ <h1>box-shadow spread rounding</h1>
4747
<form>
4848
<label>
4949
Spread:
50-
<input type="range" id="spread" value="40" />
50+
<input type="range" id="spread" value="40" min="-40"/>
5151
</label>
5252

5353
<label>
@@ -277,7 +277,7 @@ <h1>box-shadow spread rounding</h1>
277277
};
278278

279279
Box.spreadRounding = function(r, spread) {
280-
var ratio = (r/spread) < 1 ? Box.ratio(r/spread) : 1;
280+
var ratio = Math.abs(r/spread) < 1 ? Box.ratio(Math.abs(r/spread)) : 1;
281281

282282
return r + spread * ratio;
283283
};
@@ -407,4 +407,4 @@ <h1>box-shadow spread rounding</h1>
407407
</script>
408408

409409
</body>
410-
</html>
410+
</html>

0 commit comments

Comments
 (0)