@@ -20,6 +20,7 @@ Abstract: CSS Shapes describe geometric shapes for use in CSS. For Level 1, CSS
20
20
<pre class='link-defaults'>
21
21
spec:css2; type:property; text:margin
22
22
spec:css-backgrounds-3; type:property; text:border-radius
23
+ spec:css-inline; type:dfn; text:initial letter box
23
24
spec:css-masking-1; type: value
24
25
text: nonzero
25
26
text: evenodd
@@ -352,7 +353,8 @@ Supported Shapes</h3>
352
353
)
353
354
354
355
<<polygon()>> = polygon(
355
- <<'fill-rule'>> ? ,
356
+ <<'fill-rule'>> ?
357
+ [ round <<length>> ]? ,
356
358
[<<length-percentage>> <<length-percentage>> ]#
357
359
)
358
360
@@ -461,7 +463,7 @@ Supported Shapes</h3>
461
463
* The <<radial-size>> argument defines
462
464
the circle's radius.
463
465
Rather than referring to the [=gradient box=] ,
464
- values are resolved against the [=<basic-shape>/ reference box=] .
466
+ values are resolved against the [=reference box=] .
465
467
466
468
* Two <<length-percentage>> values are invalid.
467
469
@@ -475,7 +477,7 @@ Supported Shapes</h3>
475
477
* The <<radial-size>> argument defines
476
478
the horizontal and vertical radiuses of the ellipse.
477
479
Rather than referring to the [=gradient box=] ,
478
- values are resolved against the [=<basic-shape>/ reference box=] .
480
+ values are resolved against the [=reference box=] .
479
481
480
482
* The <<position>> argument defines
481
483
the center of the ellipse.
@@ -488,10 +490,29 @@ Supported Shapes</h3>
488
490
to determine the interior
489
491
Defaults to ''nonzero'' if omitted.
490
492
493
+ * An optional <<length>> after a <css> round</css> keyword
494
+ defines rounding for each vertex of the polygon.
495
+ The length is the radius of a circle
496
+ whose center lies on the bisector
497
+ of the smaller angle of the vertex,
498
+ and that is tangential
499
+ to both sides of the vertex.
500
+
501
+ To avoid rounding more
502
+ than half of any line segment,
503
+ the rounding of each vertex
504
+ must be clamped separately
505
+ such that the radius is never more than
506
+ the smaller of <code> tan(angle/2) segment / 2</code>
507
+ evaluated against both vertex line segments.
508
+
509
+
510
+ Note: vertex rounding needs examples and tests.
511
+
491
512
* Each <<length-percentage>> pair
492
513
specifies a vertex of the polygon,
493
514
as a horizontal and vertical offset
494
- from the left and top edges of the [=<basic-shape>/ reference box=] .
515
+ from the left and top edges of the [=reference box=] .
495
516
496
517
The UA must close a polygon
497
518
by connecting the last vertex
@@ -1129,7 +1150,7 @@ Change Log</h2>
1129
1150
Since <a href="https://www.w3.org/TR/2022/CRD-css-shapes-1-20221115/">15 November 2022</a></h3>
1130
1151
1131
1152
<ul>
1132
- <li></li>
1153
+ <li> Added vertex rounding for polygon() for <a href="https://github.com/w3c/csswg-drafts/issues/9843">issue #9843</a> </li>
1133
1154
</ul>
1134
1155
1135
1156
<h3 class="no-num" id="20140320">
0 commit comments