Skip to content

Commit 4f752da

Browse files
committed
[css-shapes] switch from SVG to CSS behavior for solving bad rounded corner radii
1 parent a7e3d6e commit 4f752da

2 files changed

Lines changed: 48 additions & 31 deletions

File tree

css-shapes/Overview.html

Lines changed: 27 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -367,14 +367,7 @@ <h4 id=supported-basic-shapes><span class=secno>3.2.1. </span>Supported
367367
<strong> rx</strong> and <strong>ry</strong>. For rounded rectangles
368368
they define the x-axis radius and y-axis radius of the ellipse used to
369369
round off the corners of the rectangle. Negative values for rx and ry
370-
are invalid. Implicit values may apply if one or the other of these
371-
values are unspecified or invalid, and clamping may occur if a
372-
specified value would result in a negative straight rectangle segment.
373-
The corner radii rules in <a
374-
href="http://www.w3.org/TR/SVG/shapes.html#RectElement">the ‘<code
375-
class=property>rect</code>’ element</a> in the SVG recommendation
376-
define these edge cases <a href="#SVG11"
377-
rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a>.
370+
are invalid. See notes below on edge cases for these values.
378371
</ul>
379372

380373
<dt><dfn
@@ -391,14 +384,8 @@ <h4 id=supported-basic-shapes><span class=secno>3.2.1. </span>Supported
391384
<strong> rx</strong> and <strong>ry</strong>. For rounded inset
392385
rectangles they define the x-axis radius and y-axis radius of the
393386
ellipse used to round off the corners of the inset rectangle. Negative
394-
values for rx and ry are invalid. Implicit values may apply if one or
395-
the other of these values are unspecified or invalid, and clamping may
396-
occur if a specified value would result in a negative straight
397-
rectangle segment. The corner radii rules in <a
398-
href="http://www.w3.org/TR/SVG/shapes.html#RectElement">the ‘<code
399-
class=property>rect</code>’ element</a> in the SVG recommendation
400-
define these edge cases <a href="#SVG11"
401-
rel=biblioentry>[SVG11]<!--{{!SVG11}}--></a>.
387+
values for rx and ry are invalid. See notes below on edge cases for
388+
these values.
402389
</ul>
403390

404391
<dt><dfn id=circle>circle</dfn>([&lt;length&gt;|&lt;percentage&gt;]{3})
@@ -442,7 +429,19 @@ <h4 id=supported-basic-shapes><span class=secno>3.2.1. </span>Supported
442429
first vertex of the list.</p>
443430
<br>
444431
</dl>
445-
<!--
432+
433+
<p>The values for corner radii on rectangle or inset-rectangle are
434+
determined implicitly if either the rx or ry values are not specified, or
435+
are specified but with invalid values. If neither rx nor ry are properly
436+
specified, the values are 0 for both. If only one value is properly
437+
specified, that value is used for both. And if the values cause any of the
438+
curves to overlap, the solution for <a
439+
href="http://www.w3.org/TR/css3-background/#corner-overlap">overlapping
440+
curves</a> from CSS Backgrounds and Borders <a href="#CSS3BG"
441+
rel=biblioentry>[CSS3BG]<!--{{!CSS3BG}}--></a> is used to avoid the
442+
overlap.
443+
444+
<p> <!--
446445
<div class="issue-marker wrapper">
447446
<div class="issue-marker" data-bug_id="16448" data-bug_status="ASSIGNED">
448447
<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16448">Issue-16448</a>
@@ -512,7 +511,7 @@ <h4 id='referencing-svg-shapes'>Referencing SVG shapes</h4>
512511
</p>
513512
514513
-->
515-
<!-- End section "Shapes from SVG Syntax -->
514+
<!-- End section "Shapes from SVG Syntax -->
516515

517516
<h4 id=basic-shape-interpolation><span class=secno>3.2.2.
518517
</span>Interpolation of Basic Shapes</h4>
@@ -1034,6 +1033,16 @@ <h3 class=no-num id=normative-references>Normative references</h3>
10341033
</dd>
10351034
<!---->
10361035

1036+
<dt id=CSS3BG>[CSS3BG]
1037+
1038+
<dd>Bert Bos; Elika J. Etemad; Brad Kemper. <a
1039+
href="http://www.w3.org/TR/2012/CR-css3-background-20120724/"><cite>CSS
1040+
Backgrounds and Borders Module Level 3.</cite></a> 24 July 2012. W3C
1041+
Candidate Recommendation. (Work in progress.) URL: <a
1042+
href="http://www.w3.org/TR/2012/CR-css3-background-20120724/">http://www.w3.org/TR/2012/CR-css3-background-20120724/</a>
1043+
</dd>
1044+
<!---->
1045+
10371046
<dt id=CSS3BOX>[CSS3BOX]
10381047

10391048
<dd>Bert Bos. <a

css-shapes/Overview.src.html

Lines changed: 21 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -248,12 +248,7 @@ <h4 id="supported-basic-shapes">Supported Shapes</h4>
248248
of the ellipse used to round off
249249
the corners of the rectangle.
250250
Negative values for rx and ry are invalid.
251-
Implicit values may apply if one or the other
252-
of these values are unspecified or invalid,
253-
and clamping may occur if a specified value
254-
would result in a negative straight rectangle segment.
255-
The corner radii rules in <a href="http://www.w3.org/TR/SVG/shapes.html#RectElement">the 'rect' element</a>
256-
in the SVG recommendation define these edge cases [[!SVG11]].
251+
See notes below on edge cases for these values.
257252
</li>
258253
</ul>
259254
</dd>
@@ -275,13 +270,8 @@ <h4 id="supported-basic-shapes">Supported Shapes</h4>
275270
the x-axis radius and y-axis radius
276271
of the ellipse used to round off
277272
the corners of the inset rectangle.
278-
Negative values for rx and ry are invalid.
279-
Implicit values may apply if one or the other
280-
of these values are unspecified or invalid,
281-
and clamping may occur if a specified value
282-
would result in a negative straight rectangle segment.
283-
The corner radii rules in <a href="http://www.w3.org/TR/SVG/shapes.html#RectElement">the 'rect' element</a>
284-
in the SVG recommendation define these edge cases [[!SVG11]].
273+
Negative values for rx and ry are invalid.
274+
See notes below on edge cases for these values.
285275
</li>
286276
</ul>
287277
</dd>
@@ -334,6 +324,24 @@ <h4 id="supported-basic-shapes">Supported Shapes</h4>
334324
<br/>
335325
</dd>
336326
</dl>
327+
328+
<p>The values for corner radii
329+
on rectangle or inset-rectangle
330+
are determined implicitly
331+
if either the rx or ry values
332+
are not specified,
333+
or are specified but with invalid values.
334+
If neither rx nor ry are properly specified,
335+
the values are 0 for both.
336+
If only one value is properly specified,
337+
that value is used for both.
338+
And if the values cause any
339+
of the curves to overlap,
340+
the solution for
341+
<a href="http://www.w3.org/TR/css3-background/#corner-overlap">overlapping curves</a>
342+
from CSS Backgrounds and Borders [[!CSS3BG]]
343+
is used to avoid the overlap.
344+
<p>
337345
<!--
338346
<div class="issue-marker wrapper">
339347
<div class="issue-marker" data-bug_id="16448" data-bug_status="ASSIGNED">

0 commit comments

Comments
 (0)