forked from w3c/csswg-drafts
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathOverview.html
More file actions
808 lines (699 loc) · 59.1 KB
/
Overview.html
File metadata and controls
808 lines (699 loc) · 59.1 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
<!DOCTYPE html><html lang=en><head>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
<title>CSS Backgrounds and Borders Module Level 4</title>
<link href=../default.css rel=stylesheet type=text/css>
<link href=../csslogo.ico rel="shortcut icon" type=image/x-icon>
<style>
body {
background: url("https://www.w3.org/StyleSheets/TR/logo-ED") top left no-repeat white;
background-attachment: fixed;
color: black;
font-family: sans-serif;
margin: 0 auto;
max-width: 50em;
padding: 2em 1em 2em 70px;
}
:link { color: #00C; background: transparent }
:visited { color: #609; background: transparent }
a[href]:active { color: #C00; background: transparent }
a[href]:hover { background: #ffa }
a[href] img { border-style: none }
h1, h2, h3, h4, h5, h6 { text-align: left }
h1, h2, h3 { color: #005A9C; }
h1 { font: 170% sans-serif }
h2 { font: 140% sans-serif }
h3 { font: 120% sans-serif }
h4 { font: bold 100% sans-serif }
h5 { font: italic 100% sans-serif }
h6 { font: small-caps 100% sans-serif }
.hide { display: none }
div.head { margin-bottom: 1em }
div.head h1 { margin-top: 2em; clear: both }
div.head table { margin-left: 2em; margin-top: 2em }
p.copyright { font-size: small }
p.copyright small { font-size: small }
pre { margin-left: 2em }
dt { font-weight: bold }
ul.toc, ol.toc {
list-style: none;
}
</style>
</head>
<body class=h-entry>
<div class=head>
<p data-fill-with=logo><a class=logo href=http://www.w3.org/>
<img alt=W3C height=48 src=https://www.w3.org/Icons/w3c_home width=72>
</a>
</p>
<h1 class="p-name no-ref" id=title>CSS Backgrounds and Borders Module Level 4</h1>
<h2 class="no-num no-toc no-ref heading settled heading" id=subtitle><span class=content>Editor’s Draft,
<span class=dt-updated><span class=value-title title=20140314>14 March 2014</span></span></span></h2>
<div data-fill-with=spec-metadata><dl><dt>This version:<dd><a class=u-url href=http://dev.w3.org/csswg/css-backgrounds-4/>http://dev.w3.org/csswg/css-backgrounds-4/</a><dt>Latest version:<dd><a href=http://www.w3.org/TR/css-backgrounds-4/>http://www.w3.org/TR/css-backgrounds-4/</a><dt>Editor’s Draft:<dd><a href=http://dev.w3.org/csswg/css-backgrounds-4/>http://dev.w3.org/csswg/css-backgrounds-4/</a>
<dt>Feedback:</dt>
<dd><a href="mailto:www-style@w3.org?subject=%5Bcss-backgrounds%5D%20feedback">www-style@w3.org</a>
with subject line
“<kbd>[css-backgrounds] <var>… message topic …</var></kbd>”(<a href=http://lists.w3.org/Archives/Public/www-style/ rel=discussion>archives</a>)<dt>Test Suite:<dd>None Yet<dt>Editors:
<dd class="p-author h-card vcard"><a class="p-name fn u-email email" href=mailto:bert@w3.org>Bert Bos</a> (<span class="p-org org">W3C</span>)<dd class="p-author h-card vcard"><a class="p-name fn u-url url" href=http://fantasai.inkedblade.net/contact>Elika J. Etemad</a> (<span class="p-org org">Invited Expert</span>)<dd class="p-author h-card vcard"><a class="p-name fn u-url url" href=http://lea.verou.me/about/>Lea Verou</a> (<span class="p-org org">Invited Expert</span>)</dl></div>
<div data-fill-with=warning></div>
<p class=copyright data-fill-with=copyright><a href=http://www.w3.org/Consortium/Legal/ipr-notice#Copyright>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>
<hr title="Separator for header">
</div>
<h2 class="no-num no-toc no-ref heading settled heading" id=abstract><span class=content>Abstract</span></h2>
<p class=p-summary data-fill-with=abstract>This module contains the features of CSS relating to the borders and backgrounds of boxes on the page. It includes and extends the functionality of <a href=http://www.w3.org/TR/css3-background/>CSS Backgrounds and Borders Level 3</a>. <a data-biblio-type=informative data-link-type=biblio href=#css3bg title=css3bg>[CSS3BG]</a> The main extensions compared to level 3 are shaping (<a class=property data-link-type=propdesc href=#propdef-corner-shape title=corner-shape>corner-shape</a>) and clipping borders (<a class=property data-link-type=propdesc href=#propdef-border-clip title=border-clip>border-clip</a>), logical background positions (<a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/colors.html#propdef-background-position title=background-position>background-position</a>), and the <span class=css data-link-type=maybe title=extend>extend</span> ability of <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/colors.html#propdef-background-repeat title=background-repeat>background-repeat</a>.
<a href=http://www.w3.org/TR/CSS/>CSS</a> is a language for describing the rendering of structured documents
(such as HTML and XML)
on screen, on paper, in speech, etc.</p>
<h2 class="no-num no-toc no-ref heading settled heading" id=status><span class=content>Status of this document</span></h2>
<div data-fill-with=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=%5Bcss-backgrounds%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 “css-backgrounds” in the subject,
preferably like this:
“[css-backgrounds] <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>.</div>
<div data-fill-with=at-risk></div>
<h2 class="no-num no-toc no-ref heading settled heading" id=contents><span class=content>Table of Contents</span></h2>
<div data-fill-with=table-of-contents><ul class=toc>
<li><a href=#intro><span class=secno>1</span> Introduction</a>
<li><a href=#backgrounds><span class=secno>2</span> Backgrounds</a>
<ul class=toc>
<li><a href=#the-background-position><span class=secno>2.1</span> Background Positioning: the <span class=property data-link-type=propdesc title=background-position>background-position</span> property</a></ul>
<li><a href=#corners><span class=secno>3</span> Corners</a>
<ul class=toc>
<li><a href=#corner-sizing><span class=secno>3.1</span> Corner Sizing: the 'border-radius property</a>
<li><a href=#corner-shaping><span class=secno>3.2</span> Corner Shaping: the <span class=property data-link-type=propdesc title=corner-shape>corner-shape</span> property</a>
<li><a href=#corners-shorthand><span class=secno>3.3</span> Corner Shape and Size: the <span class=property data-link-type=propdesc title=corners>corners</span> shorthand</a></ul>
<li><a href=#partial-borders0><span class=secno>4</span> Partial borders</a>
<ul class=toc>
<li><a href=#partial-borders><span class=secno>4.1</span> Partial Borders: the <span class=property data-link-type=propdesc title=border-limit>border-limit</span> property</a>
<li><a href=#border-clip><span class=secno>4.2</span> The <span class=property data-link-type=propdesc title=border-clip>border-clip</span> properties</a></ul>
<li><a href=#changes><span class=secno>5</span> Changes</a>
<ul class=toc>
<li><a href=#level-changes><span class=secno>5.1</span> Additions Since Level 3</a></ul>
<li><a href=#acknowledgments><span class=secno>6</span>Acknowledgments</a>
<li><a href=#conformance><span class=secno></span> Conformance</a>
<ul class=toc>
<li><a href=#conventions><span class=secno></span> Document conventions</a>
<li><a href=#conformance-classes><span class=secno></span> Conformance classes</a>
<li><a href=#partial><span class=secno></span> Partial implementations</a>
<li><a href=#experimental><span class=secno></span> Experimental implementations</a>
<li><a href=#testing><span class=secno></span> Non-experimental implementations</a></ul>
<li><a href=#references><span class=secno></span> References</a>
<ul class=toc>
<li><a href=#normative><span class=secno></span> Normative References</a>
<li><a href=#informative><span class=secno></span> Informative References</a></ul>
<li><a href=#index><span class=secno></span> Index</a>
<li><a href=#property-index><span class=secno></span> Property index</a>
<li><a href=#issues-index><span class=secno></span>Issues Index</a></ul></div>
<h2 class="heading settled heading" data-level=1 id=intro><span class=secno>1 </span><span class=content>
Introduction</span><a class=self-link href=#intro></a></h2>
<p class=issue id=issue-648e34a3><a class=self-link href=#issue-648e34a3></a>
This module is currently maintained as a diff against Level 3.
We will fold in the text once it’s all formatted up and in CR again,
as this will reduce the effort of keeping them in sync
(source diffs will be accurate in reflecting the differences).
<h2 class="heading settled heading" data-level=2 id=backgrounds><span class=secno>2 </span><span class=content>
Backgrounds</span><a class=self-link href=#backgrounds></a></h2>
<h3 class="heading settled heading" data-level=2.1 id=the-background-position><span class=secno>2.1 </span><span class=content>
Background Positioning: the <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/colors.html#propdef-background-position title=background-position>background-position</a> property</span><a class=self-link href=#the-background-position></a></h3>
<table class="definition propdef"><tr><th>Name:<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-backround-position>backround-position<a class=self-link href=#propdef-backround-position></a></dfn><tr><th>Value:<td class=prod><a class="production css-code" data-link-type=type href=#typedef-position title="<position>"><position></a>#<tr><th>Initial:<td>top left<tr><th>Applies to:<td>all<tr><th>Inherited:<td>no<tr><th>Media:<td>visual<tr><th>Computed value:<td>A list, each item consisting of: a pair of offsets and an origin, each offset given as a combination of an absolute length and a percentage<tr><th>Percentages:<td>refer to size of background positioning area <em>minus</em> size of background image</table>
<p> See <a data-biblio-type=informative data-link-type=biblio href=#css3bg title=css3bg>[CSS3BG]</a> for definition.
<p>Where
<pre class=prod><dfn class=css-code data-dfn-type=type data-export="" id=typedef-position><var><position></var><a class=self-link href=#typedef-position></a></dfn> = [
[ left | center | right | top | bottom | <var><percentage></var> | <var><length></var> ]
|
[ left | center | right | <var><percentage></var> | <var><length></var> ]
[ top | center | bottom | <var><percentage></var> | <var><length></var> ]
|
[ center | [ left | right ] [ <var><percentage></var> | <var><length></var> ]? ] &&
[ center | [ top | bottom ] [ <var><percentage></var> | <var><length></var> ]? ]
]</pre>
<p class=issue id=issue-7b26b643><a class=self-link href=#issue-7b26b643></a>Add logical keywords
<h2 class="heading settled heading" data-level=3 id=corners><span class=secno>3 </span><span class=content>
Corners</span><a class=self-link href=#corners></a></h2>
<h3 class="heading settled heading" data-level=3.1 id=corner-sizing><span class=secno>3.1 </span><span class=content>
Corner Sizing: the 'border-radius property</span><a class=self-link href=#corner-sizing></a></h3>
<table class="definition propdef"><tr><th>Name:<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-border-radius>border-radius<a class=self-link href=#propdef-border-radius></a></dfn><tr><th>Value:<td class=prod>[ <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#length-value title="<length>"><length></a> | <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#percentage-value title="<percentage>"><percentage></a> ]{1,4} [ / [ <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#length-value title="<length>"><length></a> | <a class="production css-code" data-link-type=type href=http://dev.w3.org/csswg/css-values-3/#percentage-value title="<percentage>"><percentage></a> ]{1,4} ]?<tr><th>Initial:<td>0<tr><th>Applies to:<td>all elements, except table element when <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/tables.html#propdef-border-collapse title=border-collapse>border-collapse</a> is <span class=css data-link-type=maybe title=collapse>collapse</span><tr><th>Inherited:<td>no<tr><th>Media:<td>visual<tr><th>Computed value:<td>specified value<tr><th>Canonical order:<td>n/a<tr><th>Percentages:<td>n/a<tr><th>Animatable:<td>no</table>
<p> See <a data-biblio-type=informative data-link-type=biblio href=#css3bg title=css3bg>[CSS3BG]</a>.
<h3 class="heading settled heading" data-level=3.2 id=corner-shaping><span class=secno>3.2 </span><span class=content>
Corner Shaping: the <a class=property data-link-type=propdesc href=#propdef-corner-shape title=corner-shape>corner-shape</a> property</span><a class=self-link href=#corner-shaping></a></h3>
<table class="definition propdef"><tr><th>Name:<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-corner-shape>corner-shape<a class=self-link href=#propdef-corner-shape></a></dfn><tr><th>Value:<td class=prod>[round | bevel | scoop | notch]{1,4}<tr><th>Initial:<td>round<tr><th>Applies to:<td>all elements, except table element when <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/tables.html#propdef-border-collapse title=border-collapse>border-collapse</a> is <span class=css data-link-type=maybe title=collapse>collapse</span><tr><th>Inherited:<td>no<tr><th>Media:<td>visual<tr><th>Computed value:<td>specified value<tr><th>Canonical order:<td>n/a<tr><th>Percentages:<td>n/a<tr><th>Animatable:<td>no</table>
<p> By default, non-zero border-radii define
a quarter-ellipse that rounds the affected corners.
However in some cases, other corner shapes are desired.
The <a class=property data-link-type=propdesc href=#propdef-corner-shape title=corner-shape>corner-shape</a> property specifies a reinterpretation of the radii
to define other corner shapes.
<dl data-dfn-for=corner-shape data-dfn-type=value>
<dt><dfn class=css-code data-dfn-for=corner-shape data-dfn-type=value data-export="" id=valuedef-round><a class=css data-link-type=maybe href=#valuedef-round title=round>round</a><a class=self-link href=#valuedef-round></a></dfn>
<dd>Border radii define a convex elliptical curve at the corner.
<dt><dfn class=css-code data-dfn-for=corner-shape data-dfn-type=value data-export="" id=valuedef-bevel><a class=css data-link-type=maybe href=#valuedef-bevel title=bevel>bevel</a><a class=self-link href=#valuedef-bevel></a></dfn>
<dd>Border radii define a diagonal slice at the corner.
<dt><dfn class=css-code data-dfn-for=corner-shape data-dfn-type=value data-export="" id=valuedef-scoop><a class=css data-link-type=maybe href=#valuedef-scoop title=scoop>scoop</a><a class=self-link href=#valuedef-scoop></a></dfn>
<dd>Border radii define a concave elliptical curve at the corner.
<dt><dfn class=css-code data-dfn-for=corner-shape data-dfn-type=value data-export="" id=valuedef-notch><a class=css data-link-type=maybe href=#valuedef-notch title=notch>notch</a><a class=self-link href=#valuedef-notch></a></dfn>
<dd>Border radii define a concave rectangular notch at the corner.
</dl>
<div class=example>
For example, the following declarations create a right-pointing next button.
<pre> a {
border-radius: 0 2em 2em 0;
corner-shape: bevel;
padding: 0.5em 2em 0.5em 0.5em;
</pre><p> As a fallback in UAs that don’t support <a class=property data-link-type=propdesc href=#propdef-border-radius title=border-radius>border-radius</a>,
the right side would be rounded rather than pointy.
</div>
<p class=issue id=issue-842710e0><a class=self-link href=#issue-842710e0></a>
For <a class=css data-link-type=maybe href=#valuedef-scoop title=scoop>scoop</a> and <a class=css data-link-type=maybe href=#valuedef-notch title=notch>notch</a>, how do the color/style/width transitions work?
Do they transition once in the middle, or alternate to match the topness/sideness of that segment of the border?
<p class=issue id=issue-05846e60><a class=self-link href=#issue-05846e60></a>
Add a <span class=css data-link-type=maybe title=cubic-bezier()>cubic-bezier()</span> function for random other shapes?
Or some other functions?
<h3 class="heading settled heading" data-level=3.3 id=corners-shorthand><span class=secno>3.3 </span><span class=content>
Corner Shape and Size: the <a class=property data-link-type=propdesc href=#propdef-corners title=corners>corners</a> shorthand</span><a class=self-link href=#corners-shorthand></a></h3>
<table class="definition propdef"><tr><th>Name:<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-corners>corners<a class=self-link href=#propdef-corners></a></dfn><tr><th>Value:<td class=prod><a class=production data-link-type=propdesc href=#propdef-corner-shape title=corner-shape><‘corner-shape’></a> || <a class=production data-link-type=propdesc href=#propdef-border-radius title=border-radius><‘border-radius’></a><tr><th>Initial:<td>see individual properties<tr><th>Applies to:<td>see individual properties<tr><th>Inherited:<td>see individual properties<tr><th>Media:<td>visual<tr><th>Computed value:<td>see individual properties<tr><th>Percentages:<td>see individual properties</table>
<p> The <a class=property data-link-type=propdesc href=#propdef-corners title=corners>corners</a> shorthand sets <a class=property data-link-type=propdesc href=#propdef-corner-shape title=corner-shape>corner-shape</a> and <a class=property data-link-type=propdesc href=#propdef-border-radius title=border-radius>border-radius</a> in the same declaration.
If either is omitted, it is reset to its initial value.
<div class=example>
For example, the following declaration creates a diamond shape.
<pre>corners: bevel 50%;</pre><p> In UAs that don’t support <a class=property data-link-type=propdesc href=#propdef-corner-shape title=corner-shape>corner-shape</a>, the declaration is ignored
(falls back to a rectangle).
</div>
<div class=example>
In this example, the first declaration creates tabs with vertical sides and rounded corners using <a class=property data-link-type=propdesc href=#propdef-border-radius title=border-radius>border-radius</a>,
while the second example makes them trapezoid-shaped in UAs that support <a class=property data-link-type=propdesc href=#propdef-corners title=corners>corners</a>.
<pre> border-radius: 0.25em 0.25em 0 0;
corners: bevel 0.25em 0.25em 0 0 / 50% 50% 0 0;
</pre> </div>
<h2 class="heading settled heading" data-level=4 id=partial-borders0><span class=secno>4 </span><span class=content>
Partial borders</span><a class=self-link href=#partial-borders0></a></h2>
<p>CSS borders traditionally cover an entire border edge. Sometimes,
however, it can be useful to hide some parts of the border.
<p class=issue id=issue-32661c58><a class=self-link href=#issue-32661c58></a>
Here are two proposals for doing this:
the second one is from GCPM, the first one is an attempt to recast it more readably.
The names are terrible, known problem, proposals accepted.
There is a problem with conceiving this as clipping:
if you have dotted borders, you want whole dots always, not parts of dots.
So it should be a drawing limit, not a clip.
<h3 class="heading settled heading" data-level=4.1 id=partial-borders><span class=secno>4.1 </span><span class=content>
Partial Borders: the <a class=property data-link-type=propdesc href=#propdef-border-limit title=border-limit>border-limit</a> property</span><a class=self-link href=#partial-borders></a></h3>
<table class=propdef>
<tr>
<th>Name:
<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-border-limit>border-limit<a class=self-link href=#propdef-border-limit></a></dfn><tr>
<th>Value:
<td>all | [ sides | corners ] [ <length> | <percentage> ]?
| [ top | right | bottom | left ] [ <length> | <percentage> ]
<tr>
<th>Initial:
<td>round
<tr>
<th>Applies to:
<td>all elements, except table element when <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/tables.html#propdef-border-collapse title=border-collapse>border-collapse</a> is
<span class=css data-link-type=maybe title=collapse>collapse</span>
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>relative to border-box
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>as specified
</table>
<p>By default, the entire border is drawn. However, border rendering can be
limited to only part of a border. The keyword specifies which part, and
the length or percentage specifies how much.
<dl data-dfn-for=border-limit data-dfn-type=value>
<dt><dfn class=css-code data-dfn-for=border-limit data-dfn-type=value data-export="" id=valuedef-sides><a class=css data-link-type=maybe href=#valuedef-sides title=sides>sides</a><a class=self-link href=#valuedef-sides></a></dfn>
<dd>The sides are drawn up to but not including the corners (as defined
by the border radii). A length or percentage is measured from the center
of each side: <span class=css data-link-type=maybe title=50%>50%</span> draws the middle 50% of the border; by default the
entire side is drawn.
<dt><dfn class=css-code data-dfn-for=border-limit data-dfn-type=value data-export="" id=valuedef-corners><a class=css data-link-type=maybe href=#valuedef-corners title=corners>corners</a><a class=self-link href=#valuedef-corners></a></dfn>
<dd>The corners are drawn plus the specified distance into the sides if
specified. A length is measured from the closest edge of the corner area.
A percentage is measured from the absolute corner of the border box.
<dt><dfn class=css-code data-dfn-for=border-limit data-dfn-type=value data-export="" id=valuedef-left><a class=css data-link-type=maybe href=#valuedef-left title=left>left</a><a class=self-link href=#valuedef-left></a></dfn>
<dt><dfn class=css-code data-dfn-for=border-limit data-dfn-type=value data-export="" id=valuedef-right><a class=css data-link-type=maybe href=#valuedef-right title=right>right</a><a class=self-link href=#valuedef-right></a></dfn>
<dd>For the left and right (vertical) sides, draws the entire side and
corner. For the top and bottom (horizontal) sides, draws the left/right
portion, as specified. Distances are measured as for <a class=css data-link-type=maybe href=#valuedef-corners title=corners>corners</a>.
<dt><dfn class=css-code data-dfn-for=border-limit data-dfn-type=value data-export="" id=valuedef-top><a class=css data-link-type=maybe href=#valuedef-top title=top>top</a><a class=self-link href=#valuedef-top></a></dfn>
<dt><dfn class=css-code data-dfn-for=border-limit data-dfn-type=value data-export="" id=valuedef-bottom><a class=css data-link-type=maybe href=#valuedef-bottom title=bottom>bottom</a><a class=self-link href=#valuedef-bottom></a></dfn>
<dd>For the top and bottom (horizontal) sides, draws the entire side and
corner. For the left and right (vertical) sides, draws the top/bottom
portion, as specified. Distances are measured as for <a class=css data-link-type=maybe href=#valuedef-corners title=corners>corners</a>.
</dl>
<div class=example>
<p>The following example draws only the middle 50% of the sides.</p>
<pre>box { border: solid; border-parts: sides 50% }</pre> <p>The following example draws only the curved parts of the corners.</p>
<pre>box { border: solid; border-radius: 1em 2em; border-parts: corners; }</pre> <p>The following example draws only the left 4em of the top border.</p>
<pre>box { border-top: solid; border-parts: left 4em; }
<p>The following example draws only the first 10px of each corner:</p>
<pre>box { border: solid; border-parts: corners 10px; }</pre> <p>The following example draws the curved part of the corner plus 5px
along ths sides:</p>
<pre>box { border: solid; border-radius: 5px; border-shape: scoop; border-parts: corners 5px; }</pre> <p>The following example draws the curved part of the corner and all of
the side except the middle 40%.</p>
<pre>box { border: solid; border-radius: 5px; border-shape: scoope; border-parts: corners 30%; }</pre> </pre></div>
<h3 class="heading settled heading" data-level=4.2 id=border-clip><span class=secno>4.2 </span><span class=content>
The <a class=property data-link-type=propdesc href=#propdef-border-clip title=border-clip>border-clip</a> properties</span><a class=self-link href=#border-clip></a></h3>
<table class=propdef>
<tr>
<th>Name:
<td><dfn class=css-code data-dfn-type=property data-export="" id=propdef-border-clip>border-clip<a class=self-link href=#propdef-border-clip></a></dfn>, <dfn class=css-code data-dfn-type=property data-export="" id=propdef-border-clip-top>border-clip-top<a class=self-link href=#propdef-border-clip-top></a></dfn>, <dfn class=css-code data-dfn-type=property data-export="" id=propdef-border-clip-right>border-clip-right<a class=self-link href=#propdef-border-clip-right></a></dfn>, <dfn class=css-code data-dfn-type=property data-export="" id=propdef-border-clip-bottom>border-clip-bottom<a class=self-link href=#propdef-border-clip-bottom></a></dfn>, <dfn class=css-code data-dfn-type=property data-export="" id=propdef-border-clip-left>border-clip-left<a class=self-link href=#propdef-border-clip-left></a></dfn><tr>
<th>Value:
<td>normal | [ <length> | <percentage> | <fraction> ]+
<tr>
<th>Initial:
<td>normal
<tr>
<th>Applies to:
<td>all elements
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>refer to length of border-edge side
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td><span class=css data-link-type=maybe title=normal>normal</span>, or a list consisting of absolute lengths, or percentages as specified
</table>
<p class=issue id=issue-14d9ac8f><a class=self-link href=#issue-14d9ac8f></a>Should these properties be simplified to only accept <code>normal | [ <length> | <percentage> ] +</code>?
<p>These properties split their respective borders into parts along
the border edge. The first part is visible, the second is invisible,
the third part is visible, etc. Parts can be specified with lengths,
percentages, or fractions (expressed by the <span class=css data-link-type=maybe title=fr>fr</span> unit, as per
<a data-biblio-type=informative data-link-type=biblio href=#css3grid title=css3grid>[CSS3GRID]</a> or its <a href=http://dev.w3.org/csswg/css3-grid/>editor’s
edition</a>). The <span class=css data-link-type=maybe title=normal>normal</span> value means
that the border is not split, but shown normally.
<p><a class=property data-link-type=propdesc href=#propdef-border-clip title=border-clip>border-clip</a> is a shorthand property for the four individual properties.
<p>If the listed parts are shorter than the border, any remaining
border is split proportionally between the specified fractions. If
there are no fractions, the behavior is as if <span class=css data-link-type=maybe title=1fr>1fr</span> had been
specified at the end of the list.
<p>If the listed parts are longer than the border, the specified parts
will be shown in full until the end of the border. In this case, all
fractions will be zero.
<p>For horizontal borders, parts are listed from left to right. For
vertical borders, parts are listed from top to bottom.
<p>The exact border parts are determined by laying out the specified border
parts with all fractions initially set to zero. Any remaining border is
split proportionally between the fractions specified.
<div class=example>
<pre>border-clip: 10px 1fr 10px;</pre>
<div style="position: relative; width: 250px; height: 150px; background: white;">
<div style="border: 2px solid black; width: 200px; height: 100px; position: absolute; top: 20px; left: 20px">
<div style="position: absolute; background: white; left: 15px; top: -5px; height: 110px; width: 170px"></div>
<div style="position: absolute; background: white; left: -5px; top: 15px; height: 70px; width: 210px"></div>
</div>
</div>
</div>
<div class=example>
<pre> border-clip-top: 10px 1fr 10px;
border-clip-bottom: 10px 1fr 10px;
border-clip-right: 5px 1fr 5px;
border-clip-left: 5px 1fr 5px;
</pre> <div style="position: relative; width: 250px; height: 150px; background: white;">
<div style="border: 2px solid black; width: 200px; height: 100px; position: absolute; top: 20px; left: 20px">
<div style="position: absolute; background: white; left: 15px; top: -5px; height: 110px; width: 170px"></div>
<div style="position: absolute; background: white; left: -5px; top: 5px; height: 90px; width: 210px"></div>
</div>
</div>
</div>
<div class=example>
<p>By making the first part have zero length, the inverse border of
the previous example can easily be created:
<pre> border-clip-top: 0 10px 1fr 10px;
border-clip-bottom: 0 10px 1fr 10px;
border-clip-right: 0 5px 1fr 5px;
border-clip-left: 0 5px 1fr 5px;
</pre>
<div style="position: relative; width: 250px; height: 150px; background: white;">
<div style="border: 2px solid black; width: 200px; height: 100px; position: absolute; top: 20px; left: 20px">
<div style="position: absolute; background: white; left: -5px; top: -5px; height: 10px; width: 15px"></div>
<div style="position: absolute; background: white; right: -5px; top: -5px; height: 10px; width: 15px"></div>
<div style="position: absolute; background: white; left: -5px; top: 95px; height: 10px; width: 15px"></div>
<div style="position: absolute; background: white; right: -5px; top: 95px; height: 10px; width: 15px"></div>
</div>
</div>
</div>
<div class=example>
<pre> border: thin solid black;
border-clip: 0 1fr; /* hide borders */
border-clip-top: 10px 1fr 10px; /* make certain borders visible */
border-clip-bottom: 10px 1fr 10px;
</pre>
<div style="position: relative; width: 250px; height: 150px; background: white;">
<div style="border: 2px solid black; width: 200px; height: 100px; position: absolute; top: 20px; left: 20px">
<div style="position: absolute; background: white; left: 15px; top: -5px; height: 110px; width: 170px"></div>
<div style="position: absolute; background: white; left: -5px; top: 0px; height: 100px; width: 210px"></div>
</div>
</div>
</div>
<div class=example>
<pre> border-top: thin solid black;
border-bottom: thin solid black;
border-clip-top: 10px;
border-clip-bottom: 10px;
</pre>
<div style="position: relative; width: 250px; height: 150px; background: white;">
<div style="border: 2px solid black; width: 200px; height: 100px; position: absolute; top: 20px; left: 20px">
<div style="position: absolute; background: white; left: 15px; top: -5px; height: 110px; width: 200px"></div>
<div style="position: absolute; background: white; left: -5px; top: 0px; height: 100px; width: 210px"></div>
</div>
</div>
</div>
<div class=example>
<pre> border-top: thin solid black;
border-clip: 10px;
</pre> <div style="position: relative; width: 250px; height: 150px; background: white;">
<div style="border: 2px solid black; width: 200px; height: 100px; position: absolute; top: 20px; left: 20px">
<div style="position: absolute; background: white; left: 15px; top: -5px; height: 110px; width: 200px"></div>
<div style="position: absolute; background: white; left: -5px; top: 0px; height: 110px; width: 210px"></div>
</div>
</div>
</div>
<div class=example>
<p>This rendering:
<div style="background: white; padding: 0.2em 0.5em">
<pre style="margin-left: 0"> A sentence consists of words¹.
</pre> <div style="width: 3em; height: 2px; background: black"></div>
<pre style="margin-left: 0"> ¹ Most often.
</pre> </div>
can be achieved with this style sheet:
<pre> @footnote {
border-top: thin solid black;
border-clip: 4em;
}
</pre> </div>
<div class=example>
<pre> border: 2px solid black;
border-top-parts: repeat(10px 10px);
</pre> <p>In this example, the repeat pattern is shown five times and there is, by coincidence, no remaining border.
<div style="position: relative; width: 100px; background: white; padding: 20px">
<div style="border: 2px solid black; height: 40px"></div>
<div style="position: absolute; background: white; width: 10px; height: 2px; top: 20px; left: 30px"></div>
<div style="position: absolute; background: white; width: 10px; height: 2px; top: 20px; left: 50px"></div>
<div style="position: absolute; background: white; width: 10px; height: 2px; top: 20px; left: 70px"></div>
<div style="position: absolute; background: white; width: 10px; height: 2px; top: 20px; left: 90px"></div>
<div style="position: absolute; background: white; width: 10px; height: 2px; top: 20px; left: 110px"></div>
</div>
</div>
<div class=example>
<pre> border: 2px solid black;
border-top-parts: repeat(10px 10px);
</pre> <p>In this example, the repeat pattern is shown five times. The box in this example is slightly wider than the box in the previous example. The remaining border is taken up by a fraction, as if this code had been specified:
<pre> border: 2px solid black;
border-top-parts: repeat(10px 10px) 1fr;
</pre> <div style="position: relative; width: 105px; background: white; padding: 20px">
<div style="border: 2px solid black; height: 40px"></div>
<div style="position: absolute; background: white; width: 10px; height: 2px; top: 20px; left: 30px"></div>
<div style="position: absolute; background: white; width: 10px; height: 2px; top: 20px; left: 50px"></div>
<div style="position: absolute; background: white; width: 10px; height: 2px; top: 20px; left: 70px"></div>
<div style="position: absolute; background: white; width: 10px; height: 2px; top: 20px; left: 90px"></div>
<div style="position: absolute; background: white; width: 10px; height: 2px; top: 20px; left: 110px"></div>
<div style="position: absolute; background: red; width: 5px; height: 2px; top: 20px; left: 120px"></div>
</div>
<p>The fragment is shown in red for illustrative purposes; it should be shown in black by a compliant UA.
</div>
<div class=example>
<pre> border: 4px solid black;
border-top-parts: 40px 20px 0 1fr repeat(20px 20px) 0 1fr 40px;
</pre> <p>In this example, there will be a visible 40px border part on each end of the top border. Inside the 40px border parts, there will be an invisible border part of at least 20px. Inside these invisible border parts, there will be visible border parts, each 20px long with 20px invisible border parts between them.
<div style="position: relative; width: 192px; background: white; padding: 40px">
<div style="border: 4px solid black; height: 40px"></div>
<div style="position: absolute; background: white; width: 20px; height: 4px; top: 40px; left: 80px"></div>
<div style="position: absolute; background: red; width: 6px; height: 4px; top: 40px; left: 100px"></div>
<div style="position: absolute; background: white; width: 20px; height: 4px; top: 40px; left: 126px"></div>
<div style="position: absolute; background: white; width: 20px; height: 4px; top: 40px; left: 166px"></div>
<div style="position: absolute; background: red; width: 6px; height: 4px; top: 40px; left: 186px"></div>
</div>
<p>The fragments are shown in red for illustrative purposes; they should not be visible in compliant UAs.
</div>
<div class=example>
<pre> border: 4px solid black;
border-top-parts: 40px 20px 0 1fr 20px 20px 0 1fr 40px;
</pre> <p>In this example, there will be a visible 40px border part on each end of the top border. Inside the 40px border parts, there will be an invisible border part of at least 20px. Inside these invisible border parts, there will be visible border parts, each 20px long with 20px invisible border parts between them.
<div style="position: relative; width: 192px; background: white; padding: 40px">
<div style="border: 4px solid black; height: 40px"></div>
<div style="position: absolute; background: white; width: 20px; height: 4px; top: 40px; left: 80px"></div>
<div style="position: absolute; background: red; width: 6px; height: 4px; top: 40px; left: 100px"></div>
<div style="position: absolute; background: white; width: 20px; height: 4px; top: 40px; left: 126px"></div>
<div style="position: absolute; background: white; width: 20px; height: 4px; top: 40px; left: 166px"></div>
<div style="position: absolute; background: red; width: 6px; height: 4px; top: 40px; left: 186px"></div>
</div>
<p>The fragments are shown in red for illustrative purposes; they should not be visible in compliant UAs.
</div>
<div class=example>
<pre> border: 4px solid black;
border-clip-top: 3fr 10px 2fr 10px 1fr 10px 10px 10px 1fr 10px 2fr 10px 3fr;
</pre>
<p>All but one of the visible border parts are represented as fractions in this example. The length of these border parts will change when the width of the element changes. Here is one rendering where 1fr ends up being 10px:
<div style="position: relative; width: 190px; background: white; padding: 40px">
<div style="border: 4px solid black; border-top: none; height: 40px"></div>
<div style="position: absolute; background: red; width: 30px; height: 4px; top: 40px; left: 40px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 70px"></div>
<div style="position: absolute; background: red; width: 20px; height: 4px; top: 40px; left: 80px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 100px"></div>
<div style="position: absolute; background: red; width: 10px; height: 4px; top: 40px; left: 110px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 120px"></div>
<div style="position: absolute; background: black; width: 10px; height: 4px; top: 40px; left: 130px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 140px"></div>
<div style="position: absolute; background: red; width: 10px; height: 4px; top: 40px; left: 150px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 160px"></div>
<div style="position: absolute; background: red; width: 20px; height: 4px; top: 40px; left: 170px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 190px"></div>
<div style="position: absolute; background: red; width: 30px; height: 4px; top: 40px; left: 200px"></div>
</div>
<p>Here is another rendering where 1fr ends up being 30px:
<div style="position: relative; width: 440px; background: white; padding: 40px">
<div style="border: 4px solid black; border-top: none; height: 40px"></div>
<div style="position: absolute; background: red; width: 90px; height: 4px; top: 40px; left: 40px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 130px"></div>
<div style="position: absolute; background: red; width: 60px; height: 4px; top: 40px; left: 140px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 200px"></div>
<div style="position: absolute; background: red; width: 30px; height: 4px; top: 40px; left: 210px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 240px"></div>
<div style="position: absolute; background: black; width: 10px; height: 4px; top: 40px; left: 250px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 260px"></div>
<div style="position: absolute; background: red; width: 30px; height: 4px; top: 40px; left: 270px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 300px"></div>
<div style="position: absolute; background: red; width: 60px; height: 4px; top: 40px; left: 310px"></div>
<div style="position: absolute; background: white; width: 10px; height: 4px; top: 40px; left: 370px"></div>
<div style="position: absolute; background: red; width: 90px; height: 4px; top: 40px; left: 390px"></div>
</div>
<p>The fragments are shown in red for illustrative purposes; they should be black in compliant UAs.
</div>
<h2 class="heading settled heading" data-level=5 id=changes><span class=secno>5 </span><span class=content>
Changes</span><a class=self-link href=#changes></a></h2>
<h3 class="heading settled heading" data-level=5.1 id=level-changes><span class=secno>5.1 </span><span class=content>
Additions Since Level 3</span><a class=self-link href=#level-changes></a></h3>
<p> <ul>
<li>logical <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/colors.html#propdef-background-position title=background-position>background-position</a> values (<a class=css data-link-type=maybe href=http://dev.w3.org/csswg/css-writing-modes-3/#start title=start>start</a>, <a class=css data-link-type=maybe href=http://dev.w3.org/csswg/css-writing-modes-3/#end title=end>end</a>)
<li>the <span class=css data-link-type=maybe title=extend>extend</span> keyword of <a class=property data-link-type=propdesc href=http://www.w3.org/TR/CSS21/colors.html#propdef-background-repeat title=background-repeat>background-repeat</a>
<li><a class=property data-link-type=propdesc href=#propdef-corner-shape title=corner-shape>corner-shape</a>
<li>multiple borders per element
<li><a class=property data-link-type=propdesc href=#propdef-border-clip title=border-clip>border-clip</a> / <a class=property data-link-type=propdesc href=#propdef-border-limit title=border-limit>border-limit</a>
<li>5-way slicing for border-image?
</ul>
<h2 class="heading settled heading" data-level=6 id=acknowledgments><span class=secno>6 </span><span class=content>Acknowledgments</span><a class=self-link href=#acknowledgments></a></h2>
<p>In addition to the many contributors to the <a data-biblio-type=informative data-link-type=biblio href=#css1 title=css1>[CSS1]</a>, <a data-biblio-type=informative data-link-type=biblio href=#css21 title=css21>[CSS21]</a>,
and <a data-biblio-type=informative data-link-type=biblio href=#css3bg title=css3bg>[CSS3BG]</a> predecessors to this module,
the editors would like to thank
Tab Atkins,
and Håkon Wium Lie
for their suggestions and feedback specifically for this Level 4.
<h2 class="no-ref no-num heading settled heading" id=conformance><span class=content>
Conformance</span><a class=self-link href=#conformance></a></h2>
<h3 class="no-ref heading settled heading" id=conventions><span class=content>
Document conventions</span><a class=self-link href=#conventions></a></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 data-biblio-type=normative data-link-type=biblio href=#rfc2119 title=rfc2119>[RFC2119]</a></p>
<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.</p>
</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.</p>
<h3 class="no-ref heading settled heading" id=conformance-classes><span class=content>
Conformance classes</span><a class=self-link href=#conformance-classes></a></h3>
<p>Conformance to this specification
is defined for three conformance classes:
<dl>
<dt>style sheet
<dd>A <a href=http://www.w3.org/TR/CSS21/conform.html#style-sheet>CSS
style sheet</a>.
<dt>renderer
<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>authoring tool
<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 heading settled heading" id=partial><span class=content>
Partial implementations</span><a class=self-link href=#partial></a></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.</p>
<h3 class="no-ref heading settled heading" id=experimental><span class=content>
Experimental implementations</span><a class=self-link href=#experimental></a></h3>
<p>To avoid clashes with future CSS features, the CSS2.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.
</p>
<h3 class="no-ref heading settled heading" id=testing><span class=content>
Non-experimental implementations</span><a class=self-link href=#testing></a></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.
<h2 class="no-num no-ref heading settled heading" id=references><span class=content>
References</span><a class=self-link href=#references></a></h2>
<h3 class="no-num no-ref heading settled heading" id=normative><span class=content>
Normative References</span><a class=self-link href=#normative></a></h3>
<div data-fill-with=normative-references><dl><dt id=rfc2119 title=RFC2119><a class=self-link href=#rfc2119></a>[RFC2119]<dd>S. Bradner. <a href=http://www.ietf.org/rfc/rfc2119.txt>Key words for use in RFCs to Indicate Requirement Levels</a>. URL: <a href=http://www.ietf.org/rfc/rfc2119.txt>http://www.ietf.org/rfc/rfc2119.txt</a></dl></div>
<h3 class="no-num no-ref heading settled heading" id=informative><span class=content>
Informative References</span><a class=self-link href=#informative></a></h3>
<div data-fill-with=informative-references><dl><dt id=css1 title=CSS1><a class=self-link href=#css1></a>[CSS1]<dd>Håkon Wium Lie; Bert Bos. <a href=http://www.w3.org/TR/2008/REC-CSS1-20080411>Cascading Style Sheets (CSS1) Level 1 Specification</a>. 11 April 2008. W3C Recommendation. URL: <a href=http://www.w3.org/TR/2008/REC-CSS1-20080411>http://www.w3.org/TR/2008/REC-CSS1-20080411</a><dt id=css21 title=CSS21><a class=self-link href=#css21></a>[CSS21]<dd>Bert Bos; et al. <a href=http://www.w3.org/TR/2011/REC-CSS2-20110607>Cascading Style Sheets Level 2 Revision 1 (CSS 2.1) Specification</a>. 7 June 2011. W3C Recommendation. URL: <a href=http://www.w3.org/TR/2011/REC-CSS2-20110607>http://www.w3.org/TR/2011/REC-CSS2-20110607</a><dt id=css3bg title=CSS3BG><a class=self-link href=#css3bg></a>[CSS3BG]<dd>Bert Bos; Elika J. Etemad; Brad Kemper. <a href=http://www.w3.org/TR/2012/CR-css3-background-20120724/>CSS Backgrounds and Borders Module Level 3</a>. 24 July 2012. W3C Candidate Recommendation. (Work in progress.) URL: <a href=http://www.w3.org/TR/2012/CR-css3-background-20120724/>http://www.w3.org/TR/2012/CR-css3-background-20120724/</a><dt id=css3grid title=CSS3GRID><a class=self-link href=#css3grid></a>[CSS3GRID]<dd>Alex Mogilevsky; Markus Mielke. <a href=http://www.w3.org/TR/2007/WD-css3-grid-20070905>CSS Grid Positioning Module Level 3</a>. 5 September 2007. W3C Working Draft. (Work in progress.) URL: <a href=http://www.w3.org/TR/2007/WD-css3-grid-20070905>http://www.w3.org/TR/2007/WD-css3-grid-20070905</a></dl></div>
<h2 class="no-num no-ref heading settled heading" id=index><span class=content>
Index</span><a class=self-link href=#index></a></h2>
<div data-fill-with=index><ul class=indexlist>
<li>backround-position, <a href=#propdef-backround-position title="section 2.1">2.1</a>
<li>bevel, <a href=#valuedef-bevel title="section 3.2">3.2</a>
<li>border-clip, <a href=#propdef-border-clip title="section 4.2">4.2</a>
<li>border-clip-bottom, <a href=#propdef-border-clip-bottom title="section 4.2">4.2</a>
<li>border-clip-left, <a href=#propdef-border-clip-left title="section 4.2">4.2</a>
<li>border-clip-right, <a href=#propdef-border-clip-right title="section 4.2">4.2</a>
<li>border-clip-top, <a href=#propdef-border-clip-top title="section 4.2">4.2</a>
<li>border-limit, <a href=#propdef-border-limit title="section 4.1">4.1</a>
<li>border-radius, <a href=#propdef-border-radius title="section 3.1">3.1</a>
<li>bottom, <a href=#valuedef-bottom title="section 4.1">4.1</a>
<li>corners<ul><li>(property), <a href=#propdef-corners title="section 3.3">3.3</a>
<li>value for border-limit, <a href=#valuedef-corners title="section 4.1">4.1</a>
</ul><li>corner-shape, <a href=#propdef-corner-shape title="section 3.2">3.2</a>
<li>left, <a href=#valuedef-left title="section 4.1">4.1</a>
<li>notch, <a href=#valuedef-notch title="section 3.2">3.2</a>
<li><position>, <a href=#typedef-position title="section 2.1">2.1</a>
<li>right, <a href=#valuedef-right title="section 4.1">4.1</a>
<li>round, <a href=#valuedef-round title="section 3.2">3.2</a>
<li>scoop, <a href=#valuedef-scoop title="section 3.2">3.2</a>
<li>sides, <a href=#valuedef-sides title="section 4.1">4.1</a>
<li>top, <a href=#valuedef-top title="section 4.1">4.1</a>
</ul></div>
<h2 class="no-num no-ref heading settled heading" id=property-index><span class=content>
Property index</span><a class=self-link href=#property-index></a></h2>
<div data-fill-with=property-index><table class="proptable data"><thead><tr><th scope=col>Name<th scope=col>Value<th scope=col>Initial<th scope=col>Applies to<th scope=col>Inh.<th scope=col>%ages<th scope=col>Media<th scope=col>Animatable<th scope=col>Canonical order<th scope=col>Computed value<th scope=col>Computed value<tbody>
<tr><th scope=row><a data-property="">backround-position</a><td><position>#<td>top left<td>all<td>no<td>refer to size of background positioning area minus size of background image<td>visual<td><td><td>A list, each item consisting of: a pair of offsets and an origin, each offset given as a combination of an absolute length and a percentage<td>
<tr><th scope=row><a data-property="">border-radius</a><td>[ <length> | <percentage> ]{1,4} [ / [ <length> | <percentage> ]{1,4} ]?<td>0<td>all elements, except table element when border-collapse is collapse<td>no<td>n/a<td>visual<td>no<td>n/a<td>specified value<td>
<tr><th scope=row><a data-property="">corner-shape</a><td>[round | bevel | scoop | notch]{1,4}<td>round<td>all elements, except table element when border-collapse is collapse<td>no<td>n/a<td>visual<td>no<td>n/a<td>specified value<td>
<tr><th scope=row><a data-property="">corners</a><td><‘corner-shape’> || <‘border-radius’><td>see individual properties<td>see individual properties<td>see individual properties<td>see individual properties<td>visual<td><td><td>see individual properties<td>
<tr><th scope=row><a data-property="">border-limit</a><td>all | [ sides | corners ] [ <length> | <percentage> ]?
| [ top | right | bottom | left ] [ <length> | <percentage> ]<td>round<td>all elements, except table element when border-collapse is
collapse<td>no<td>relative to border-box<td>visual<td><td><td>as specified<td>
<tr><th scope=row><a data-property="">border-clip</a><td>normal | [ <length> | <percentage> | <fraction> ]+<td>normal<td>all elements<td>no<td>refer to length of border-edge side<td>visual<td><td><td><td>normal, or a list consisting of absolute lengths, or percentages as specified
<tr><th scope=row><a data-property="">border-clip-top</a><td>normal | [ <length> | <percentage> | <fraction> ]+<td>normal<td>all elements<td>no<td>refer to length of border-edge side<td>visual<td><td><td><td>normal, or a list consisting of absolute lengths, or percentages as specified
<tr><th scope=row><a data-property="">border-clip-right</a><td>normal | [ <length> | <percentage> | <fraction> ]+<td>normal<td>all elements<td>no<td>refer to length of border-edge side<td>visual<td><td><td><td>normal, or a list consisting of absolute lengths, or percentages as specified
<tr><th scope=row><a data-property="">border-clip-bottom</a><td>normal | [ <length> | <percentage> | <fraction> ]+<td>normal<td>all elements<td>no<td>refer to length of border-edge side<td>visual<td><td><td><td>normal, or a list consisting of absolute lengths, or percentages as specified
<tr><th scope=row><a data-property="">border-clip-left</a><td>normal | [ <length> | <percentage> | <fraction> ]+<td>normal<td>all elements<td>no<td>refer to length of border-edge side<td>visual<td><td><td><td>normal, or a list consisting of absolute lengths, or percentages as specified</table></div>
<h2 class="no-num heading settled" id=issues-index><span class=content>Issues Index</span><a class=self-link href=#issues-index></a></h2><div style="counter-reset: issue"><div class=issue>
This module is currently maintained as a diff against Level 3.
We will fold in the text once it’s all formatted up and in CR again,
as this will reduce the effort of keeping them in sync
(source diffs will be accurate in reflecting the differences).
<a href=#issue-648e34a3> ↵ </a></div><div class=issue>Add logical keywords
<a href=#issue-7b26b643> ↵ </a></div><div class=issue>
For <a class=css data-link-type=maybe href=#valuedef-scoop title=scoop>scoop</a> and <a class=css data-link-type=maybe href=#valuedef-notch title=notch>notch</a>, how do the color/style/width transitions work?
Do they transition once in the middle, or alternate to match the topness/sideness of that segment of the border?
<a href=#issue-842710e0> ↵ </a></div><div class=issue>
Add a <span class=css data-link-type=maybe title=cubic-bezier()>cubic-bezier()</span> function for random other shapes?
Or some other functions?
<a href=#issue-05846e60> ↵ </a></div><div class=issue>
Here are two proposals for doing this:
the second one is from GCPM, the first one is an attempt to recast it more readably.
The names are terrible, known problem, proposals accepted.
There is a problem with conceiving this as clipping:
if you have dotted borders, you want whole dots always, not parts of dots.
So it should be a drawing limit, not a clip.
<a href=#issue-32661c58> ↵ </a></div><div class=issue>Should these properties be simplified to only accept <code>normal | [ <length> | <percentage> ] +</code>?
<a href=#issue-14d9ac8f> ↵ </a></div></div>