Skip to content

Commit 2607671

Browse files
committed
[css-shapes] <box> shapes use used radii values
1 parent 8194e64 commit 2607671

2 files changed

Lines changed: 35 additions & 5 deletions

File tree

css-shapes/Overview.html

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@
6363
</p>
6464
<h1 class="p-name no-ref" id=title>CSS Shapes Module Level 1</h1>
6565
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
66-
<span class=dt-updated><span class=value-title title=20140106>6 January 2014</span></span></span></h2>
66+
<span class=dt-updated><span class=value-title title=20140110>10 January 2014</span></span></span></h2>
6767
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-shapes/>http://dev.w3.org/csswg/css-shapes/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css-shapes/>http://www.w3.org/TR/css-shapes/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-shapes/>http://dev.w3.org/csswg/css-shapes/</a>
6868
<dt>Feedback:</dt>
6969
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-shapes%5D%20feedback">www-style@w3.org</a>
@@ -730,15 +730,30 @@ <h2 class="heading settled heading" data-level=4 id=shapes-from-image><span clas
730730
<h2 class="heading settled heading" data-level=5 id=shapes-from-box-values><span class=secno>5 </span><span class=content>
731731
Shapes from Box Values</span><a class=self-link href=#shapes-from-box-values></a></h2>
732732

733-
<p> Shapes can be defined by reference to edges in the <a href=http://www.w3.org/TR/CSS21/box.html#box-dimensions>CSS Box Model</a>. These edges include <a href=http://www.w3.org/TR/css3-background/#corner-shaping>border-radius curvature</a> <a data-biblio-type=normative data-link-type=biblio href=#css3bg title=css3bg>[CSS3BG]</a>. The <a class="production css-code" data-link-type=type href=#typedef-shape-box title="<shape-box>">&lt;shape-box&gt;</a> value extends the <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-backgrounds-3/#box title="<box>">&lt;box&gt;</a> value to include <a class=css data-link-type=maybe href=#margin-box title=margin-box>margin-box</a>. Its syntax is:
733+
<p> Shapes can be defined
734+
by reference to edges in the
735+
<a href=http://www.w3.org/TR/CSS21/box.html#box-dimensions>CSS Box Model</a>.
736+
These edges include
737+
<a href=http://www.w3.org/TR/css3-background/#corner-shaping>border-radius curvature</a> <a data-biblio-type=normative data-link-type=biblio href=#css3bg title=css3bg>[CSS3BG]</a>
738+
from the used border-radius values.
739+
The <a class="production css-code" data-link-type=type href=#typedef-shape-box title="<shape-box>">&lt;shape-box&gt;</a> value extends the <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-backgrounds-3/#box title="<box>">&lt;box&gt;</a> value
740+
to include <a class=css data-link-type=maybe href=#margin-box title=margin-box>margin-box</a>.
741+
Its syntax is:
734742

735743
<pre> <dfn class=css-code data-dfn-type=type data-export="" id=typedef-shape-box><a class="production css-code" data-link-type=type href=#typedef-shape-box title="<shape-box>">&lt;shape-box&gt;</a><a class=self-link href=#typedef-shape-box></a></dfn> = <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-backgrounds-3/#box title="<box>">&lt;box&gt;</a> | <a class=css data-link-type=maybe href=#margin-box title=margin-box>margin-box</a>
736744
</pre>
737745
<p> The definitions of the values are:
738746

739747
<p> The <dfn data-dfn-type=dfn data-noexport="" id=margin-box>margin-box<a class=self-link href=#margin-box></a></dfn> value defines the shape
740748
enclosed by the outside margin edge.
741-
The corner radii of this shape are determined by the corresponding border-radius and margin values. If the ratio of <code>border-radius/margin</code> is 1 or more, then the margin box corner radius is <code>border-radius + margin</code>. If the ratio of <code>border-radius/margin</code> is less than 1, then the margin box corner radius is <code>border-radius + (margin * (1 + (ratio-1)^3))</code>.
749+
The corner radii of this shape are determined
750+
by the corresponding border-radius and margin values.
751+
If the ratio of <code>border-radius/margin</code> is 1 or more,
752+
then the margin box corner radius is
753+
<code>border-radius + margin</code>.
754+
If the ratio of <code>border-radius/margin</code> is less than 1,
755+
then the margin box corner radius is
756+
<code>border-radius + (margin * (1 + (ratio-1)^3))</code>.
742757

743758
<p> The <dfn data-dfn-type=dfn data-noexport="" id=border-box>border-box<a class=self-link href=#border-box></a></dfn> value defines the shape
744759
enclosed by the outside border edge.

css-shapes/Overview.src.html

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,15 @@ <h2 id="shapes-from-image">
611611
<h2 id="shapes-from-box-values">
612612
Shapes from Box Values</h2>
613613

614-
Shapes can be defined by reference to edges in the <a href="http://www.w3.org/TR/CSS21/box.html#box-dimensions">CSS Box Model</a>. These edges include <a href="http://www.w3.org/TR/css3-background/#corner-shaping">border-radius curvature</a> [[!CSS3BG]]. The <<shape-box>> value extends the <<box>> value to include ''margin-box''. Its syntax is:
614+
Shapes can be defined
615+
by reference to edges in the
616+
<a href="http://www.w3.org/TR/CSS21/box.html#box-dimensions">CSS Box Model</a>.
617+
These edges include
618+
<a href="http://www.w3.org/TR/css3-background/#corner-shaping">border-radius curvature</a> [[!CSS3BG]]
619+
from the used border-radius values.
620+
The <<shape-box>> value extends the <<box>> value
621+
to include ''margin-box''.
622+
Its syntax is:
615623

616624
<pre>
617625
<dfn><<shape-box>></dfn> = <<box>> | ''margin-box''
@@ -621,7 +629,14 @@ <h2 id="shapes-from-box-values">
621629

622630
The <dfn>margin-box</dfn> value defines the shape
623631
enclosed by the outside margin edge.
624-
The corner radii of this shape are determined by the corresponding border-radius and margin values. If the ratio of <code>border-radius/margin</code> is 1 or more, then the margin box corner radius is <code>border-radius + margin</code>. If the ratio of <code>border-radius/margin</code> is less than 1, then the margin box corner radius is <code>border-radius + (margin * (1 + (ratio-1)^3))</code>.
632+
The corner radii of this shape are determined
633+
by the corresponding border-radius and margin values.
634+
If the ratio of <code>border-radius/margin</code> is 1 or more,
635+
then the margin box corner radius is
636+
<code>border-radius + margin</code>.
637+
If the ratio of <code>border-radius/margin</code> is less than 1,
638+
then the margin box corner radius is
639+
<code>border-radius + (margin * (1 + (ratio-1)^3))</code>.
625640

626641
The <dfn>border-box</dfn> value defines the shape
627642
enclosed by the outside border edge.

0 commit comments

Comments
 (0)