Skip to content

Commit dca7361

Browse files
committed
[css-exclusions] add inset rectangle to basic shapes
1 parent 488d3a3 commit dca7361

2 files changed

Lines changed: 72 additions & 11 deletions

File tree

css-exclusions/Exclusions.src.html

Lines changed: 28 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,28 @@ <h4 id="supported-basic-shapes">Supported Shapes</h4>
12031203
</li>
12041204
</ul>
12051205
</dd>
1206+
<dt><dfn id="inset-rectangle">inset-rectangle</dfn>([&lt;length&gt;|&lt;percentage&gt;]{4} [ curve [&lt;length&gt;|&lt;percentage&gt;]{1,2} ]? )</dt>
1207+
<dd>
1208+
<ul>
1209+
<li>
1210+
The four values represent the
1211+
<strong>top, right, bottom</strong> and
1212+
<strong>left</strong> insets that
1213+
define the bounding box
1214+
of the inset rectangle.
1215+
Negative values for any of these insets are invalid.
1216+
</li>
1217+
<li>
1218+
The two 'curve' values represent
1219+
<strong> rx</strong> and <strong>ry</strong>.
1220+
For rounded inset rectangles they define
1221+
the x-axis radius and y-axis radius
1222+
of the ellipse used to round off
1223+
the corners of the inset rectangle.
1224+
Negative values for rx and ry are invalid.
1225+
</li>
1226+
</ul>
1227+
</dd>
12061228
<dt><dfn id="circle">circle</dfn>([&lt;length&gt;|&lt;percentage&gt;]{3})</dt>
12071229
<dd>
12081230
<ul>
@@ -1328,6 +1350,9 @@ <h4 id='basic-shape-interpolation'>Interpolation of Basic Shapes</h4>
13281350
<li>Set the values for rx and ry on the temporary rectangle to ‘50%’.</li>
13291351
<li>Interpolate between the two rectangles as above.</li></ul>
13301352
</li>
1353+
<li>If one basic shape is an inset-rectangle and the second is of type rectangle, circle or ellipse:
1354+
<ul><li>Replace the inset-rectangle with a temporary rectangle of equal dimension.</li>
1355+
<li>Interpolate between the basic shapes as above.</li></ul>
13311356
<li>If both basic shapes are of type polygon and if both polygons have the same number of vertices:
13321357
<ul><li>Interpolate between each value.</li></ul>
13331358
</li>
@@ -1501,7 +1526,7 @@ <h4 id="shape-outside-property">The 'shape-outside' Property</h4>
15011526
<dl>
15021527
<dt><dfn title="'shape-outside'!!'&lt;basic-shape&gt;'">&lt;basic-shape&gt;</dfn></dt>
15031528
<dd>
1504-
The shape is computed based on the values of one of 'rectangle', 'circle', 'ellipse'
1529+
The shape is computed based on the values of one of 'rectangle', 'inset-rectangle', 'circle', 'ellipse'
15051530
or 'polygon'.
15061531
</dd>
15071532
</dl>
@@ -1629,7 +1654,7 @@ <h4 id="shape-inside-property">The 'shape-inside' Property</h4>
16291654
<dl>
16301655
<dt><dfn title="'shape-inside'!!'&lt;basic-shape&gt;'">&lt;basic-shape&gt;</dfn></dt>
16311656
<dd>
1632-
The shape is computed based on the values of one of 'rectangle', 'circle', 'ellipse'
1657+
The shape is computed based on the values of one of 'rectangle', 'inset-rectangle', 'circle', 'ellipse'
16331658
or 'polygon'.
16341659
</dd>
16351660
</dl>
@@ -1952,6 +1977,7 @@ <h2 class="no-num" id="change-log">Change Log</h2>
19521977

19531978
<h3 class="no-num" >Since <a href="http://www.w3.org/TR/2012/WD-css3-exclusions-20120503/">May 3rd 2012</a></h3>
19541979
<ul>
1980+
<li>added inset-rectangle() to basic shapes</li>
19551981
<li>Changed shape-inside overflow diagrams to show exclusion behavior</li>
19561982
<li>Changed shape-inside to contribute to the wrapping context</li>
19571983
<li>Defined exclusion edges relative to wrapping content's writing mode</li>

css-exclusions/Overview.html

Lines changed: 44 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
<meta content="CSS Exclusions and Shapes Module Level 3"
1414
name=dcterms.title>
1515
<meta content=text name=dcterms.type>
16-
<meta content=2013-04-16 name=dcterms.date>
16+
<meta content=2013-04-23 name=dcterms.date>
1717
<meta content="Vincent Hardy" name=dcterms.creator>
1818
<meta content="Rossen Atanassov" name=dcterms.creator>
1919
<meta content="Alan Stearns" name=dcterms.creator>
@@ -56,14 +56,14 @@
5656

5757
<h1 id=css-exclusions-module>CSS Exclusions and Shapes Module Level 3</h1>
5858

59-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 16 April 2013</h2>
59+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 23 April 2013</h2>
6060

6161
<dl>
6262
<dt>This version:
6363

6464
<dd><a
6565
href="http://dev.w3.org/csswg/css3-exclusions/">http://dev.w3.org/csswg/css3-exclusions/</a></dd>
66-
<!--<dd><a href="http://dev.w3.org/csswg/css3-exclusions/">http://www.w3.org/TR/2013/WD-css3-exclusions-20130416/</a></dd>-->
66+
<!--<dd><a href="http://dev.w3.org/csswg/css3-exclusions/">http://www.w3.org/TR/2013/WD-css3-exclusions-20130423/</a></dd>-->
6767

6868
<dt>Latest version:
6969

@@ -1595,6 +1595,23 @@ <h4 id=supported-basic-shapes><span class=secno>4.2.1. </span>Supported
15951595
are invalid.
15961596
</ul>
15971597

1598+
<dt><dfn
1599+
id=inset-rectangle>inset-rectangle</dfn>([&lt;length&gt;|&lt;percentage&gt;]{4}
1600+
[ curve [&lt;length&gt;|&lt;percentage&gt;]{1,2} ]? )
1601+
1602+
<dd>
1603+
<ul>
1604+
<li> The four values represent the <strong>top, right, bottom</strong>
1605+
and <strong>left</strong> insets that define the bounding box of the
1606+
inset rectangle. Negative values for any of these insets are invalid.
1607+
1608+
<li> The two ‘<code class=property>curve</code>’ values represent
1609+
<strong> rx</strong> and <strong>ry</strong>. For rounded inset
1610+
rectangles they define the x-axis radius and y-axis radius of the
1611+
ellipse used to round off the corners of the inset rectangle. Negative
1612+
values for rx and ry are invalid.
1613+
</ul>
1614+
15981615
<dt><dfn id=circle>circle</dfn>([&lt;length&gt;|&lt;percentage&gt;]{3})
15991616

16001617
<dd>
@@ -1713,6 +1730,15 @@ <h4 id=basic-shape-interpolation><span class=secno>4.2.3.
17131730
<li>Interpolate between the two rectangles as above.
17141731
</ul>
17151732

1733+
<li>If one basic shape is an inset-rectangle and the second is of type
1734+
rectangle, circle or ellipse:
1735+
<ul>
1736+
<li>Replace the inset-rectangle with a temporary rectangle of equal
1737+
dimension.
1738+
1739+
<li>Interpolate between the basic shapes as above.
1740+
</ul>
1741+
17161742
<li>If both basic shapes are of type polygon and if both polygons have the
17171743
same number of vertices:
17181744
<ul>
@@ -1936,9 +1962,11 @@ <h4 id=shape-outside-property><span class=secno>4.4.1. </span>The ‘<a
19361962

19371963
<dd> The shape is computed based on the values of one of ‘<a
19381964
href="#rectangle"><code class=property>rectangle</code></a>’, ‘<a
1939-
href="#circle"><code class=property>circle</code></a>’, ‘<a
1940-
href="#ellipse"><code class=property>ellipse</code></a>’ or ‘<a
1941-
href="#polygon"><code class=property>polygon</code></a>’.
1965+
href="#inset-rectangle"><code
1966+
class=property>inset-rectangle</code></a>’, ‘<a href="#circle"><code
1967+
class=property>circle</code></a>’, ‘<a href="#ellipse"><code
1968+
class=property>ellipse</code></a>’ or ‘<a href="#polygon"><code
1969+
class=property>polygon</code></a>’.
19421970
</dl>
19431971

19441972
<dl>
@@ -2075,9 +2103,11 @@ <h4 id=shape-inside-property><span class=secno>4.4.2. </span>The ‘<a
20752103

20762104
<dd> The shape is computed based on the values of one of ‘<a
20772105
href="#rectangle"><code class=property>rectangle</code></a>’, ‘<a
2078-
href="#circle"><code class=property>circle</code></a>’, ‘<a
2079-
href="#ellipse"><code class=property>ellipse</code></a>’ or ‘<a
2080-
href="#polygon"><code class=property>polygon</code></a>’.
2106+
href="#inset-rectangle"><code
2107+
class=property>inset-rectangle</code></a>’, ‘<a href="#circle"><code
2108+
class=property>circle</code></a>’, ‘<a href="#ellipse"><code
2109+
class=property>ellipse</code></a>’ or ‘<a href="#polygon"><code
2110+
class=property>polygon</code></a>’.
20812111
</dl>
20822112

20832113
<dl>
@@ -2658,6 +2688,9 @@ <h2 class=no-num id=index>Index</h2>
26582688
<li>Float area, <a href="#float-area"
26592689
title="section 2."><strong>2.</strong></a>
26602690

2691+
<li>inset-rectangle, <a href="#inset-rectangle"
2692+
title="section 4.2.1."><strong>4.2.1.</strong></a>
2693+
26612694
<li>outside-inside, <a href="#outside-and-inside"
26622695
title="section 2."><strong>2.</strong></a>
26632696

@@ -2917,6 +2950,8 @@ <h3 class=no-num id=since-may-3rd-2012>Since <a
29172950
2012</a></h3>
29182951

29192952
<ul>
2953+
<li>added inset-rectangle() to basic shapes
2954+
29202955
<li>Changed shape-inside overflow diagrams to show exclusion behavior
29212956

29222957
<li>Changed shape-inside to contribute to the wrapping context

0 commit comments

Comments
 (0)