-
Notifications
You must be signed in to change notification settings - Fork 791
Expand file tree
/
Copy pathOverview.html
More file actions
953 lines (734 loc) · 33.6 KB
/
Overview.html
File metadata and controls
953 lines (734 loc) · 33.6 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
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html lang=en>
<head
profile="http://dublincore.org/documents/2008/08/04/dc-html/ http://www.w3.org/2006/03/hcard">
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
<title>CSS Shapes Module Level 2</title>
<link href="http://purl.org/dc/terms/" rel=schema.dcterms>
<link href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
rel=dcterms.rights>
<meta content="CSS Shapes Module Level 2" name=dcterms.title>
<meta content=text name=dcterms.type>
<meta content=2014-03-17 name=dcterms.date>
<meta content="Alan Stearns" name=dcterms.creator>
<meta content=W3C name=dcterms.publisher>
<meta content="http://dev.w3.org/csswg/www-style/" name=dcterms.identifier><!--<script src='http://test.csswg.org/harness/annotate.js#css-shapes_DEV' type='text/javascript' defer></script>-->
<link href="../shared/style/default.css" rel=stylesheet type="text/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 href=issues.css rel=stylesheet type="text/css">
<link href="http://www.w3.org/StyleSheets/TR/W3C-ED.css" rel=stylesheet
type="text/css">
<link href="../shared/style/alternate-spec-style.css" id=st rel=stylesheet
title="alternate spec style" type="text/css">
<body>
<div class=head id=div-head> <!--begin-logo-->
<p><a href="http://www.w3.org/"><img alt=W3C height=48
src="http://www.w3.org/Icons/w3c_home" width=72></a> <!--end-logo-->
<h1 id=css-shapes-module>CSS Shapes Module Level 2</h1>
<h2 class="no-num no-toc">Editor's Draft 17 March 2014</h2>
<dl>
<dt>This version:
<dd><a
href="http://dev.w3.org/csswg/www-style/">http://dev.w3.org/csswg/www-style/</a>
<dt>Latest version:
<dd><a
href="http://dev.w3.org/csswg/www-style/">http://dev.w3.org/csswg/www-style/</a>
<dt>Editor's Draft:
<dd><a
href="http://dev.w3.org/csswg/www-style/">http://dev.w3.org/csswg/www-style/</a>
<dt>Previous version:
<dd>None
<dt>Editors:
<
72A1
;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:
<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
href="http://lists.w3.org/Archives/Public/www-style/"
rel=discussion>archives</a>)
</dl>
<!--begin-copyright-->
<p class=copyright><a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright"
rel=license>Copyright</a> © 2014 <a href="http://www.w3.org/"><abbr
title="World Wide Web Consortium">W3C</abbr></a><sup>®</sup> (<a
href="http://www.csail.mit.edu/"><abbr
title="Massachusetts Institute of Technology">MIT</abbr></a>, <a
href="http://www.ercim.eu/"><abbr
title="European Research Consortium for Informatics and Mathematics">ERCIM</abbr></a>,
<a href="http://www.keio.ac.jp/">Keio</a>, <a
href="http://ev.buaa.edu.cn/">Beihang</a>), All Rights Reserved. W3C <a
href="http://www.w3.org/Consortium/Legal/ipr-notice#Legal_Disclaimer">liability</a>,
<a
href="http://www.w3.org/Consortium/Legal/ipr-notice#W3C_Trademarks">trademark</a>
and <a
href="http://www.w3.org/Consortium/Legal/copyright-documents">document
use</a> rules apply.</p>
<!--end-copyright-->
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc" id=abstract>Abstract</h2>
<p>This draft contains the features of CSS relating to wrapping content
around and inside shapes. It (implicitly for now) includes and extends the
functionality of CSS Shapes Level 1 <a href="#ref-CSS-SHAPES"
rel=biblioentry>[CSS-SHAPES]<!--{{CSS-SHAPES}}--></a>. The main points of
extension compared to level 1 include additional ways of defining shapes,
defining an exclusion area using a shape, and restricting an element's
content area using a shape.
<h2 class="no-num no-toc" id=status>Status of this document</h2>
<!--begin-status-->
<p>This is a public copy of the editors' draft. It is provided for
discussion only and may change at any moment. Its publication here does
not imply endorsement of its contents by W3C. Don't cite this document
other than as work in progress.
<p>The (<a
href="http://lists.w3.org/Archives/Public/www-style/">archived</a>) public
mailing list <a
href="mailto:www-style@w3.org?Subject=%5Bwww-style%5D%20PUT%20SUBJECT%20HERE">
www-style@w3.org</a> (see <a
href="http://www.w3.org/Mail/Request">instructions</a>) is preferred for
discussion of this specification. When sending e-mail, please put the text
“www-style” in the subject, preferably like this:
“[<!---->www-style<!---->] <em>…summary of comment…</em>”
<p>This document was produced by the <a
href="http://www.w3.org/Style/CSS/members">CSS Working Group</a> (part of
the <a href="http://www.w3.org/Style/">Style Activity</a>).
<p>This document was produced by a group operating under the <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/">5 February
2004 W3C Patent Policy</a>. W3C maintains a <a
href="http://www.w3.org/2004/01/pp-impl/32061/status"
rel=disclosure>public list of any patent disclosures</a> made in
connection with the deliverables of the group; that page also includes
instructions for disclosing a patent. An individual who has actual
knowledge of a patent which the individual believes contains <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/#def-essential">Essential
Claim(s)</a> must disclose the information in accordance with <a
href="http://www.w3.org/Consortium/Patent-Policy-20040205/#sec-Disclosure">section
6 of the W3C Patent Policy</a>.</p>
<!--end-status-->
<h2 class="no-num no-toc" id=contents>Table of contents</h2>
<!--begin-toc-->
<ul class=toc>
<li><a href="#intro"><span class=secno>1. </span>Introduction</a>
<li><a href="#terminology"><span class=secno>2. </span>Terminology</a>
<li><a href="#shapes"><span class=secno>3. </span>Shapes</a>
<ul class=toc>
<li><a href="#basic-shapes-from-svg-syntax"><span class=secno>3.1.
</span>Basic Shapes</a>
<li><a href="#referencing-svg-shapes"><span class=secno>3.2.
</span>Referencing SVG shapes </a>
<li><a href="#shapes-from-image"><span class=secno>3.3. </span>Shapes
from Image</a>
<li><a href="#declaring-shapes"><span class=secno>3.4. </span>Declaring
Shapes</a>
<ul class=toc>
<li><a href="#shape-outside-property"><span class=secno>3.4.1.
</span>The ‘<code class=property>shape-outside</code>’
Property</a>
<li><a href="#shape-inside-property"><span class=secno>3.4.2.
</span>The ‘<code class=property>shape-inside</code>’
Property</a>
<li><a href="#shape-image-threshold-property"><span class=secno>3.4.3.
</span>The ‘<code class=property>shape-image-threshold</code>’
Property</a>
<li><a href="#shape-image-source-type-property"><span
class=secno>3.4.4. </span>The ‘<code
class=property>shape-image-source-type</code>’ Property</a>
<li><a href="#shape-margin-property"><span class=secno>3.4.5.
</span>The ‘<code class=property>shape-margin</code>’
property</a>
<li><a href="#shape-padding-property"><span class=secno>3.4.6.
</span>The ‘<code class=property>shape-padding</code>’
Property</a>
</ul>
</ul>
<li><a href="#conformance"><span class=secno>4. </span>Conformance</a>
<li class=no-num><a href="#acknowledgments">Acknowledgments</a>
<li class=no-num><a href="#references">References</a>
<ul class=toc>
<li class=no-num><a href="#normative-references">Normative
references</a>
<li class=no-num><a href="#other-references">Other references</a>
</ul>
<li class=no-num><a href="#index">Index</a>
<li class=no-num><a href="#property-index">Property index</a>
<li class=no-num><a href="#change-log">Change Log</a>
</ul>
<!--end-toc-->
<h2 id=intro><span class=secno>1. </span>Introduction</h2>
<p><em>This section is not normative.</em>
<p> Level 1 of this specification defined properties to control the
geometry of an element's <a href="#float-area">float area</a>. This level
defines how shapes apply to exclusions. It also includes a ‘<a
href="#shape-inside"><code class=property>shape-inside</code></a>’
property for applying a shape to an element's content area. And finally it
defines new ways of specifying shapes for all of these applications.
<h2 id=terminology><span class=secno>2. </span>Terminology</h2>
<p><dfn id=exclusion-area>Exclusion area</dfn>
<p> The area used for excluding inline flow content around an exclusion
box. The <a href="#exclusion-area">exclusion area</a> is equivalent to the
<a href="http://www.w3.org/TR/CSS2/box.html#box-dimensions">border box</a>
for an exclusion box. This specification's ‘<code
class=property>shape-outside</code>’ property can be used to define
arbitrary, non-rectangular <a href="#exclusion-area">exclusion areas</a>.
The ‘<a href="#shape-inside"><code
class=property>shape-inside</code></a>’ property also defines an <a
href="#exclusion-area">exclusion area</a>, but in this case it is the area
outside the shape that inline content avoids.
<p><dfn id=float-area>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 ‘<code class=property>shape-outside</code>’
property can be used to define arbitrary, non-rectangular float areas.
<p><dfn id=content-area>Content area</dfn>
<p> The <a href="http://www.w3.org/TR/CSS2/box.html#box-dimensions">content
area</a> is normally used for layout of the inline flow content of a box.
<div class=issue-marker data-bug_id=15089 data-bug_status=NEW> <a
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=15089">Issue-15089</a>
<div class=issue-details>
<p class=short-desc>shrink-to-fit circle / shape
</div>
</div>
<h2 id=shapes><span class=secno>3. </span>Shapes</h2>
<p> Shapes define arbitrary geometric contours around which inline content
flows. The shape-outside property defines the <a href="#float-area">float
area</a> for a float, and the exclusion area for an exclusion.
<h3 id=basic-shapes-from-svg-syntax><span class=secno>3.1. </span>Basic
Shapes</h3>
<p>Add the final <a
href="http://www.w3.org/TR/css-shapes/#basic-shapes-from-svg-syntax">level
1</a> section with a possible addition of path() and a rejiggered
rectangle().
<dl>
<dt><dfn id=rectangle>rectangle()</dfn> = rectangle( <<shape-arg>>{4} [
round <<‘<code class=property>border-radius</code>’>> ]? )
</shape-arg>
<dd>
<ul>
<li> The first four arguments represent <strong>x, y, width</strong> and
<strong>height</strong> of the rectangle. Negative values for width and
height are invalid.
<li> The optional <<‘<code
class=property>border-radius</code>’>> argument(s) define rounded
corners for the rectangle using the ‘<code
class=property>border-radius</code>’ shorthand syntax.
</ul>
</dl>
<div class="issue-marker wrapper">
<div class=issue-marker data-bug_id=16448 data-bug_status=ASSIGNED> <a
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16448">Issue-16448</a>
<div class=issue-details>
<p class=short-desc>Should we revisit the decision to not allow SVG path
syntax in the shape-inside, shape-outside properties
</div>
</div>
</div>
<h3 id=referencing-svg-shapes><span class=secno>3.2. </span>Referencing SVG
shapes</h3>
<p>An SVG shape can be referenced using the <code>url()</code> syntax. The
shape can be any of the <a href="http://www.w3.org/TR/SVG/shapes.html">SVG
basic shapes</a> or a <a href="http://www.w3.org/TR/SVG/paths.html">path
element</a>.
<div class=example>
<div style="float:right"> <img alt="results of referencing SVG shapes"
src="images/svg-shape-reference.png"></div>
<code class=html></code>
<pre>
<style>
div {
height: 400px;
width: 400px;
}
.in-a-circle {
shape-outside: url(#circle_shape);
}
.in-a-path {
shape-outside: url(#path-shape);
}
</style>
<svg ...>
<circle id="circle_shape" cx="50%" cy="50%" r="50%" />
<path id="path-shape" d="M 100 100 L 300 100 L 200 300 z" />
</svg>
<div class="around-a-circle">...</div>
<div class="around-a-path">...</div>
</pre>
</div>
<!-- End section "Shapes from SVG Syntax -->
<h3 id=shapes-from-image><span class=secno>3.3. </span>Shapes from Image</h3>
<p>Add the final <a
href="http://www.w3.org/TR/css-shapes/#shapes-from-image">level 1</a>
section. <!-- End section "Shapes from image" -->
<p class=issue> One <a
href="https://www.w3.org/Bugs/Public/show_bug.cgi?id=16716">suggestion</a>
is to define a shape based on an element's rendered content. This could
have security implications.
<p class=issue> Another <a
href="http://lists.w3.org/Archives/Public/www-style/2014Mar/0120.html">suggestion</a>
is to add something to an image() function that determines the relevant
pixels to use (both for defining a shape and for display).
<h3 id=declaring-shapes><span class=secno>3.4. </span>Declaring Shapes</h3>
<p> A shape can be declared with the ‘<code
class=property>shape-outside</code>’ property, with possible
modifications from the ‘<code class=property>shape-margin</code>’
property. The shape defined by the ‘<code
class=property>shape-outside</code>’ and ‘<code
class=property>shape-margin</code>’ properties changes the geometry of a
float element's <a href="#float-area">float area</a> and an exclusion
element's <a href="#exclusion-area">exclusion area</a>.
<p> A shape can be declared with the ‘<a href="#shape-inside"><code
class=property>shape-inside</code></a>’ property, with possible
modifications from the ‘<a href="#shape-padding"><code
class=property>shape-padding</code></a>’ property. The shape defined by
the ‘<a href="#shape-inside"><code
class=property>shape-inside</code></a>’ and ‘<a
href="#shape-padding"><code class=property>shape-padding</code></a>’
properties defines an <a href="#exclusion-area">exclusion area</a> that
contributes to the element's <span>wrapping context</span>. The ‘<a
href="#shape-inside"><code class=property>shape-inside</code></a>’
property applies to all block-level elements.
<div class=example>
<p> The red box illustrates an exclusion element's content box, which is
unmodified and subject to normal CSS positioning (here absolute
positioning).
<pre><code class=html>
<style type="text/css">
.exclusion {
wrap-flow: both;
position: absolute;
top: 25%;
left: 25%;
width: 50%;
height: 50%;
shape-outside: circle(50% at 50% 50%);
border: 1px solid red;
}
</style>
<div style=”position: relative;”>
<div class=”exclusion”></div>
Lorem ipsum dolor sit amet...
</div>
</code></pre>
<img alt="Example rendering of circle shape and box model."
class=singleImgExample src="images/shapes_CSS2.1_MBP.png"
style="max-width:40%"></div>
<h4 id=shape-outside-property><span class=secno>3.4.1. </span>The ‘<code
class=property>shape-outside</code>’ Property</h4>
<p>Add the final <a
href="http://www.w3.org/TR/css-shapes/#shape-outside-property">level 1</a>
section with the change that shape-outside applies to block-level elements
and has an effect if the element is an exclusion.</p>
<!-- End section "The shape-outside Property" -->
<h4 id=shape-inside-property><span class=secno>3.4.2. </span>The ‘<a
href="#shape-inside"><code class=property>shape-inside</code></a>’
Property</h4>
<p> The ‘<a href="#shape-inside"><code
class=property>shape-inside</code></a>’ property adds one or more
exclusion areas to the element's wrapping context. This modifies the
normal rectangular shape of the content area to a possibly non-rectangular
wrapping area. The exclusion areas are defined by subtracting the shape
from the element's content area. Any part of the shape outside the
element's content area has no effect.
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=shape-inside title=shape-inside>shape-inside</dfn>
<tr>
<th>Value:
<td><var>outside-shape</var> | <a href="#auto"><var>auto</var></a> | <a
href="#ltbasic-shapegt"><var><basic-shape></var></a> | <a
href="#lturigt"><var><uri></var></a>
<tr>
<th>Initial:
<td>auto
<tr>
<th>Applies to:
<td>block-level elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>computed lengths for <basic-shape>, the absolute URI for
<uri>, otherwise as specified
</table>
<p>The values of this property have the following meanings:
<dl>
<dt><dfn id=auto>auto</dfn>
<dd> The shape is computed based on the content box of the element.
</dl>
<dl>
<dt><dfn id=ltbasic-shapegt><basic-shape></dfn>
<dd> The shape is computed based on the values of one of ‘<code
class=property>rectangle</code>’, ‘<code
class=property>inset-rectangle</code>’, ‘<code
class=property>circle</code>’, ‘<code
class=property>ellipse</code>’ or ‘<code
class=property>polygon</code>’.
</dl>
<dl>
<dt><dfn id=lturigt><uri></dfn>
<dd> If the <uri> references an SVG shape element, that element
defines the shape. Otherwise, if the <uri> references an image, the
shape is extracted and computed based on the alpha channel of the
specified image. If the <uri> does not reference an SVG shape
element or an image, the effect is as if the value ‘<a
href="#auto"><code class=property>auto</code></a>’ had been specified.
</dl>
<p>The ‘<a href="#shape-inside"><code
class=property>shape-inside</code></a>’ property applies to floats.
<p>The ‘<a href="#shape-inside"><code
class=property>shape-inside</code></a>’ property may not apply on some
elements such as elements with a computed ‘<code
class=property>display</code>’ value of ‘<code
class=property>table</code>’.
<div class=figure> <img
alt="Content flowing with and without a shape-inside"
src="images/shape-inside-content.png">
<p class=caption>Effect of shape-inside on inline content.
</div>
<p>Overflow content avoids the exclusion area(s) added by ‘<a
href="#shape-inside"><code class=property>shape-inside</code></a>’ and
‘<a href="#shape-padding"><code
class=property>shape-padding</code></a>’ (as well as any other exclusion
areas in the element's wrapping context).
<div class=figure> <img alt="Overflow interacting with rounded rect"
src="images/rounded-rect-overflow.png"
style="display:inline-block;vertical-align:top"> <img
alt="Overflow interacting with ellipse" src="images/ellipse-overflow.png"
style="display:inline-block;vertical-align:top">
<p class=caption>Overflow interacting with exclusion areas defined by
‘<a href="#shape-inside"><code
class=property>shape-inside</code></a>’ and ‘<a
href="#shape-padding"><code class=property>shape-padding</code></a>’.
</div>
<p> When a shape-inside has a definite size (no percentages used in the
shape's definition) an auto-sized element should use the shape as a
constraint in determining its maximum size.</p>
<!-- End section "The shape-inside property" -->
<h4 id=shape-image-threshold-property><span class=secno>3.4.3. </span>The
‘<code class=property>shape-image-threshold</code>’ Property</h4>
<p>Add the final <a
href="http://www.w3.org/TR/css-shapes/#shape-image-threshold-property">level
<
1891
/div> 1</a> section with the change that it applies to both <a
href="#shape-inside">shape-inside</a> and <span>shape-outside</span>.</p>
<!-- End section "The shape-image-threshold property" -->
<h4 id=shape-image-source-type-property><span class=secno>3.4.4. </span>The
‘<code class=property>shape-image-source-type</code>’ Property</h4>
<p> Should we add an alpha/luminance switch to determine which values we
use from the shape-image source? This could just be a keyword on the
shape-image-threshold property. Whatever we go with should be compatible
with the alpha/luminance switch from mask sources.</p>
<!-- End section "The shape-image-source-type-property" -->
<h4 id=shape-margin-property><span class=secno>3.4.5. </span>The ‘<code
class=property>shape-margin</code>’ property</h4>
<p>Add the final <a
href="http://www.w3.org/TR/css-shapes/#shape-margin-property">level 1</a>
section with the change that it applies to exclusions.</p>
<!-- End secion "shape-margin property" -->
<h4 id=shape-padding-property><span class=secno>3.4.6. </span>The ‘<a
href="#shape-padding"><code class=property>shape-padding</code></a>’
Property</h4>
<p> The ‘<a href="#shape-padding"><code
class=property>shape-padding</code></a>’ property adds padding to a
shape-inside. This defines a new shape where every point is the specified
distance from the shape-inside. This property takes on positive values
only.
<table class=propdef>
<tbody>
<tr>
<th>Name:
<td><dfn id=shape-padding title=shape-padding>shape-padding</dfn>
<tr>
<th>Value:
<td><var><length></var>
<tr>
<th>Initial:
<td>0
<tr>
<th>Applies to:
<td>block-level elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>N/A
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>the absolute length
</table>
<div class=example>
<p>A ‘<a href="#shape-padding"><code
class=property>shape-padding</code></a>’ creating an offset from a
circlular shape-inside. The light blue rectangles represent inline
content affected by the shape created by the padding.</p>
<img alt="Example of a shape-padding offset"
src="images/shape-padding.png"></div>
<!-- End section "shape-padding property" -->
<p class=note>Note that the ‘<a href="#shape-padding"><code
class=property>shape-padding</code></a>’ property only affects layout of
content inside the element it applies to while the ‘<code
class=property>shape-margin</code>’ property only affects layout of
content outside the element.</p>
<!-- End section "Declaring Shapes" -->
<!-- End section "Shapes" -->
<h2 id=conformance><span class=secno>4. </span>Conformance</h2>
<!--begin-conformance-->
<h3 class=no-ref id=conventions> Document conventions</h3>
<p>Conformance requirements are expressed with a combination of descriptive
assertions and RFC 2119 terminology. The key words “MUST”, “MUST
NOT”, “REQUIRED”, “SHALL”, “SHALL NOT”, “SHOULD”,
“SHOULD NOT”, “RECOMMENDED”, “MAY”, and “OPTIONAL” in the
normative parts of this document are to be interpreted as described in RFC
2119. However, for readability, these words do not appear in all uppercase
letters in this specification.
<p>All of the text of this specification is normative except sections
explicitly marked as non-normative, examples, and notes. <a
href="#ref-RFC2119" rel=biblioentry>[RFC2119]<!--{{!RFC2119}}--></a>
<p>Examples in this specification are introduced with the words “for
example” or are set apart from the normative text with
<code>class="example"</code>, like this:
<div class=example>
<p>This is an example of an informative example.
</div>
<p>Informative notes begin with the word “Note” and are set apart from
the normative text with <code>class="note"</code>, like this:
<p class=note>Note, this is an informative note.
<h3 class=no-ref id=conformance-classes> Conformance classes</h3>
<p>Conformance to this specification is defined for three conformance
classes:
<dl>
<dt><dfn id=style-sheet title="style sheet!!as conformance class">style
sheet</dfn>
<dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#style-sheet">CSS
style sheet</a>.
<dt><dfn id=renderer>renderer</dfn>
<dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
that interprets the semantics of a style sheet and renders documents that
use them.
<dt><dfn id=authoring-tool>authoring tool</dfn>
<dd>A <a href="http://www.w3.org/TR/CSS21/conform.html#user-agent">UA</a>
that writes a style sheet.
</dl>
<p>A style sheet is conformant to this specification if all of its
statements that use syntax defined in this module are valid according to
the generic CSS grammar and the individual grammars of each feature
defined in this module.
<p>A renderer is conformant to this specification if, in addition to
interpreting the style sheet as defined by the appropriate specifications,
it supports all the features defined by this specification by parsing them
correctly and rendering the document accordingly. However, the inability
of a UA to correctly render a document due to limitations of the device
does not make the UA non-conformant. (For example, a UA is not required to
render color on a monochrome monitor.)
<p>An authoring tool is conformant to this specification if it writes style
sheets that are syntactically correct according to the generic CSS grammar
and the individual grammars of each feature in this module, and meet all
other conformance requirements of style sheets as described in this
module.
<h3 class=no-ref id=partial> Partial implementations</h3>
<p>So that authors can exploit the forward-compatible parsing rules to
assign fallback values, CSS renderers <strong>must</strong> treat as
invalid (and <a
href="http://www.w3.org/TR/CSS21/conform.html#ignore">ignore as
appropriate</a>) any at-rules, properties, property values, keywords, and
other syntactic constructs for which they have no usable level of support.
In particular, user agents <strong>must not</strong> selectively ignore
unsupported component values and honor supported values in a single
multi-value property declaration: if any value is considered invalid (as
unsupported values must be), CSS requires that the entire declaration be
ignored.
<h3 class=no-ref id=experimental> Experimental implementations</h3>
<p>To avoid clashes with future CSS features, the CSS 2.1 specification
reserves a <a
href="http://www.w3.org/TR/CSS21/syndata.html#vendor-keywords">prefixed
syntax</a> for proprietary and experimental extensions to CSS.
<p>Prior to a specification reaching the Candidate Recommendation stage in
the W3C process, all implementations of a CSS feature are considered
experimental. The CSS Working Group recommends that implementations use a
vendor-prefixed syntax for such features, including those in W3C Working
Drafts. This avoids incompatibilities with future changes in the draft.
<h3 class=no-ref id=testing> Non-experimental implementations</h3>
<p>Once a specification reaches the Candidate Recommendation stage,
non-experimental implementations are possible, and implementors should
release an unprefixed implementation of any CR-level feature they can
demonstrate to be correctly implemented according to spec.
<p>To establish and maintain the interoperability of CSS across
implementations, the CSS Working Group requests that non-experimental CSS
renderers submit an implementation report (and, if necessary, the
testcases used for that implementation report) to the W3C before releasing
an unprefixed implementation of any CSS features. Testcases submitted to
W3C are subject to review and correction by the CSS Working Group.
<p>Further information on submitting testcases and implementation reports
can be found from on the CSS Working Group's website at <a
href="http://www.w3.org/Style/CSS/Test/">http://www.w3.org/Style/CSS/Test/</a>.
Questions should be directed to the <a
href="http://lists.w3.org/Archives/Public/public-css-testsuite">public-css-testsuite@w3.org</a>
mailing list. <!--end-conformance-->
<h2 class=no-num id=acknowledgments>Acknowledgments</h2>
<!--<p>This specification is made possible by input from
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>
<!--begin-normative-->
<!-- Sorted by label -->
<dl class=bibliography>
<dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
<!---->
<dt id=ref-RFC2119>[RFC2119]
<dd>S. Bradner. <a href="http://www.ietf.org/rfc/rfc2119.txt"><cite>Key
words for use in RFCs to Indicate Requirement Levels.</cite></a> RFC
2119. URL: <a
href="http://www.ietf.org/rfc/rfc2119.txt">http://www.ietf.org/rfc/rfc2119.txt</a>
</dd>
<!---->
</dl>
<!--end-normative-->
<h3 class=no-num id=other-references>Other references</h3>
<!--begin-informative-->
<!-- Sorted by label -->
<dl class=bibliography>
<dd style="display: none"><!-- keeps the doc valid if the DL is empty -->
<!---->
<dt id=ref-CSS-SHAPES>[CSS-SHAPES]
<dd>Vincent Hardy; Rossen Atanassov; Alan Stearns. <a
href="http://www.w3.org/TR/2014/WD-css-shapes-1-20140211/"><cite>CSS
Shapes Module Level 1.</cite></a> 11 February 2014. W3C Last Call Working
Draft. (Work in progress.) URL: <a
href="http://www.w3.org/TR/2014/WD-css-shapes-1-20140211/">http://www.w3.org/TR/2014/WD-css-shapes-1-20140211/</a>
</dd>
<!---->
</dl>
<!--end-informative-->
<h2 class=no-num id=index>Index</h2>
<!--begin-index-->
<ul class=indexlist>
<li>authoring tool, <a href="#authoring-tool"
title="section 4."><strong>4.</strong></a>
<li>auto, <a href="#auto"
title="section 3.4.2."><strong>3.4.2.</strong></a>
<li><basic-shape>, <a href="#ltbasic-shapegt"
title="section 3.4.2."><strong>3.4.2.</strong></a>
<li>Content area, <a href="#content-area"
title="section 2."><strong>2.</strong></a>
<li>Exclusion area, <a href="#exclusion-area"
title="section 2."><strong>2.</strong></a>
<li>Float area, <a href="#float-area"
title="section 2."><strong>2.</strong></a>
<li>rectangle(), <a href="#rectangle"
title="section 3.1."><strong>3.1.</strong></a>
<li>renderer, <a href="#renderer"
title="section 4."><strong>4.</strong></a>
<li>shape-inside, <a href="#shape-inside"
title="section 3.4.2."><strong>3.4.2.</strong></a>
<li>shape-padding, <a href="#shape-padding"
title="section 3.4.6."><strong>3.4.6.</strong></a>
<li>style sheet
<ul>
<li>as conformance class, <a href="#style-sheet"
title="section 4."><strong>4.</strong></a>
</ul>
<li><uri>, <a href="#lturigt"
title="section 3.4.2."><strong>3.4.2.</strong></a>
</ul>
<!--end-index-->
<h2 class=no-num id=property-index>Property index</h2>
<!--begin-properties-->
<table class=proptable>
<thead>
<tr>
<th>Property
<th>Values
<th>Initial
<th>Applies to
<th>Inh.
<th>Percentages
<th>Media
<tbody>
<tr>
<th><a class=property href="#shape-inside">shape-inside</a>
<td>outside-shape | auto | <basic-shape> | <uri>
<td>auto
<td>block-level elements
<td>no
<td>N/A
<td>visual
<tr>
<th><a class=property href="#shape-padding">shape-padding</a>
<td><length>
<td>0
<td>block-level elements
<td>no
<td>N/A
<td>visual
</table>
<!--end-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>
</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:
-->