Skip to content

Commit 59e552a

Browse files
committed
[css-backgrounds-3] Handle negative spread radius of inner shadows. #1900 (comment)
1 parent f7c3708 commit 59e552a

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

css-backgrounds-3/Overview.bs

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1995,6 +1995,8 @@ the margin is multiplied by the proportion 1 + (r-1)3,
19951995
where r is the ratio of the border radius to the margin,
19961996
in calculating the corner radii of the margin box shape.
19971997

1998+
1999+
19982000

Corner Clipping

19992001

20002002

Although border images are not affected

@@ -2921,8 +2923,10 @@ Shadow Shape, Spread, and Knockout
29212923
the spread distance (and flooring at zero).
29222924
However, in order to create a sharper corner when the border radius is small
29232925
(and thus ensure continuity between round and sharp corners),
2924-
when the border radius is less than the spread distance,
2925-
the spread distance of an outer shadow
2926+
when the border radius is less than the spread distance
2927+
(or in the case of an inner shadow,
2928+
less than the absolute value of a negative spread distance),
2929+
the spread distance
29262930
is multiplied by the proportion 1 + (r-1)3,
29272931
where r is the ratio of the border radius to the spread distance,
29282932
in calculating the corner radii of the spread shadow shape.
@@ -3057,8 +3061,8 @@ Changes since the 17 October 2017 Candidate Recommendation
30573061
<> = inset<>? && <>{2,4} && <>inset?
30583062
30593063
  • 3060-
    Spread radius adjustment is only applied to outer shadows (and positive margins)--
    3061-
    i.e. cases where the radius of curvature grows, rather than shrinks.
    3064+
    Spread radius adjustment is only applied to shadows and margins
    3065+
    where the radius of curvature grows, rather than shrinks.
    30623066
    30633067
    30643068

    To preserve the box's shape when spread is applied,

    @@ -3067,8 +3071,10 @@ Changes since the 17 October 2017 Candidate Recommendation
    30673071
    the spread distance (and flooring at zero).
    30683072
    However, in order to create a sharper corner when the border radius is small
    30693073
    (and thus ensure continuity between round and sharp corners),
    3070-
    when the border radius is less than the spread distance,
    3071-
    the spread distance of an outer shadow
    3074+
    when the border radius is less than the spread distance
    3075+
    (or in the case of an inner shadow,
    3076+
    less than the absolute value of a negative spread distance),
    3077+
    the spread distance
    30723078
    is multiplied by the proportion 1 + (r-1)3,
    30733079
    where r is the ratio of the border radius to the spread distance,
    30743080
    in calculating the corner radii of the spread shadow shape.

    0 commit comments

    Comments
     (0)