Skip to content

Commit aa85f8e

Browse files
committed
[css-backgrounds] Fix wording around small border-radius vs shadow spread, and apply same wording to margin curve.
1 parent ad445c7 commit aa85f8e

2 files changed

Lines changed: 28 additions & 25 deletions

File tree

css-backgrounds/Overview.html

Lines changed: 18 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
code { font-size: inherit; }
2929
pre { text-align: left; }
3030
#box-shadow-samples td { background: white; color: black; }
31-
.css::before, .css::after { content: none !important;}
31+
.css::before, .css::after, .property::before, .property::after { content: none !important;}
3232
</style>
3333
<link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet
3434
type="text/css">
@@ -2921,10 +2921,11 @@ <h3 id=corner-shaping><span class=secno>5.2. </span>Corner Shaping</h3>
29212921

29222922
<p>The margin edge, being outside the border edge, calculates its radius by
29232923
adding the corresponding margin thickness to each border radius. However,
2924-
in order to create a sharper corner when the border radius is small, if
2925-
the ratio <var>r</var> of the border radius to the margin is less than one
2926-
the margin thickness is multiplied by the proportion 1 +
2927-
(<var>r</var>-1)<sup>3</sup> in this calculation.
2924+
in order to create a sharper corner when the border radius is small, when
2925+
the <i>border radius</i> is less than the margin, the margin is multiplied
2926+
by the proportion 1 + (<var>r</var>-1)<sup>3</sup>, where <var>r</var> is
2927+
the ratio of the border radius to the margin, in calculating the corner
2928+
radii of the margin box shape.
29282929

29292930
<h3 id=corner-clipping><span class=secno>5.3. </span>Corner Clipping</h3>
29302931

@@ -4112,17 +4113,18 @@ <h4 id=shadow-shape><span class=secno>7.1.1. </span> Shadow Shape, Spread,
41124113
the shadow are also increased (decreased, for inner shadows) from the
41134114
border-box radii by adding the <a href="#spread-distance"><i>spread
41144115
distance</i></a> (and flooring at zero). However, in order to create a
4115-
sharper corner when the border radius is small, when the ratio
4116-
<var>r</var> of a border radius to the <a
4117-
href="#spread-distance"><i>spread distance</i></a> is less than one, the
4118-
<a href="#spread-distance"><i>spread distance</i></a> is multiplied by the
4119-
proportion 1 + (<var>r</var>-1)<sup>3</sup> in calculating the corner
4120-
radii of the spread shadow shape. For example, if the border radius is
4121-
10px and the <a href="#spread-distance"><i>spread distance</i></a> is 20px
4122-
(<var>r</var> = .5), the corner radius of the shadow shape will be 10px +
4123-
20px×(1 + (.5 - 1)<sup>3</sup>) = 27.5px. This adjustment is applied
4124-
independently to the radii in each dimension, and does not apply to
4125-
negative spread distances.
4116+
sharper corner when the border radius is small, when the <i>border
4117+
radius</i> is less than the <a href="#spread-distance"><i>spread
4118+
distance</i></a>, the <a href="#spread-distance"><i>spread
4119+
distance</i></a> is multiplied by the proportion 1 +
4120+
(<var>r</var>-1)<sup>3</sup>, where <var>r</var> is the ratio of the
4121+
border radius to the <a href="#spread-distance"><i>spread
4122+
distance</i></a>, in calculating the corner radii of the spread shadow
4123+
shape. For example, if the border radius is 10px and the <a
4124+
href="#spread-distance"><i>spread distance</i></a> is 20px (<var>r</var> =
4125+
.5), the corner radius of the shadow shape will be 10px + 20px × (1 + (.5
4126+
- 1)<sup>3</sup>) = 27.5px. This adjustment is applied independently to
4127+
the radii in each dimension.
41264128

41274129
<p>The ‘<a href="#border-image"><code
41284130
class=property>border-image</code></a>’ does not affect the shape of the

css-backgrounds/Overview.src.html

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
code { font-size: inherit; }
1515
pre { text-align: left; }
1616
#box-shadow-samples td { background: white; color: black; }
17-
.css::before, .css::after { content: none !important;}
17+
.css::before, .css::after, .property::before, .property::after { content: none !important;}
1818
</style>
1919
<link rel="stylesheet" type="text/css"
2020
href="http://www.w3.org/StyleSheets/TR/W3C-WD.css">
@@ -2062,9 +2062,10 @@ <h3 id="corner-shaping">Corner Shaping</h3>
20622062
<p>The margin edge, being outside the border edge, calculates its radius
20632063
by adding the corresponding margin thickness to each border radius.
20642064
However, in order to create a sharper corner when the border radius is small,
2065-
if the ratio <var>r</var> of the border radius to the margin is less than one
2066-
the margin thickness is multiplied by the proportion 1 + (<var>r</var>-1)<sup>3</sup>
2067-
in this calculation.
2065+
when the <i>border radius</i> is less than the margin,
2066+
the margin is multiplied by the proportion 1 + (<var>r</var>-1)<sup>3</sup>,
2067+
where <var>r</var> is the ratio of the border radius to the margin,
2068+
in calculating the corner radii of the margin box shape.
20682069

20692070
<h3 id="corner-clipping">Corner Clipping</h3>
20702071

@@ -2981,13 +2982,13 @@ <h4 id="shadow-shape">
29812982
the corner radii of the shadow are also increased (decreased, for inner shadows)
29822983
from the border-box radii by adding the <i>spread distance</i> (and flooring at zero).
29832984
However, in order to create a sharper corner when the border radius is small,
2984-
when the ratio <var>r</var> of a border radius to the <i>spread distance</i> is less than one,
2985-
the <i>spread distance</i> is multiplied by the proportion 1 + (<var>r</var>-1)<sup>3</sup>
2985+
when the <i>border radius</i> is less than the <i>spread distance</i>,
2986+
the <i>spread distance</i> is multiplied by the proportion 1 + (<var>r</var>-1)<sup>3</sup>,
2987+
where <var>r</var> is the ratio of the border radius to the <i>spread distance</i>,
29862988
in calculating the corner radii of the spread shadow shape.
29872989
For example, if the border radius is 10px and the <i>spread distance</i> is 20px (<var>r</var> = .5),
2988-
the corner radius of the shadow shape will be 10px + 20px&times;(1 + (.5 - 1)<sup>3</sup>) = 27.5px.
2989-
This adjustment is applied independently to the radii in each dimension,
2990-
and does not apply to negative spread distances.
2990+
the corner radius of the shadow shape will be 10px + 20px × (1 + (.5 - 1)<sup>3</sup>) = 27.5px.
2991+
This adjustment is applied independently to the radii in each dimension.
29912992

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

0 commit comments

Comments
 (0)