Skip to content

Commit

Permalink
[css-backrounds-3] Explicitly mention continuity as rationale for rad…
Browse files Browse the repository at this point in the history
…ius adjustment formula. #1900.
  • Loading branch information
fantasai committed Feb 14, 2018
1 parent 26fa2f7 commit f885ef0
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions css-backgrounds-3/Overview.bs
Original file line number Diff line number Diff line change
Expand Up @@ -2018,7 +2018,8 @@ the inner curve will not be a full quarter ellipse.</p>

<p>The margin edge, being outside the border edge, calculates its radius
by <em>adding</em> the corresponding margin thickness to each border radius.
However, in order to create a sharper corner when the border radius is small,
However, in order to create a sharper corner when the border radius is small
(and thus ensure continuity between round and sharp corners),
when the <i>border radius</i> is less than the margin,
the margin is multiplied by the proportion 1 + (<var>r</var>-1)<sup>3</sup>,
where <var>r</var> is the ratio of the border radius to the margin,
Expand Down Expand Up @@ -2932,7 +2933,8 @@ Shadow Shape, Spread, and Knockout</h4>
<p>To preserve the box's shape when spread is applied,
the corner radii of the shadow are also increased (decreased, for inner shadows)
from the border-box radii by adding the <i>spread distance</i> (and flooring at zero).
However, in order to create a sharper corner when the border radius is small,
However, in order to create a sharper corner when the border radius is small
(and thus ensure continuity between round and sharp corners),
when the <i>border radius</i> is less than the <i>spread distance</i>,
the <i>spread distance</i> is multiplied by the proportion 1 + (<var>r</var>-1)<sup>3</sup>,
where <var>r</var> is the ratio of the border radius to the <i>spread distance</i>,
Expand Down

0 comments on commit f885ef0

Please sign in to comment.