Skip to content

Commit 1e1a4e8

Browse files
committed
[css-shapes] remove furthest margin constraint
1 parent f4e75d3 commit 1e1a4e8

6 files changed

Lines changed: 39 additions & 55 deletions

File tree

css-shapes/Overview.html

Lines changed: 19 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
rel=dcterms.rights>
1313
<meta content="CSS Shapes Module Level 1" name=dcterms.title>
1414
<meta content=text name=dcterms.type>
15-
<meta content=2013-07-19 name=dcterms.date>
15+
<meta content=2013-09-10 name=dcterms.date>
1616
<meta content="Vincent Hardy" name=dcterms.creator>
1717
<meta content="Rossen Atanassov" name=dcterms.creator>
1818
<meta content="Alan Stearns" name=dcterms.creator>
@@ -51,7 +51,8 @@
5151

5252
<h1 id=css-shapes-module>CSS Shapes Module Level 1</h1>
5353

54-
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 19 July 2013</h2>
54+
<h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 10 September
55+
2013</h2>
5556

5657
<dl>
5758
<dt>This version:
@@ -100,10 +101,11 @@ <h2 class="no-num no-toc" id=longstatus-date>Editor's Draft 19 July 2013</h2>
100101
</var></kbd>” (<a
101102
href="http://lists.w3.org/Archives/Public/www-style/"
102103
rel=discussion>archives</a>)
103-
104-
<dt>Test Suite:</dt>
105-
<dd><a href="http://test.csswg.org/suites/css3-shapes/nightly-unstable/">http://test.csswg.org/suites/css3-regions/nightly-unstable/</a></dd>
106-
104+
105+
<dt>Test Suite:
106+
107+
<dd><a
108+
href="http://test.csswg.org/suites/css3-shapes/nightly-unstable/">http://test.csswg.org/suites/css3-regions/nightly-unstable/</a>
107109
</dl>
108110
<!--begin-copyright-->
109111
<p class=copyright><a
@@ -293,12 +295,8 @@ <h3 id=relation-to-box-model-and-float-behavior><span class=secno>3.1.
293295
<p> When a shape is used to define a <a href="#float-area">float area</a>,
294296
the shape is clipped to the float's margin box. In other words, a shape
295297
can only ever reduce a <a href="#float-area">float area</a>, not increase
296-
it. When a shape reduces a <a href="#float-area">float area</a> such that
297-
a line box that would be normally be affected by the float would not
298-
intersect the <a href="#float-area">float area</a> at all, the available
299-
space for the line box is constrained by the farthest margin edge of the
300-
float. For a left float this would be the left margin edge, and for a
301-
right float this would be the right margin edge.
298+
it. A reduced float area may have no effect on some line boxes that would
299+
normally be affected by the float.
302300

303301
<div class=example>
304302
<p> In the following example the left and right floating <code
@@ -351,8 +349,7 @@ <h3 id=relation-to-box-model-and-float-behavior><span class=secno>3.1.
351349
<div class=example>
352350
<p> A shape with no extent will create a <a href="#float-area">float
353351
area</a> with no extent. The shape below applied to a left float will
354-
allow inline content to flow through the float's box, but the line boxes
355-
will be constrained by the float's left margin edge.
352+
allow inline content to flow through the float's box.
356353

357354
<p>
358355

@@ -380,7 +377,7 @@ <h3 id=relation-to-box-model-and-float-behavior><span class=secno>3.1.
380377
class=singleImgExample src="images/float-margin-example.png">
381378
<p> The next picture shows a possible result if two of these floats were
382379
stacked next to each other.</p>
383-
<img alt="Stacking two floats to show far margin edge constraint"
380+
<img alt="Stacking two floats with a small shape-outside"
384381
class=singleImgExample src="images/stacked-float-example.png"></div>
385382

386383
<h3 id=basic-shapes-from-svg-syntax><span class=secno>3.2. </span>Basic
@@ -1030,20 +1027,19 @@ <h3 class=no-num id=normative-references>Normative references</h3>
10301027
<dt id=CSS3VAL>[CSS3VAL]
10311028

10321029
<dd>Håkon Wium Lie; Tab Atkins; Elika J. Etemad. <a
1033-
href="http://www.w3.org/TR/2013/CR-css3-values-20130404/"><cite>CSS
1034-
Values and Units Module Level 3.</cite></a> 4 April 2013. W3C Candidate
1030+
href="http://www.w3.org/TR/2013/CR-css3-values-20130730/"><cite>CSS
1031+
Values and Units Module Level 3.</cite></a> 30 July 2013. W3C Candidate
10351032
Recommendation. (Work in progress.) URL: <a
1036-
href="http://www.w3.org/TR/2013/CR-css3-values-20130404/">http://www.w3.org/TR/2013/CR-css3-values-20130404/</a>
1033+
href="http://www.w3.org/TR/2013/CR-css3-values-20130730/">http://www.w3.org/TR/2013/CR-css3-values-20130730/</a>
10371034
</dd>
10381035
<!---->
10391036

10401037
<dt id=HTML5>[HTML5]
10411038

1042-
<dd>Ian Hickson. <a
1043-
href="http://www.w3.org/TR/2012/CR-html5-20121217/"><cite>HTML5.</cite></a>
1044-
17 December 2012. W3C Candidate Recommendation. (Work in progress.) URL:
1045-
<a
1046-
href="http://www.w3.org/TR/2012/CR-html5-20121217/">http://www.w3.org/TR/2012/CR-html5-20121217/</a>
1039+
<dd>Robin Berjon; et al. <a
1040+
href="http://www.w3.org/TR/2013/CR-html5-20130806/"><cite>HTML5.</cite></a>
1041+
6 August 2013. W3C Candidate Recommendation. (Work in progress.) URL: <a
1042+
href="http://www.w3.org/TR/2013/CR-html5-20130806/">http://www.w3.org/TR/2013/CR-html5-20130806/</a>
10471043
</dd>
10481044
<!---->
10491045

@@ -1244,9 +1240,6 @@ <h3 class=no-num id=since-june-20th-2013>Since <a
12441240
<li>Change float positioning to be unaffected by shape-outside
12451241

12461242
<li>Shapes on floats clipped to float's margin box
1247-
1248-
<li>Inline content constrained to at least the float's farthest margin
1249-
edge
12501243
</ul>
12511244

12521245
<h3 class=no-num id=since-may-3rd-2012>Since <a

css-shapes/Overview.src.html

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -171,20 +171,9 @@ <h3 id="relation-to-box-model-and-float-behavior">Relation to the box model and
171171
a shape can only ever reduce
172172
a <span>float area</span>,
173173
not increase it.
174-
When a shape reduces
175-
a <span>float area</span> such that
176-
a line box that would be normally
177-
be affected by the float
178-
would not intersect
179-
the <span>float area</span> at all,
180-
the available space
181-
for the line box is constrained
182-
by the farthest margin edge
183-
of the float.
184-
For a left float this would be
185-
the left margin edge,
186-
and for a right float this would be
187-
the right margin edge.
174+
A reduced float area may have no effect
175+
on some line boxes
176+
that would normally be affected by the float.
188177
</p>
189178

190179
<div class="example">
@@ -245,10 +234,7 @@ <h3 id="relation-to-box-model-and-float-behavior">Relation to the box model and
245234
a <span>float area</span> with no extent.
246235
The shape below applied to a left float
247236
will allow inline content
248-
to flow through the float's box,
249-
but the line boxes
250-
will be constrained
251-
by the float's left margin edge.
237+
to flow through the float's box.
252238
<p>
253239
<pre><code class="css">
254240
shape-outside: rectangle(0,0,0%,0%);
@@ -273,7 +259,7 @@ <h3 id="relation-to-box-model-and-float-behavior">Relation to the box model and
273259
<p>
274260
The next picture shows a possible result if two of these floats were stacked next to each other.
275261
</p>
276-
<img class="singleImgExample" src="images/stacked-float-example.png" alt="Stacking two floats to show far margin edge constraint"/>
262+
<img class="singleImgExample" src="images/stacked-float-example.png" alt="Stacking two floats with a small shape-outside"/>
277263
</div>
278264

279265
<h3 id="basic-shapes-from-svg-syntax">Basic Shapes</h3>
@@ -781,7 +767,6 @@ <h3 class="no-num" >Since <a href="http://www.w3.org/TR/2013/WD-css-shapes-1-201
781767
<li>Change initial value of shape-image-threshold to 0.0</li>
782768
<li>Change float positioning to be unaffected by shape-outside</li>
783769
<li>Shapes on floats clipped to float's margin box</li>
784-
<li>Inline content constrained to at least the float's farthest margin edge</li>
785770
</ul>
786771

787772
<h3 class="no-num" >Since <a href="http://www.w3.org/TR/2012/WD-css3-exclusions-20120503/">May 3rd 2012</a></h3>

css-shapes/examples/float-margin-example.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,6 @@
4040
<div class="margin-area"></div>
4141
<div class="content-area"></div>
4242
<div class="shape"></div>
43-
<p>Inline content will flow through the margins of a float with shape-outside. If the shape-outside does not fill the content box, inline content will flow through those areas as well. Line lengths are only constrained by the shape and the far margin edge.</p>
43+
<p>Inline content can flow through the margins of a float with shape-outside. If the shape-outside does not fill the content box, inline content will flow through those areas as well. Line lengths are only constrained by the portion of the shape that fits in the margin box.</p>
4444
</body>
4545
</html>

css-shapes/examples/stacked-float-example.html

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,15 +6,15 @@
66
<!-- lots of hacks to get this to work with the old shape positioning -->
77
<style>
88
body {
9-
width: 300px;
9+
width: 250px;
1010
}
1111
.shape {
1212
float: left;
1313
width: 100px;
14-
height: 120px;
14+
height: 50px;
1515
background-color: lightblue;
16-
-webkit-shape-outside: polygon(1px 0px, 1px 70px, 50px 120px, 0px 120px);
17-
-webkit-clip-path: polygon(0px 0px, 0px 70px, 50px 120px, 0px 120px);
16+
-webkit-shape-outside: polygon(0px 0px, 50px 50px, 0px 50px);
17+
-webkit-clip-path: polygon(0px 0px, 50px 50px, 0px 50px);
1818
}
1919
p {
2020
margin: 0;
@@ -35,12 +35,19 @@
3535
z-index: -1;
3636
}
3737
.first {
38-
-webkit-shape-outside: polygon(1px 0px, 1px 70px, 50px 119px, 100px 120px, 0px 120px);
39-
-webkit-clip-path: polygon(0px 0px, 0px 70px, 50px 120px, 0px 120px);
38+
height: 120px;
39+
-webkit-shape-outside: polygon(0px 70px, 50px 120px, 0px 120px);
40+
-webkit-clip-path: polygon(0px 70px, 50px 120px, 0px 120px);
4041
}
4142
.second {
4243
left: 108px;
4344
}
45+
.second.margin-area {
46+
top: 28px;
47+
}
48+
.second.content-area {
49+
top: 48px;
50+
}
4451
</style>
4552
</head>
4653
<body lang="en">
@@ -49,7 +56,6 @@
4956
<div class="second margin-area"></div>
5057
<div class="second content-area"></div>
5158
<div class="first shape"></div>
52-
<div class="shape"></div>
53-
<p>When floats with shapes are stacked, the far margin edge constraint keeps inline content from interacting with more than one float area per side.</p>
59+
<p>When floats with shapes are stacked, the margin box is used for the stacking. Other inline content is only constrained by the shapes themselves and will run through the open content area and <div class="shape"></div> margins outside the shape.</p>
5460
</body>
5561
</html>
18.9 KB
Loading
22.8 KB
Loading

0 commit comments

Comments
 (0)