@@ -340,13 +340,15 @@ Supported Shapes</h3>
340
340
[ round <<'border-radius'>> ]?
341
341
)
342
342
343
+ <dfn><basic-shape-rect></dfn> = <<inset()>> | <<rect()>> | <<xywh()>>
344
+
343
345
<<circle()>> = circle(
344
- <<shape-radius >> ?
346
+ <<radial-size >> ?
345
347
[ at <<position>> ]?
346
348
)
347
349
348
350
<<ellipse()>> = ellipse(
349
- <<shape-radius>> {2} ?
351
+ <<radial-size>> ?
350
352
[ at <<position>> ]?
351
353
)
352
354
@@ -457,98 +459,62 @@ Supported Shapes</h3>
457
459
458
460
<dt> <dfn>circle()</dfn>
459
461
<dd>
460
- <ul>
461
- <li>
462
- The shape-radius argument represents
463
- <strong> r</strong> , the radius
464
- of the circle.
465
- Negative values are invalid.
466
- A percentage value here
467
- is resolved from the used width and height
468
- of the <a>reference box</a> as <br>
469
- <code> sqrt(<em> width</em><sup> 2</sup> +<em> height</em><sup> 2</sup> )/sqrt(2)</code> .
470
- </li>
471
- <li>
472
- The <<position>> argument defines
473
- the center of the circle.
474
- Unless otherwise specified,
475
- this defaults to <css> center</css> if omitted.
476
- </li>
477
- </ul>
462
+ * The <<radial-size>> argument defines
463
+ the circle's radius.
464
+ Rather than referring to the [=gradient box=] ,
465
+ values are resolved against the [=<basic-shape>/reference box=] .
466
+
467
+ * Two <<length-percentage>> values are invalid.
468
+
469
+ The <<position>> argument defines
470
+ the center of the circle.
471
+ Unless otherwise specified,
472
+ this defaults to <css> center</css> if omitted.
478
473
479
474
<dt> <dfn>ellipse()</dfn>
480
475
<dd>
481
- <ul>
482
- <li>
483
- The shape-radius arguments represent
484
- <strong> rx</strong> and
485
- <strong> ry</strong> ,
486
- the x-axis and y-axis radii
487
- of the ellipse,
488
- in that order.
489
- Negative values for either radius are invalid.
490
- Percentage values here are resolved
491
- against the used width (for the rx value)
492
- and the used height (for the ry value)
493
- of the reference box.
494
- </li>
495
- <li>
496
- The <<position>> argument defines
497
- the center of the ellipse.
498
- Unless otherwise specified,
499
- this defaults to <css> center</css> if omitted.
500
- </li>
501
- </ul>
476
+ * The <<radial-size>> argument defines
477
+ the horizontal and vertical radiuses of the ellipse.
478
+ Rather than referring to the [=gradient box=] ,
479
+ values are resolved against the [=<basic-shape>/reference box=] .
480
+
481
+ * The <<position>> argument defines
482
+ the center of the ellipse.
483
+ Unless otherwise specified,
484
+ this defaults to <css> center</css> if omitted.
502
485
503
486
<dt> <dfn>polygon()</dfn>
504
487
<dd>
505
- <ul>
506
- <li>
507
- <<'fill-rule'>> -
508
- The filling rule used
509
- to determine the interior
510
- of the polygon.
511
- See <a href="https://www.w3.org/TR/SVG/painting.html#FillRuleProperty">fill-rule</a> property
512
- in SVG for details.
513
- Possible values are ''nonzero''
514
- or ''evenodd'' .
515
- Default value when omitted is ''nonzero'' .</li>
516
- <li>
517
- Each pair argument in the list represents <strong> x<sub> i</sub></strong> and <strong> y<sub> i</sub></strong> -
518
- the <strong> x</strong> and <strong> y</strong> axis coordinates of the i-th vertex of the polygon.
519
- </li>
520
- </ul>
488
+ * The <<'fill-rule'>> specifies the filling rule used
489
+ to determine the interior
490
+ Defaults to ''nonzero'' if omitted.
491
+
492
+ * Each <<length-percentage>> pair
493
+ specifies a vertex of the polygon,
494
+ as a horizontal and vertical offset
495
+ from the left and top edges of the [=<basic-shape>/reference box=] .
521
496
522
497
The UA must close a polygon
523
498
by connecting the last vertex
524
499
with the first vertex of the list.
525
500
526
501
<dt> <dfn>path()</dfn>
527
- </dt>
528
502
<dd dfn-type=value dfn-for="path()">
529
- <ul>
530
- <li>
531
- <<'fill-rule'>> -
532
- The filling rule used
533
- to determine the interior
534
- of the path.
535
- See <a href="https://www.w3.org/TR/SVG/painting.html#FillRuleProperty">fill-rule</a> property
536
- in SVG for details.
537
- Possible values are ''nonzero''
538
- or ''evenodd'' .
539
- Default value when omitted is ''nonzero'' .
540
- <li>
541
- The <dfn><<string>></dfn> represents an
542
- <a href="https://www.w3.org/TR/SVG11/paths.html#PathData">SVG Path data string</a> .
543
- A path data string that does not conform to the
544
- to the grammar and parsing rules of SVG 1.1,
545
- or that does conform but defines an empty path,
546
- is [=invalid=] and causes the entire ''path()'' to be [=invalid=] .
547
- The initial position is defined
548
- by the first “move to” argument
549
- in the path string.
550
- For the initial direction follow SVG 1.1.
551
- </ul>
503
+ * The <<'fill-rule'>> specifies the filling rule used
504
+ to determine the interior
505
+ Defaults to ''nonzero'' if omitted.
506
+
507
+ * The <<string>> represents an
508
+ <a href="https://www.w3.org/TR/SVG11/paths.html#PathData">SVG Path data string</a> .
509
+ A path data string that does not conform to the
510
+ to the grammar and parsing rules of SVG 1.1,
511
+ or that does conform but defines an empty path,
512
+ is [=invalid=] and causes the entire ''path()'' to be [=invalid=] .
513
+
514
+ The initial position is defined
515
+ by the first “move to” argument
516
+ in the path string.
517
+ For the initial direction follow SVG 1.1.
552
518
553
519
The UA must close a path
554
520
with an implicit
@@ -558,44 +524,6 @@ Supported Shapes</h3>
558
524
(such as 'shape-outside' and 'clip-path' ).
559
525
</dl>
560
526
561
- The arguments not defined above are defined as follows:
562
-
563
- <dl>
564
- <dt> <dfn><<shape-radius>></dfn> = <<length-percentage [0,∞]>> | closest-side | farthest-side
565
- <dd>
566
- Defines a radius for a circle or ellipse. If omitted it defaults to closest-side.
567
- <ul>
568
- <li>
569
- <dfn>closest-side</dfn>
570
- uses the length from the center
571
- of the shape to the closest side
572
- of the <a>reference box</a> .
573
- For circles,
574
- this is the closest side
575
- in any dimension.
576
- For ellipses,
577
- this is the closest side
578
- in the radius dimension.
579
- <li>
580
- <dfn>farthest-side</dfn>
581
- uses the length from the center
582
- of the shape to the farthest side
583
- of the <a>reference box</a> .
584
- For circles,
585
- this is the farthest side
586
- in any dimension.
587
- For ellipses,
588
- this is the farthest side
589
- in the radius dimension.
590
- </ul>
591
- </dl>
592
-
593
- Additionally, the three rectangular shape functions
594
- are grouped into a production for convenience:
595
-
596
- <pre class=prod>
597
- <dfn><basic-shape-rect></dfn> = <<inset()>> | <<rect()>> | <<xywh()>>
598
- </pre>
599
527
600
528
<h3 id='basic-shape-computed-values'>
601
529
Computed Values of Basic Shapes</h3>
@@ -695,8 +623,8 @@ Interpolation of Basic Shapes</h3>
695
623
<li>
696
624
If both shapes are the same type,
697
625
that type is ''ellipse()'' or ''circle()'' ,
698
- and none of the radii use
699
- the <a href="#closest-side">''closest-side''</a> or <a href="#farthest-side">''farthest-side''</a> keywords,
626
+ and the radiuses are specified as <<length-percentage>>
627
+ (rather than keywords) ,
700
628
interpolate between each value
701
629
in the shape functions.
702
630
</li>
0 commit comments