forked from w3c/csswg-drafts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOverview.src.html
More file actions
836 lines (756 loc) · 31.9 KB
/
Overview.src.html
File metadata and controls
836 lines (756 loc) · 31.9 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
<!DOCTYPE html public '-//W3C//DTD HTML 4.01//EN' 'http://www.w3.org/TR/html4/strict.dtd'>
<html lang="en">
<head profile="http://www.w3.org/2006/03/hcard">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" >
<title>CSS Shapes Module Level 1</title>
<script src='http://test.csswg.org/harness/annotate.js#css-shapes-1_dev' type='text/javascript' defer></script>
<link rel="stylesheet" type="text/css" href="../shared/style/default.css" >
<style type="text/css">
.singleImgExample {
display: block;
margin: auto;
}
.example-table {
table-layout: fixed;
width: 100%;
}
.example-table tr td img {
width: 90%;
}
</style>
<link rel="stylesheet" type="text/css"
href="issues.css">
<link rel="stylesheet" type="text/css"
href="http://www.w3.org/StyleSheets/TR/W3C-ED.css">
<link id="st" href="../shared/style/alternate-spec-style.css" rel="stylesheet"
type="text/css" title="alternate spec style">
</head>
<body>
<div id="div-head" class="head">
<!--begin-logo-->
<p><a href="http://www.w3.org/"><img id="mobile-logo" alt="W3C" height="53" src=
"http://www.w3.org/2008/site/images/logo-w3c-mobile-lg" width="90"></a>
<p><a href="http://www.w3.org/"><img id="logo" alt="W3C" height="48" src=
"http://www.w3.org/Icons/w3c_home" width="72"></a> <!--end-logo--></p>
<h1 id="css-shapes-module">CSS Shapes Module Level 1</h1>
<h2 class="no-num no-toc">[LONGSTATUS] [DATE]</h2>
<dl>
<dt>This version:</dt>
<dd><a href="[VERSION]">[VERSION]</a></dd>
<dt>Latest version:</dt>
<dd><a href="http://www.w3.org/TR/[SHORTNAME]/">http://www.w3.org/TR/css-shapes/</a></dd>
<dt>Editor's Draft:</dt>
<dd><a href="http://dev.w3.org/csswg/[SHORTNAME]/">http://dev.w3.org/csswg/[SHORTNAME]/</a>
<dt>Previous version:</dt>
<dd>None</dd>
<dt>Editors:</dt>
<dd class="vcard"><span class="fn">Vincent Hardy</span>, <span class="org">Adobe Systems, Inc.</span>, <span class="email">vhardy@adobe.com</span></dd>
<dd class="vcard"><span class="fn">Rossen Atanassov</span>, <span class="org">Microsoft Corporation</span>, <span class="email">ratan@microsoft.com</span></dd>
<dd class="vcard"><span class="fn">Alan Stearns</span>, <span class="org">Adobe Systems, Inc.</span>, <span class="email">stearns@adobe.com</span></dd>
<dt>Issues List:</dt>
<dd><a href="https://www.w3.org/Bugs/Public/buglist.cgi?query_format=advanced&product=CSS&component=Shapes&resolution=---&cmdtype=doit">in Bugzilla</a></dd>
<dt>Feedback:</dt>
<dd><a href="mailto:www-style@w3.org?subject=%5B[css-shapes]%5D%20feedback"
>www-style@w3.org</a>
with subject line “<kbd>[css-shapes]
<var>… message topic …</var></kbd>”
(<a rel="discussion" href="http://lists.w3.org/Archives/Public/www-style/"
>archives</a>)
<dt>Test Suite:</dt>
<dd><a href="http://test.csswg.org/suites/css3-shapes/nightly-unstable/">http://test.csswg.org/suites/css3-regions/nightly-unstable/</a></dd>
</dl>
<!--copyright-->
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc" id="abstract">Abstract</h2>
<p>CSS Shapes control the geometric shapes used
for wrapping inline flow content outside an element.
For Level 1, CSS Shapes can be applied to floats.
A circle shape on a float will cause inline content
to wrap around the circle shape
instead of the float's bounding box.
</p>
<p class="note">
Future levels of CSS Shapes will allow use of shapes
on elements other than floats
</p>
<h2 class="no-num no-toc" id="status">Status of this document</h2>
<!--status-->
<p>A previous version of this draft has been published as part of the
Working Draft <a
href="http://www.w3.org/TR/2012/WD-css3-exclusions-20120503/"
>“<cite>CSS Exclusions and Shapes</cite>” dated 3 May 2012.</a>
<h2 class="no-num no-toc" id="contents">Table of contents</h2>
<!--toc-->
<h2 id="intro">Introduction</h2>
<p><em>This section is not normative.</em></p>
<p>
This specification defines properties to control the geometry of
an element's <span>float area</span>.
</p>
<h2 id="definitions">Definitions</h2>
<p><dfn>Float area</dfn>
<p>
The area used for wrapping content around a float element. By default, the
float area is the float element's
<a href="http://www.w3.org/TR/CSS2/box.html#box-dimensions">margin box</a>.
This specification's
'shape-outside' property can be used to define arbitrary, non-rectangular float
areas.
</p>
<h2 id="shapes">Shapes</h2>
<p>
Shapes define arbitrary geometric contours around which inline
content flows. The shape-outside property defines the <span>float area</span> for a float.
</p>
<p class="note">
If a user agent implements both CSS Shapes and CSS Exclusions,
the shape-outside property defines
the exclusion area for an exclusion.
</p>
<p class="note">
A future level of CSS Shapes will define a shape-inside property,
which will define a shape to wrap content within the element.
</p>
<h3 id="relation-to-box-model-and-float-behavior">Relation to the box model and float behavior</h3>
<p>
While the boundaries used
for wrapping inline flow content
outside a float
can be defined using shapes,
the actual box model does not change.
If the element has specified
margins, borders or padding
they will be computed and rendered
according to the [[!CSS3BOX]] module.
</p>
<p>
When a shape is used to define
a <span>float area</span>,
the shape is clipped
to the float's margin box.
In other words,
a shape can only ever reduce
a <span>float area</span>,
not increase it.
When a shape reduces
a <span>float area</span> such that
a line box that would be normally
be affected by the float
would not intersect
the <span>float area</span> at all,
the available space
for the line box is constrained
by the farthest margin edge
of the float.
For a left float this would be
the left margin edge,
and for a right float this would be
the right margin edge.
</p>
<div class="example">
<p>
In the following example
the left and right floating
<code class="html">div</code> elements
specify a triangular shape
using the 'shape-outside' property.
</p>
<pre><code class="html">
<div style="text-align:center;">
<div id="float-left"></div>
<div id="float-right"></div>
<div>
Sometimes a web page's text content appears to be
funneling your attention towards a spot on the page
to drive you to follow a particular link. Sometimes
you don't notice.
</div>
</div>
<style type="text/css">
#float-left {
shape-outside: polygon(0 0, 100% 100%, 0 100%);
float: left;
width: 40%;
height: 12ex;
}
#float-right {
shape-outside: polygon(100% 0, 100% 100%, 0 100%);
float: right;
width: 40%;
height: 12ex;
}
</style>
</div></code></pre>
<img class="singleImgExample" src="images/float-shape-outside.png" alt="Using the shape-outside property with a float"/>
</div>
<div class="example">
<p>
Since shapes are clipped to the float's margin box,
adding this shape to the left float above
would result in the same rendering.
<p>
<pre><code class="css">
shape-outside: polygon(0 0, 500% 500%, 0 500%);
</code></pre>
</div>
<div class="example">
<p>
A shape with no extent will create
a <span>float area</span> with no extent.
The shape below applied to a left float
will allow inline content
to flow through the float's box,
but the line boxes
will be constrained
by the float's left margin edge.
<p>
<pre><code class="css">
shape-outside: rectangle(0,0,0%,0%);
</code></pre>
</div>
<div class="example">
<p>
The following styling creates a shape much smaller than the float's content area, and adds a margin-top to the float. In the picture, the shape is rendered in blue, the content area in mauve, and the margin area in yellow. The inline content only wraps around the shape.
</p>
<pre><code class="html">
.float-left {
shape-outside: polygon(0% 50%, 50% 100%, 0 100%);
float: left;
width: 100px;
height: 100px;
margin-top: 20px;
}
</code></pre>
<img class="singleImgExample" src="images/float-margin-example.png" alt="Adding margin-top to a float with a small shape-outside"/>
<p>
The next picture shows a possible result if two of these floats were stacked next to each other.
</p>
<img class="singleImgExample" src="images/stacked-float-example.png" alt="Stacking two floats to show far margin edge constraint"/>
</div>
<h3 id="basic-shapes-from-svg-syntax">Basic Shapes</h3>
<p>
Shapes can be specified using
syntax similar to SVG's <a href="http://www.w3.org/TR/SVG/shapes.html">basic shapes</a>.
The definitions use
<code><a href="http://www.w3.org/TR/css3-values/#lengths"><length></a></code> type and the
<code><a href="http://www.w3.org/TR/css3-values/#percentages"><percentage></a></code>
types [[!CSS3VAL]].
When using this syntax
to define shapes,
the relevant box is determined
by the computed value of the
<a href="http://www.w3.org/TR/css3-ui/#box-sizing">'box-sizing'</a>
property.
The coordinate system for the shape
has its origin on the top-left corner of the
relevant box with the x-axis
running to the right
and the y-axis running downwards.
All the lengths expressed in percentages
are resolved from the used dimensions
of the relevant box.
For the radius <code>r</code> of the <code>circle</code> shape,
a percentage value is resolved as
<a href="http://www.w3.org/TR/SVG/coords.html#Units">specified</a>
in the SVG recommendation [[!SVG11]].
</p>
<h4 id="supported-basic-shapes">Supported Shapes</h4>
<p>The following basic shapes are supported.
<dl>
<dt><dfn id="rectangle">rectangle</dfn>([<length>|<percentage>][, [<length>|<percentage>]]{3,5})</dt>
<dd>
<ul>
<li>
The first four values represent
<strong>x, y, width</strong> and
<strong>height</strong>.
They define the bounding box
of the rectangle.
Negative values for width and height are invalid.
</li>
<li>
The last two optional values represent
<strong> rx</strong> and <strong>ry</strong>.
For rounded rectangles they define
the x-axis radius and y-axis radius
of the ellipse used to round off
the corners of the rectangle.
Negative values for rx and ry are invalid.
See notes below on edge cases for these values.
</li>
</ul>
</dd>
<dt><dfn id="inset-rectangle">inset-rectangle</dfn>([<length>|<percentage>][, [<length>|<percentage>]]{3,5})</dt>
<dd>
<ul>
<li>
The first four values represent the
<strong>top, right, bottom</strong> and
<strong>left</strong> insets that
define the bounding box
of the inset rectangle.
Negative values for any of these insets are invalid.
</li>
<li>
The last two optional values represent
<strong> rx</strong> and <strong>ry</strong>.
For rounded inset rectangles they define
the x-axis radius and y-axis radius
of the ellipse used to round off
the corners of the inset rectangle.
Negative values for rx and ry are invalid.
See notes below on edge cases for these values.
</li>
</ul>
</dd>
<dt><dfn id="circle">circle</dfn>([<length>|<percentage>][, [<length>|<percentage>]]{2})</dt>
<dd>
<ul>
<li>
The three values values represent
<strong>cx</strong>,
<strong>cy</strong>,
and <strong>r</strong>.
They define the x-axis and y-axis coordinates
of the center of the circle
and the radius of the circle.
A negative value for r is invalid.
</li>
</ul>
</dd>
<dt><dfn id="ellipse">ellipse</dfn>([<length>|<percentage>][, [<length>|<percentage>]]{3})</dt>
<dd>
<ul>
<li>
The four values represent
<strong>cx</strong>,
<strong>cy</strong>,
<strong>rx</strong>, and
<strong>ry</strong>.
They define the x-axis and y-axis coordinates
of the center of the ellipse
and the x-axis and y-axis radius
of the ellipse.
Negative values for rx and ry are invalid.
</li>
</ul>
</dd>
<dt><dfn id="polygon">polygon</dfn>([<fill-rule>,]?[<length>|<percentage>]{2}#)</dt>
<dd>
<ul>
<li><strong>fill-rule</strong> - The filling rule used to determine the interior of the
polygon. See <a href="http://www.w3.org/TR/SVG/painting.html#FillRuleProperty">fill-rule</a> property in SVG for details. Possible values are nonzero
or evenodd. Default value when omitted is nonzero.</li>
<li>
The two length values represent <strong>xi</strong> and <strong>yi</strong> -
the <strong>x</strong> and <strong>y</strong> axis coordinates of the i-th vertex of the polygon.
</li>
</ul>
<p>The UA must close a polygon
by connecting the last vertex
with the first vertex of the list.</p>
<br/>
</dd>
</dl>
<p>The values for corner radii
on rectangle or inset-rectangle
are determined implicitly
if either the rx or ry values
are not specified,
or are specified but with invalid values.
If neither rx nor ry are properly specified,
the values are 0 for both.
If only one value is properly specified,
that value is used for both.
And if the values cause any
of the curves to overlap,
the solution for
<a href="http://www.w3.org/TR/css3-background/#corner-overlap">overlapping curves</a>
from CSS Backgrounds and Borders [[!CSS3BG]]
is used to avoid the overlap.
<p>
<h4 id='basic-shape-interpolation'>Interpolation of Basic Shapes</h4>
<p>For interpolating between
one basic shape and a second,
the rules described below are applied.
</p>
<ul>
<li>If both basic shapes are of the same type and not of type polygon:
<ul><li>Interpolate between each value.</li></ul>
</li>
<li>If one basic shape is of type rectangle and the second of type circle or ellipse:
<ul><li>Replace the circle/ellipse with a temporary rectangle of equal dimension.</li>
<li>Set the values for rx and ry on the temporary rectangle to ‘50%’.</li>
<li>Interpolate between the two rectangles as above.</li></ul>
</li>
<li>If one basic shape is an inset-rectangle and the second is of type rectangle, circle or ellipse:
<ul><li>Replace the inset-rectangle with a temporary rectangle of equal dimension.</li>
<li>Interpolate between the basic shapes as above.</li></ul>
<li>If both basic shapes are of type polygon and if both polygons have the same number of vertices:
<ul><li>Interpolate between each value.</li></ul>
</li>
<li>In all other cases:
<ul><li>No interpolation is specified.</li></ul></li>
</ul>
<h3 id="shapes-from-image">Shapes from Image</h3>
<p>
Another way of defining shapes
is by specifying a source image
whose alpha channel is used
to compute the shape.
The shape is computed to be the path
that encloses the area
where the opacity of the specified image
is greater than the 'shape-image-threshold' value.
If the 'shape-image-threshold' is not specified,
the initial value to be considered is 0.0.
</p>
<p>For animated raster image formats
(such as <a href="http://www.w3.org/Graphics/GIF/spec-gif89a.txt">GIF</a>),
the first frame of the animation sequence is used. <!--
For <a href="http://www.w3.org/TR/2002/WD-SVG2Reqs-20020422/">SVG</a>
images ([[SVG11]]),
the image is rendered without animations applied.--></p>
<div class="example">
<p>An image is floating to the left of a paragraph. The image shows the 3D version of the
CSS logo over a transparent background. The logo has a shadow using an alpha-channel.</p>
<p>The image defines its <span>float area</span> through the 'shape-outside' property and
specifies a value of 35 pixels for the 'shape-margin' property.</p>
<pre><code class="html">
<p>
<img id="CSSlogo" src="CSS-logo1s.png"/>
blah blah blah blah...
</p>
<style>
#CSSlogo {
float: left;
shape-outside: url("CSS-logo1s.png");
shape-image-threshold: 0.1;
shape-margin: 35px;
}
</style></code></pre>
<p>The image needs two references to the image because this example uses the same image</p>
<ol>
<li>to render it</li>
<li>as a shape defining the <span>float area</span> of the image</li>
</ol>
<p>It is perfectly possible to display an image and use a different image for its
<span>float area</span>.</p>
<p>In the figure below, the alpha-channel threshold is represented by the dotted line around
the CSS logo and the 35px shape-margin is visible between that line and the edges of
each individual line of the paragraph.</p>
<p>It's then possible to affect where the lines of the paragraph start in three ways:</p>
<ol>
<li>Changing the value of the 'shape-margin' property</li>
<li>Changing the value of the 'shape-image-threshold' property</li>
<li>Modifying the alpha channel in the image</li>
</ol>
<div class='figure'>
<img alt="A float shape around an image using its alpha-channel with a 35 pixels shape-margin" src="images/shape-outside-image.png" width="70%"/>
<p class="caption">A float shape around an image using its alpha-channel with a 35 pixels shape-margin</p>
</div>
</div>
<!-- End section "Shapes from image" -->
<h3 id="declaring-shapes">Declaring Shapes</h3>
<p>
Shapes are declared with
the 'shape-outside' property,
with possible modifications
from the 'shape-margin' property.
The shape defined by
the 'shape-outside'
and 'shape-margin' properties
changes the geometry
of a float element's
<span>float area</span>.
</p>
<h4 id="shape-outside-property">The 'shape-outside' Property</h4>
<table class="propdef">
<tr>
<th>Name:</th>
<td><dfn title="'shape-outside'">shape-outside</dfn></td>
</tr>
<tr>
<th>Value:</th>
<td><var>auto</var> | <var><basic-shape></var> | <var><image></var></td>
</tr>
<tr>
<th>Initial:</th>
<td>auto</td>
</tr>
<tr>
<th>Applies to:</th>
<td>floats</td>
</tr>
<tr>
<th>Inherited:</th>
<td>no</td>
</tr>
<tr>
<th>Percentages:</th>
<td>N/A</td>
</tr>
<tr>
<th>Media:</th>
<td>visual</td>
</tr>
<tr>
<th>Computed value:</th>
<td>computed lengths for <basic-shape>, the image with its URI made absolute, otherwise as specified</td>
</tr>
</table>
<p>The values of this property have the following meanings:</p>
<dl>
<dt><dfn title="'shape-outside'!!'auto'">auto</dfn></dt>
<dd>The <span>float area</span> uses the margin box as normal.</dd>
</dl>
<dl>
<dt><dfn title="'shape-outside'!!'<basic-shape>'"><basic-shape></dfn></dt>
<dd>
The shape is computed based on the values of one of 'rectangle', 'inset-rectangle', 'circle', 'ellipse'
or 'polygon'.
</dd>
</dl>
<dl>
<dt><dfn title="'shape-outside'!!'<uri>'"><image></dfn></dt>
<dd>
The shape is extracted
and computed based
on the alpha channel
of the specified <a href="http://dev.w3.org/csswg/css-values/#images"><image></a> [[!CSS3VAL]]
User agents must use the
<a href="http://www.w3.org/TR/html5/infrastructure.html#cors-enabled-fetch">potentially CORS-enabled fetch</a>
method defined by the [[!HTML5]] specification
for all URLs in a shape-outside value.
When fetching,
user agents must use "Anonymous" mode,
set the referrer source
to the stylesheet's URL
and set the origin to the URL
of the containing document.
If this results in network errors
such that there is no valid fallback image,
the effect is as if
the value 'auto'
had been specified.
</dd>
</dl>
<!-- End section "The shape-outside Property" -->
<h4 id="shape-image-threshold-property">The 'shape-image-threshold' Property</h4>
<p>
The 'shape-image-threshold'
defines the alpha channel threshold
used to extract the shape
using an image.
A value of 0.5 means that
the shape will enclose
all the pixels
that are more than 50% opaque.
</p>
<table class="propdef">
<tr>
<th>Name:</th>
<td><dfn title="'shape-image-threshold'">shape-image-threshold</dfn></td>
</tr>
<tr>
<th>Value:</th>
<td><var><alphavalue></var></td>
</tr>
<tr>
<th>Initial:</th>
<td>0.0</td>
</tr>
<tr>
<th>Applies to:</th>
<td>floats</td>
</tr>
<tr>
<th>Inherited:</th>
<td>no</td>
</tr>
<tr>
<th>Percentages:</th>
<td>alpha channel of the image specified by <span>shape-outside</span></td>
</tr>
<tr>
<th>Media:</th>
<td>visual</td>
</tr>
<tr>
<th>Computed value:</th>
<td>The same as the specified value after clipping the <alphavalue> to the range [0.0,1.0].</td>
</tr>
</table>
<p>The values of this property have the following meanings:</p>
<dl>
<dt><dfn title="'shape-image-threshold'!!'<alphavalue>'"><alphavalue></dfn></dt>
<dd>
A <number> value used to set the threshold used for extracting a shape from
an image. Any values outside the range 0.0 (fully transparent) to 1.0 (fully opaque)
will be clamped to this range.
</dd>
</dl>
<!-- End section "The shape-image-threshold property" -->
<!-- End section "Declaring Shapes" -->
<h4 id="shape-margin-property">The 'shape-margin' property</h4>
<p>
The 'shape-margin' property adds a margin to a shape-outside.
This defines a new shape where every point
is the specified distance from the shape-outside.
This property takes on positive values only.
</p>
<table class="propdef">
<tr>
<th>Name:</th>
<td><dfn title="'shape-margin'">shape-margin</dfn></td>
</tr>
<tr>
<th>Value:</th>
<td><var><length></var></td>
</tr>
<tr>
<th>Initial:</th>
<td>0</td>
</tr>
<tr>
<th>Applies to:</th>
<td>floats</td>
</tr>
<tr>
<th>Inherited:</th>
<td>no</td>
</tr>
<tr>
<th>Percentages:</th>
<td>N/A</td>
</tr>
<tr>
<th>Media:</th>
<td>visual</td>
</tr>
<tr>
<th>Computed value:</th>
<td>the absolute length</td>
</tr>
</table>
<div class="example">
<p>A 'shape-margin' creating an offset
from a circlular shape-outside.
The blue rectangles represent
inline content affected
by the shape created
by the margin.</p>
<img src="images/shape-margin.png"
alt="Example of a shape-margin offset"/>
</div>
<!-- End secion "shape-margin property" -->
<!-- End section "Shapes" -->
<h2 id="conformance">Conformance</h2>
<!--conformance-->
<h2 class="no-num" id="acknowledgments">Acknowledgments</h2>
<p>This specification is made possible by input from
Andrei Bucur,
Alexandru Chiculita,
Arron Eicholz,
Daniel Glazman,
Arno Gourdol,
Zoltan Horvath,
Chris Jones,
Bem Jones-Bey,
Marcus Mielke,
Alex Mogilevsky,
Hans Muller,
Mihnea Ovidenie,
Virgil Palanciuc,
Dirk Schulze,
Peter Sorotokin,
Bear Travis,
Eugene Veselov,
Stephen Zilles
and the CSS Working Group members.
</p>
<h2 class="no-num" id="references">References</h2>
<h3 class="no-num" id="normative-references">Normative references</h3>
<!--normative-->
<h3 class="no-num" id="other-references">Other references</h3>
<!--informative-->
<h2 class="no-num" id="index">Index</h2>
<!--index-->
<h2 class="no-num" id="property-index">Property index</h2>
<!-- properties -->
<!-- template markup for issues pulled from Bugzilla -->
<!-- issue template and script need a new API to access bugzilla
<script type="text/template" id="issue-template">
<div class="issue-marker" data-bug_id="{{bug_id}}" data-bug_status="{{bug_status}}">
<a href="https://www.w3.org/Bugs/Public/show_bug.cgi?id={{bug_id}}">Issue-{{bug_id}}</a>
<div class="issue-details">
<p class="short-desc">{{short_desc}}</p>
</div>
</div>
</script>
<script type="text/javascript" src="../shared/scripts/BugzillaTrackerUtil.js"></script>
<script type="text/javascript" src="../shared/scripts/BugzillaTracker.js"></script>
<script type="text/javascript">
checkSpecificationIssues('CSS', 'Shapes');
</script>
-->
<h2 class="no-num" id="change-log">Change Log</h2>
<h3 class="no-num" >Since <a href="http://www.w3.org/TR/2013/WD-css-shapes-1-20130620/">June 20th 2013</a></h3>
<ul>
<li>Added CORS fetching to shape-outside URLs</li>
<li>Changed shape-outside value from <uri> to <image></li>
<li>Fixed basic shape grammar to use comma separators</li>
<li>Remove 'percentages based on auto-sizing resolve to 0'</li>
<li>Change initial value of shape-image-threshold to 0.0</li>
<li>Change float positioning to be unaffected by shape-outside</li>
<li>Shapes on floats clipped to float's margin box</li>
<li>Inline content constrained to at least the float's farthest margin edge</li>
</ul>
<h3 class="no-num" >Since <a href="http://www.w3.org/TR/2012/WD-css3-exclusions-20120503/">May 3rd 2012</a></h3>
<ul>
<li>Postpone shapes from SVG elements to a future Shapes level</li>
<li>Postpone shape-inside to a future Shapes level</li>
<li>split exclusions from shapes into separate modules</li>
<li>added inset-rectangle() to basic shapes</li>
<li>Changed shape-inside overflow diagrams to show exclusion behavior</li>
<li>Changed shape-inside to contribute to the wrapping context</li>
<li>Defined exclusion edges relative to wrapping content's writing mode</li>
<li>Made use of start, end, before and after consistent</li>
<li>Added interpolation for basic shapes</li>
<li>Changed basic shapes to depend on box specified with box-sizing</li>
<li>Added overflow behavior for shape-inside.</li>
<li>Added wrap-flow:minimum.</li>
<li>Clarified processing model.</li>
<li>Changed wrap-margin and wrap-padding to shape-margin and shape-padding.</li>
<li>Removed wrap shorthand.</li>
</ul>
<h3 class="no-num" >Since <a href="http://www.w3.org/TR/2011/WD-css3-exclusions-20111213/">December 13th 2011</a></h3>
<ul>
<li>Clarified processing model.</li>
<li>Clarified interaction with floats.</li>
<li>Clarified that an exclusion element establishes a new block formatting context.</li>
</ul>
</body>
</html>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-declaration:"~/SGML/HTML4.decl"
sgml-default-doctype-name:"html"
sgml-minimize-attributes:t
sgml-nofill-elements:("pre" "style" "br")
sgml-live-element-indicator:t
sgml-omittag:nil
sgml-shorttag:nil
sgml-namecase-general:t
sgml-general-insert-case:lower
sgml-always-quote-attributes:t
sgml-indent-step:nil
sgml-indent-data:t
sgml-parent-document:nil
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
-->