Skip to content

Commit 91e909a

Browse files
committed
Add another degenerate case for r-g to handle circles, as they're currently discontinuous in a fixable way.
1 parent 3614abc commit 91e909a

2 files changed

Lines changed: 11 additions & 0 deletions

File tree

css3-images/Overview.html

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1212,6 +1212,14 @@ <h4 class=no-toc id=degenerate-radials><span class=secno>4.2.3. </span>
12121212
degenerate cases, the gradient must be be rendered as follows:
12131213

12141214
<dl>
1215+
<dt>If the <a href="#ending-shape"><i>ending shape</i></a> is a circle
1216+
with zero width or height:
1217+
1218+
<dd>Render as if the <a href="#ending-shape"><i>ending shape</i></a> was a
1219+
circle whose radius was an arbitrary very small number greater than zero.
1220+
<span class=note>This will make the gradient continue to look like a
1221+
circle.</span>
1222+
12151223
<dt>If the <a href="#ending-shape"><i>ending shape</i></a> has zero width
12161224
(regardless of the height):
12171225

css3-images/Overview.src.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,9 @@ <h4 class="no-toc" id="degenerate-radials">
747747
be rendered as follows:</p>
748748

749749
<dl>
750+
<dt>If the <i>ending shape</i> is a circle with zero width or height:</dt>
751+
<dd>Render as if the <i>ending shape</i> was a circle whose radius was an arbitrary very small number greater than zero. <span class='note'>This will make the gradient continue to look like a circle.</span></dd>
752+
750753
<dt>If the <i>ending shape</i> has zero width (regardless of the height):</dt>
751754
<dd>Render as if the <i>ending shape</i> was an ellipse whose height was an arbitrary very large number and whose width was an arbitrary very small number greater than zero. <span class='note'>This will make the gradient look similar to a horizontal linear gradient that is mirrored across the center of the ellipse. It also means that all color-stop positions specified with a percentage resolve to ''0px''.</span></dd>
752755

0 commit comments

Comments
 (0)