Skip to content

Commit e8fdad5

Browse files
committed
Add note to shape-margin and its examples
1 parent 46225e4 commit e8fdad5

2 files changed

Lines changed: 27 additions & 5 deletions

File tree

css-shapes-1/Overview.bs

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ Group: csswg
88
TR: https://www.w3.org/TR/css-shapes/
99
ED: https://drafts.csswg.org/css-shapes/
1010
Previous Version: http://www.w3.org/TR/2014/CR-css-shapes-1-20140320/
11-
Editor: Vincent Hardy, Adobe Systems, Inc., vhardy@adobe.com
1211
Editor: Rossen Atanassov, Microsoft Corporation, ratan@microsoft.com, w3cid 49885
13-
Editor: Alan Stearns, Adobe Systems, Inc., stearns@adobe.com, w3cid 46659
12+
Editor: Alan Stearns, Adobe, stearns@adobe.com, w3cid 46659
13+
Former Editor: Vincent Hardy
1414
Abstract: CSS Shapes describe geometric shapes for use in CSS. For Level 1, CSS Shapes can be applied to floats. A circle shape on a float will cause inline content to <a>wrap</a> around the circle shape instead of the float's bounding box.
1515
Link Defaults: css2 (property) margin
1616
</pre>
@@ -1020,13 +1020,22 @@ Expanding a Shape: the 'shape-margin' property</h3>
10201020
Sets the margin of the shape to the specified value.
10211021
</dl>
10221022

1023+
Note: Adding a shape-margin does NOT allow a float area
1024+
to extend outside a float's margin box.
1025+
Extra margin may need to be applied
1026+
along with shape-margin to avoid clipping.
1027+
10231028
<div class="example">
10241029

1025-
A 'shape-margin' creating an offset from a polygonal 'shape-outside'. The lighter blue area shows the shape in a 100x100px float, and the darker blue area shows the 10px offset.
1030+
A 'shape-margin' creating an offset from a polygonal 'shape-outside'.
1031+
The lighter blue area shows the shape in a 100x100px float,
1032+
and the darker blue area shows the 10px offset.
10261033

10271034
<pre>
10281035
<code>
10291036
.float {
1037+
width: 100px;
1038+
height: 100px;
10301039
shape-outside: polygon(10px 10px, 90px 50px, 40px 50px, 90px 90px, 10px 90px);
10311040
shape-margin: 10px;
10321041
}
@@ -1042,10 +1051,16 @@ Expanding a Shape: the 'shape-margin' property</h3>
10421051
to the CSS logo from example 6,
10431052
the line boxes <a>wrapping</a>
10441053
around the shape are shortened further.
1054+
In case the image’s alpha channel
1055+
runs up to the right edge of the image,
1056+
some extra margin-right should be applied
1057+
to ensure the shape is not clipped by the margin box.
1058+
10451059
<pre>
10461060
<code>
10471061
#CSSlogo {
10481062
shape-margin: 35px;
1063+
margin-right: 35px;
10491064
}
10501065
</code>
10511066
</pre>
@@ -1063,6 +1078,8 @@ Acknowledgments</h2>
10631078
This specification is made possible by input from
10641079
Andrei Bucur,
10651080
Alexandru Chiculita,
1081+
Boris Chiou,
1082+
Emilio Cobos Álvarez,
10661083
Elika Etemad,
10671084
Arron Eicholz,
10681085
Sylvain Galineau,
@@ -1071,13 +1088,17 @@ Acknowledgments</h2>
10711088
Zoltan Horvath,
10721089
Chris Jones,
10731090
Bem Jones-Bey,
1091+
Ian Kilpatrick,
1092+
Ting-Yu Lin,
1093+
Eric Meyer,
10741094
Marcus Mielke,
10751095
Alex Mogilevsky,
10761096
Hans Muller,
10771097
Mihnea Ovidenie,
10781098
Virgil Palanciuc,
10791099
Robert Sanderson,
10801100
Dirk Schulze,
1101+
Jen Simmons,
10811102
Peter Sorotokin,
10821103
Bear Travis,
10831104
Eugene Veselov,
@@ -1094,6 +1115,7 @@ Since <a href="https://www.w3.org/TR/2014/CR-css-shapes-1-20140320/">March 20th
10941115
<li>Clarified empty circles and ellipses for <a href="https://github.com/w3c/csswg-drafts/issues/850">issue #850</a></li>
10951116
<li>Moved path() back from level 2</li>
10961117
<li>Added handling of negative margins for margin-box</li>
1118+
<li>Added clarifications to shape-margin examples</li>
10971119
</ul>
10981120

10991121
<h3 class="no-num" id="20140211">

css-shapes-1/issues-cr-20141015.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@ Issue 1.
66
Summary: [css-shapes] Shapes, margin clipping, and misleading examples
77
From: Eric Meyer
88
Comment: https://lists.w3.org/Archives/Public/www-style/2015Oct/0136.html
9-
Response:
10-
Closed:
9+
Response: https://lists.w3.org/Archives/Public/www-style/2015Oct/0168.html
10+
Closed: Accepted
1111
----
1212
Issue 2.
1313
Summary: [css-shapes] Add a note that a circle with a radius of 0 defines an empty area

0 commit comments

Comments
 (0)