Skip to content

Commit 17b8c6f

Browse files
committed
[css-shapes] editorial changes, removed 'contain'
1 parent b65eb66 commit 17b8c6f

2 files changed

Lines changed: 106 additions & 56 deletions

File tree

css-shapes/Overview.html

Lines changed: 53 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -393,8 +393,6 @@ <h2 class="heading settled heading" data-level=3 id=basic-shapes-from-svg-syntax
393393
All the lengths expressed in percentages
394394
are resolved from the used dimensions
395395
of the <a data-link-type=dfn href=#reference-box title="reference box">reference box</a>.
396-
For the radius <code>r</code> of a <a class=css data-link-type=maybe href=#funcdef-circle title=circle()>circle()</a>,
397-
a percentage value is resolved from the used width and height of the <a data-link-type=dfn href=#reference-box title="reference box">reference box</a> as <code>sqrt((<em>width</em>)**2 + (<em>height</em>)**2))/sqrt(2)</code>.
398396

399397
<h3 class="heading settled heading" data-level=3.1 id=supported-basic-shapes><span class=secno>3.1 </span><span class=content>
400398
Supported Shapes</span><a class=self-link href=#supported-basic-shapes></a></h3>
@@ -407,7 +405,7 @@ <h3 class="heading settled heading" data-level=3.1 id=supported-basic-shapes><sp
407405

408406
<dl>
409407
<dt><dfn class=css-code data-dfn-type=function data-export="" id=funcdef-inset title=inset()>inset()<a class=self-link href=#funcdef-inset></a></dfn> =
410-
inset( <a class="production css-code" data-link-type=type href=#typedef-shape-arg title="<shape-arg>">&lt;shape-arg&gt;</a>{1,4} [ round &lt;<a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-backgrounds-4/#border-radius title=border-radius>border-radius</a>&gt; ]? )
408+
inset( <a class="production css-code" data-link-type=type href=#typedef-shape-arg title="<shape-arg>">&lt;shape-arg&gt;</a>{1,4} [round &lt;<a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-backgrounds-4/#border-radius title=border-radius>border-radius</a>&gt;]? )
411409
</dt>
412410
<dd>
413411
Defines an inset rectangle.
@@ -435,25 +433,29 @@ <h3 class="heading settled heading" data-level=3.1 id=supported-basic-shapes><sp
435433
</ul>
436434
</dd>
437435
<dt><dfn class=css-code data-dfn-type=function data-export="" id=funcdef-circle title=circle()>circle()<a class=self-link href=#funcdef-circle></a></dfn> =
438-
circle( [<a class="production css-code" data-link-type=type href=#typedef-shape-radius title="<shape-radius>">&lt;shape-radius&gt;</a>] [at <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#position-value title="<position>">&lt;position&gt;</a>] )
436+
circle( [<a class="production css-code" data-link-type=type href=#typedef-shape-radius title="<shape-radius>">&lt;shape-radius&gt;</a>] [at <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#position-value title="<position>">&lt;position&gt;</a>]? | at <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#position-value title="<position>">&lt;position&gt;</a> )
439437
</dt>
440438
<dd>
441439
<ul>
442440
<li>
443441
The shape-radius argument represents
444442
<strong>r</strong>, the radius
445-
of the circle.
443+
of the circle.
444+
A percentage value here
445+
is resolved from the used width and height
446+
of the <a data-link-type=dfn href=#reference-box title="reference box">reference box</a> as <br>
447+
<code>sqrt((<em>width</em>)**2 +
448+
(<em>height</em>)**2))/sqrt(2)</code>
446449
</li>
447450
<li>
448451
The position argument defines
449452
the center of the circle.
450-
The type is defined in <a data-biblio-type=normative data-link-type=biblio href=#css3val title=css3val>[CSS3VAL]</a>
451-
and defaults to center if omitted.
453+
This defaults to center if omitted.
452454
</li>
453455
</ul>
454456
</dd>
455457
<dt><dfn class=css-code data-dfn-type=function data-export="" id=funcdef-ellipse title=ellipse()>ellipse()<a class=self-link href=#funcdef-ellipse></a></dfn> =
456-
ellipse( [<a class="production css-code" data-link-type=type href=#typedef-shape-radius title="<shape-radius>">&lt;shape-radius&gt;</a>{1,2}] [at <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#position-value title="<position>">&lt;position&gt;</a>] )
458+
ellipse( [<a class="production css-code" data-link-type=type href=#typedef-shape-radius title="<shape-radius>">&lt;shape-radius&gt;</a>{1,2}] [at <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#position-value title="<position>">&lt;position&gt;</a>]? | at <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#position-value title="<position>">&lt;position&gt;</a> )
457459
</dt>
458460
<dd>
459461
<ul>
@@ -467,8 +469,7 @@ <h3 class="heading settled heading" data-level=3.1 id=supported-basic-shapes><sp
467469
<li>
468470
The position argument defines
469471
the center of the ellipse.
470-
The type is defined in <a data-biblio-type=normative data-link-type=biblio href=#css3val title=css3val>[CSS3VAL]</a>
471-
and defaults to center if omitted.
472+
This defaults to center if omitted.
472473
</li>
473474
</ul>
474475
</dd>
@@ -478,9 +479,15 @@ <h3 class="heading settled heading" data-level=3.1 id=supported-basic-shapes><sp
478479
<dd>
479480
<ul>
480481
<li>
481-
<a class="production css-code" data-link-type=type href=#typedef-fill-rule title="<fill-rule>">&lt;fill-rule&gt;</a> - The filling rule used to determine the interior of the
482-
polygon. See <a href=http://www.w3.org/TR/SVG/painting.html#FillRuleProperty>fill-rule</a> property in SVG for details. Possible values are nonzero
483-
or evenodd. Default value when omitted is nonzero.</li>
482+
<dfn class=css-code data-dfn-type=type data-export="" id=typedef-fill-rule><a class="production css-code" data-link-type=type href=#typedef-fill-rule title="<fill-rule>">&lt;fill-rule&gt;</a><a class=self-link href=#typedef-fill-rule></a></dfn> -
483+
The filling rule used
484+
to determine the interior
485+
of the polygon.
486+
See <a href=http://www.w3.org/TR/SVG/painting.html#FillRuleProperty>fill-rule</a> property
487+
in SVG for details.
488+
Possible values are <span class=css data-link-type=maybe title=nonzero>nonzero</span>
489+
or <span class=css data-link-type=maybe title=evenodd>evenodd</span>.
490+
Default value when omitted is <span class=css data-link-type=maybe title=nonzero>nonzero</span>.</li>
484491
<li>
485492
Each pair argument in the list represents <strong>x<sub>i</sub></strong> and <strong>y<sub>i</sub></strong> -
486493
the <strong>x</strong> and <strong>y</strong> axis coordinates of the i-th vertex of the polygon.
@@ -502,26 +509,44 @@ <h3 class="heading settled heading" data-level=3.1 id=supported-basic-shapes><sp
502509
to flow through all
503510
of the float’s box.
504511
</dd>
512+
</dl>
513+
514+
<p> The arguments not defined above are defined as follows:
505515

516+
<dl>
506517
<dt><dfn class=css-code data-dfn-type=type data-export="" id=typedef-shape-arg><a class="production css-code" data-link-type=type href=#typedef-shape-arg title="<shape-arg>">&lt;shape-arg&gt;</a><a class=self-link href=#typedef-shape-arg></a></dfn> = <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#length-value title="<length>">&lt;length&gt;</a> | <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#percentage-value title="<percentage>">&lt;percentage&gt;</a>
507518
</dt>
508519

509-
<dt><dfn class=css-code data-dfn-type=type data-export="" id=typedef-shape-radius><a class="production css-code" data-link-type=type href=#typedef-shape-radius title="<shape-radius>">&lt;shape-radius&gt;</a><a class=self-link href=#typedef-shape-radius></a></dfn> = <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#length-value title="<length>">&lt;length&gt;</a> | <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#percentage-value title="<percentage>">&lt;percentage&gt;</a> | closest-side | farthest-side | contain
520+
<dt><dfn class=css-code data-dfn-type=type data-export="" id=typedef-shape-radius><a class="production css-code" data-link-type=type href=#typedef-shape-radius title="<shape-radius>">&lt;shape-radius&gt;</a><a class=self-link href=#typedef-shape-radius></a></dfn> = <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#length-value title="<length>">&lt;length&gt;</a> | <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#percentage-value title="<percentage>">&lt;percentage&gt;</a> | closest-side | farthest-side
510521
</dt>
511522
<dd>
512-
Defines a radius for a circle or ellipse. If omitted it defaults to contain.
523+
Defines a radius for a circle or ellipse. If omitted it defaults to closest-side.
513524
<ul>
514-
<li><strong>closest-side</strong> uses the length from the center of the shape to the closest side of the <a data-link-type=dfn href=#reference-box title="reference box">reference box</a>.</li>
515-
<li><strong>farthest-side</strong> uses the length from the center of the shape to the farthest side of the <a data-link-type=dfn href=#reference-box title="reference box">reference box</a>.</li>
516-
<li><strong>contain</strong> uses the same value as closest-side for circle(). For ellipse the <strong>rx</strong> value uses the length from the center of the shape to the closest width side, and the <strong>ry</strong> value uses the length from the center of the shape to the closest height side.</li>
525+
<li>
526+
<strong>closest-side</strong>
527+
uses the length from the center
528+
of the shape to the closest side
529+
of the <a data-link-type=dfn href=#reference-box title="reference box">reference box</a>.
530+
For circles,
531+
this is the closest side
532+
in any dimension.
533+
For ellipses,
534+
this is the closest side
535+
in the radius dimension.
536+
</li>
537+
<li>
538+
<strong>farthest-side</strong>
539+
uses the length from the center
540+
of the shape to the farthest side
541+
of the <a data-link-type=dfn href=#reference-box title="reference box">reference box</a>.
542+
For circles,
543+
this is the farthest side
544+
in any dimension.
545+
For ellipses,
546+
this is the farthest side
547+
in the radius dimension.</li>
517548
</ul>
518549
</dd>
519-
520-
<dt><dfn class=css-code data-dfn-type=type data-export="" id=typedef-fill-rule><a class="production css-code" data-link-type=type href=#typedef-fill-rule title="<fill-rule>">&lt;fill-rule&gt;</a><a class=self-link href=#typedef-fill-rule></a></dfn> = nonzero | evenodd
521-
</dt>
522-
<dd>
523-
See <a href=http://www.w3.org/TR/SVG/painting.html#FillRuleProperty>fill-rule</a> property in SVG for details.
524-
525550
</dl>
526551

527552
<h3 class="heading settled heading" data-level=3.2 id=basic-shape-interpolation><span class=secno>3.2 </span><span class=content>
@@ -533,16 +558,16 @@ <h3 class="heading settled heading" data-level=3.2 id=basic-shape-interpolation>
533558

534559
<p> <ul>
535560
<li>
536-
For interpolating between two shapes that are type inset-rectangle, ellipse or circle:
561+
For interpolating between two shapes that are type inset rectangle, ellipse or circle:
537562
<ul>
538563
<li>
539-
Replace each inset-rectangle with a temporary inset-rectangle with offsets relative to the margin-box.
564+
Replace each inset rectangle with a temporary inset rectangle with offsets relative to the margin-box.
540565
</li>
541566
<li>
542-
Replace each circle and ellipse with a temporary inset-rectangle with offsets relative to the margin-box, and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-backgrounds-4/#border-radius title=border-radius>border-radius</a> values to make the inset-rectangle equivalent to the original circle or ellipse
567+
Replace each circle and ellipse with a temporary inset rectangle with offsets relative to the margin-box, and <a class=property data-link-type=propdesc href=http://dev.w3.org/csswg/css-backgrounds-4/#border-radius title=border-radius>border-radius</a> values to make the inset rectangle equivalent to the original circle or ellipse
543568
</li>
544569
<li>
545-
Interpolate between each value of the temporary inset-rectangles.
570+
Interpolate between each value of the temporary inset rectangles.
546571
</li>
547572
</ul>
548573
</li>

css-shapes/Overview.src.html

Lines changed: 53 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -276,8 +276,6 @@ <h2 id="basic-shapes-from-svg-syntax">
276276
All the lengths expressed in percentages
277277
are resolved from the used dimensions
278278
of the <a>reference box</a>.
279-
For the radius <code>r</code> of a ''circle()'',
280-
a percentage value is resolved from the used width and height of the <a>reference box</a> as <code>sqrt((<em>width</em>)**2 + (<em>height</em>)**2))/sqrt(2)</code>.
281279

282280
<h3 id="supported-basic-shapes">
283281
Supported Shapes</h3>
@@ -290,7 +288,7 @@ <h3 id="supported-basic-shapes">
290288

291289
<dl>
292290
<dt><dfn>inset()</dfn> =
293-
inset( <<shape-arg>>{1,4} [ round <'border-radius'> ]? )
291+
inset( <<shape-arg>>{1,4} [round <'border-radius'>]? )
294292
</dt>
295293
<dd>
296294
Defines an inset rectangle.
@@ -318,25 +316,29 @@ <h3 id="supported-basic-shapes">
318316
</ul>
319317
</dd>
320318
<dt><dfn>circle()</dfn> =
321-
circle( [<<shape-radius>>] [at <<position>>] )
319+
circle( [<<shape-radius>>] [at <<position>>]? | at <<position>> )
322320
</dt>
323321
<dd>
324322
<ul>
325323
<li>
326324
The shape-radius argument represents
327325
<strong>r</strong>, the radius
328-
of the circle.
326+
of the circle.
327+
A percentage value here
328+
is resolved from the used width and height
329+
of the <a>reference box</a> as <br>
330+
<code>sqrt((<em>width</em>)**2 +
331+
(<em>height</em>)**2))/sqrt(2)</code>
329332
</li>
330333
<li>
331334
The position argument defines
332335
the center of the circle.
333-
The type is defined in [[!CSS3VAL]]
334-
and defaults to center if omitted.
336+
This defaults to center if omitted.
335337
</li>
336338
</ul>
337339
</dd>
338340
<dt><dfn>ellipse()</dfn> =
339-
ellipse( [<<shape-radius>>{1,2}] [at <<position>>] )
341+
ellipse( [<<shape-radius>>{1,2}] [at <<position>>]? | at <<position>> )
340342
</dt>
341343
<dd>
342344
<ul>
@@ -350,8 +352,7 @@ <h3 id="supported-basic-shapes">
350352
<li>
351353
The position argument defines
352354
the center of the ellipse.
353-
The type is defined in [[!CSS3VAL]]
354-
and defaults to center if omitted.
355+
This defaults to center if omitted.
355356
</li>
356357
</ul>
357358
</dd>
@@ -361,9 +362,15 @@ <h3 id="supported-basic-shapes">
361362
<dd>
362363
<ul>
363364
<li>
364-
<<fill-rule>> - The filling rule used to determine the interior of the
365-
polygon. See <a href="http://www.w3.org/TR/SVG/painting.html#FillRuleProperty">fill-rule</a> property in SVG for details. Possible values are nonzero
366-
or evenodd. Default value when omitted is nonzero.</li>
365+
<dfn><<fill-rule>></dfn> -
366+
The filling rule used
367+
to determine the interior
368+
of the polygon.
369+
See <a href="http://www.w3.org/TR/SVG/painting.html#FillRuleProperty">fill-rule</a> property
370+
in SVG for details.
371+
Possible values are ''nonzero''
372+
or ''evenodd''.
373+
Default value when omitted is ''nonzero''.</li>
367374
<li>
368375
Each pair argument in the list represents <strong>x<sub>i</sub></strong> and <strong>y<sub>i</sub></strong> -
369376
the <strong>x</strong> and <strong>y</strong> axis coordinates of the i-th vertex of the polygon.
@@ -385,26 +392,44 @@ <h3 id="supported-basic-shapes">
385392
to flow through all
386393
of the float's box.
387394
</dd>
395+
</dl>
396+
397+
The arguments not defined above are defined as follows:
388398

399+
<dl>
389400
<dt><dfn><<shape-arg>></dfn> = <<length>> | <<percentage>>
390401
</dt>
391402

392-
<dt><dfn><<shape-radius>></dfn> = <<length>> | <<percentage>> | closest-side | farthest-side | contain
403+
<dt><dfn><<shape-radius>></dfn> = <<length>> | <<percentage>> | closest-side | farthest-side
393404
</dt>
394405
<dd>
395-
Defines a radius for a circle or ellipse. If omitted it defaults to contain.
406+
Defines a radius for a circle or ellipse. If omitted it defaults to closest-side.
396407
<ul>
397-
<li><strong>closest-side</strong> uses the length from the center of the shape to the closest side of the <a>reference box</a>.</li>
398-
<li><strong>farthest-side</strong> uses the length from the center of the shape to the farthest side of the <a>reference box</a>.</li>
399-
<li><strong>contain</strong> uses the same value as closest-side for circle(). For ellipse the <strong>rx</strong> value uses the length from the center of the shape to the closest width side, and the <strong>ry</strong> value uses the length from the center of the shape to the closest height side.</li>
408+
<li>
409+
<strong>closest-side</strong>
410+
uses the length from the center
411+
of the shape to the closest side
412+
of the <a>reference box</a>.
413+
For circles,
414+
this is the closest side
415+
in any dimension.
416+
For ellipses,
417+
this is the closest side
418+
in the radius dimension.
419+
</li>
420+
<li>
421+
<strong>farthest-side</strong>
422+
uses the length from the center
423+
of the shape to the farthest side
424+
of the <a>reference box</a>.
425+
For circles,
426+
this is the farthest side
427+
in any dimension.
428+
For ellipses,
429+
this is the farthest side
430+
in the radius dimension.</li>
400431
</ul>
401432
</dd>
402-
403-
<dt><dfn><<fill-rule>></dfn> = nonzero | evenodd
404-
</dt>
405-
<dd>
406-
See <a href="http://www.w3.org/TR/SVG/painting.html#FillRuleProperty">fill-rule</a> property in SVG for details.
407-
</dt>
408433
</dl>
409434

410435
<h3 id='basic-shape-interpolation'>
@@ -416,16 +441,16 @@ <h3 id='basic-shape-interpolation'>
416441

417442
<ul>
418443
<li>
419-
For interpolating between two shapes that are type inset-rectangle, ellipse or circle:
444+
For interpolating between two shapes that are type inset rectangle, ellipse or circle:
420445
<ul>
421446
<li>
422-
Replace each inset-rectangle with a temporary inset-rectangle with offsets relative to the margin-box.
447+
Replace each inset rectangle with a temporary inset rectangle with offsets relative to the margin-box.
423448
</li>
424449
<li>
425-
Replace each circle and ellipse with a temporary inset-rectangle with offsets relative to the margin-box, and 'border-radius' values to make the inset-rectangle equivalent to the original circle or ellipse
450+
Replace each circle and ellipse with a temporary inset rectangle with offsets relative to the margin-box, and 'border-radius' values to make the inset rectangle equivalent to the original circle or ellipse
426451
</li>
427452
<li>
428-
Interpolate between each value of the temporary inset-rectangles.
453+
Interpolate between each value of the temporary inset rectangles.
429454
</li>
430455
</ul>
431456
</li>

0 commit comments

Comments
 (0)