-
Notifications
You must be signed in to change notification settings - Fork 708
/
Copy pathOverview.html
1642 lines (1628 loc) · 104 KB
/
Overview.html
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
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
<!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>
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport">
<meta content="exploring" name="csswg-work-status">
<meta content="ED" name="w3c-status">
<link href="../default.css" rel="stylesheet" type="text/css">
<link href="../csslogo.ico" rel="shortcut icon" type="image/x-icon">
<style>
body {
background-image: url("https://www.w3.org/StyleSheets/TR/logo-ED");
};
</style>
<meta content="Bikeshed 1.0.0" name="generator">
<style>/* style-md-lists */
/* This is a weird hack for me not yet following the commonmark spec
regarding paragraph and lists. */
[data-md] > :first-child {
margin-top: 0;
}
[data-md] > :last-child {
margin-bottom: 0;
}</style>
<style>/* style-counters */
body {
counter-reset: example figure issue;
}
.issue {
counter-increment: issue;
}
.issue:not(.no-marker)::before {
content: "Issue " counter(issue);
}
.example {
counter-increment: example;
}
.example:not(.no-marker)::before {
content: "Example " counter(example);
}
.invalid.example:not(.no-marker)::before,
.illegal.example:not(.no-marker)::before {
content: "Invalid Example" counter(example);
}
figure {
counter-increment: figure;
}
figcaption:not(.no-marker)::before {
content: "Figure " counter(figure);
}</style>
<style>/* style-dfn-panel */
.dfn-panel {
position: absolute;
z-index: 35;
height: auto;
width: -webkit-fit-content;
width: fit-content;
max-width: 300px;
max-height: 500px;
overflow: auto;
padding: 0.5em 0.75em;
font: small Helvetica Neue, sans-serif, Droid Sans Fallback;
background: #DDDDDD;
color: black;
border: outset 0.2em;
}
.dfn-panel:not(.on) { display: none; }
.dfn-panel * { margin: 0; padding: 0; text-indent: 0; }
.dfn-panel > b { display: block; }
.dfn-panel a { color: black; }
.dfn-panel a:not(:hover) { text-decoration: none !important; border-bottom: none !important; }
.dfn-panel > b + b { margin-top: 0.25em; }
.dfn-panel ul { padding: 0; }
.dfn-panel li { list-style: inside; }
.dfn-panel.activated {
display: inline-block;
position: fixed;
left: .5em;
bottom: 2em;
margin: 0 auto;
max-width: calc(100vw - 1.5em - .4em - .5em);
max-height: 30vh;
}
.dfn-paneled { cursor: pointer; }
</style>
<style>/* style-selflinks */
.heading, .issue, .note, .example, li, dt {
position: relative;
}
a.self-link {
position: absolute;
top: 0;
left: calc(-1 * (3.5rem - 26px));
width: calc(3.5rem - 26px);
height: 2em;
text-align: center;
border: none;
transition: opacity .2s;
opacity: .5;
}
a.self-link:hover {
opacity: 1;
}
.heading > a.self-link {
font-size: 83%;
}
li > a.self-link {
left: calc(-1 * (3.5rem - 26px) - 2em);
}
dfn > a.self-link {
top: auto;
left: auto;
opacity: 0;
width: 1.5em;
height: 1.5em;
background: gray;
color: white;
font-style: normal;
transition: opacity .2s, background-color .2s, color .2s;
}
dfn:hover > a.self-link {
opacity: 1;
}
dfn > a.self-link:hover {
color: black;
}
a.self-link::before { content: "¶"; }
.heading > a.self-link::before { content: "§"; }
dfn > a.self-link::before { content: "#"; }</style>
<style>/* style-autolinks */
.css.css, .property.property, .descriptor.descriptor {
color: #005a9c;
font-size: inherit;
font-family: inherit;
}
.css::before, .property::before, .descriptor::before {
content: "‘";
}
.css::after, .property::after, .descriptor::after {
content: "’";
}
.property, .descriptor {
/* Don't wrap property and descriptor names */
white-space: nowrap;
}
.type { /* CSS value <type> */
font-style: italic;
}
pre .property::before, pre .property::after {
content: "";
}
[data-link-type="property"]::before,
[data-link-type="propdesc"]::before,
[data-link-type="descriptor"]::before,
[data-link-type="value"]::before,
[data-link-type="function"]::before,
[data-link-type="at-rule"]::before,
[data-link-type="selector"]::before,
[data-link-type="maybe"]::before {
content: "‘";
}
[data-link-type="property"]::after,
[data-link-type="propdesc"]::after,
[data-link-type="descriptor"]::after,
[data-link-type="value"]::after,
[data-link-type="function"]::after,
[data-link-type="at-rule"]::after,
[data-link-type="selector"]::after,
[data-link-type="maybe"]::after {
content: "’";
}
[data-link-type].production::before,
[data-link-type].production::after,
.prod [data-link-type]::before,
.prod [data-link-type]::after {
content: "";
}
[data-link-type=element],
[data-link-type=element-attr] {
font-family: Menlo, Consolas, "DejaVu Sans Mono", monospace;
font-size: .9em;
}
[data-link-type=element]::before { content: "<" }
[data-link-type=element]::after { content: ">" }
[data-link-type=biblio] {
white-space: pre;
}</style>
<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/StyleSheets/TR/2016/logos/W3C" 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" id="subtitle"><span class="content">Editor’s Draft, <time class="dt-updated" datetime="2016-05-25">25 May 2016</time></span></h2>
<div data-fill-with="spec-metadata">
<dl>
<dt>This version:
<dd><a class="u-url" href="https://drafts.csswg.org/css-backgrounds-4/">https://drafts.csswg.org/css-backgrounds-4/</a>
<dt>Latest published version:
<dd><a href="https://www.w3.org/TR/css-backgrounds-4/">https://www.w3.org/TR/css-backgrounds-4/</a>
<dt>Feedback:
<dd><span><a href="mailto:www-style@w3.org?subject=%5Bcss-backgrounds%5D%20YOUR%20TOPIC%20HERE">www-style@w3.org</a> with subject line “<kbd>[css-backgrounds] <i data-lt="">… message topic …</i></kbd>” (<a href="http://lists.w3.org/Archives/Public/www-style/" rel="discussion">archives</a>)</span>
<dt>Issue Tracking:
<dd><a href="#issues-index">Inline In Spec</a>
<dt class="editor">Editors:
<dd class="editor 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="editor p-author h-card vcard"><a class="p-name fn u-url url" href="http://fantasai.inkedblade.net/contact">Elika J. Etemad / fantasai</a> (<span class="p-org org">Invited Expert</span>)
<dd class="editor 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">
<details class="annoying-warning" open="">
<summary>Not Ready For Implementation</summary>
<p> This spec is not yet ready for implementation.
It exists in this repository to record the ideas and promote discussion. </p>
<p> Before attempting to implement this spec,
please contact the CSSWG at www-style@w3.org. </p>
</details>
</div>
<p class="copyright" data-fill-with="copyright"><a href="http://www.w3.org/Consortium/Legal/ipr-notice#Copyright">Copyright</a> © 2016 <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>). 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" id="abstract"><span class="content">Abstract</span></h2>
<div class="p-summary" data-fill-with="abstract">
<p>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="https://www.w3.org/TR/css3-background/">CSS Backgrounds and Borders Level 3</a>. <a data-link-type="biblio" href="#biblio-css3bg">[CSS3BG]</a> The main extensions compared to level 3 are shaping (<a class="property" data-link-type="propdesc" href="#propdef-corner-shape">corner-shape</a>) and clipping borders (<a class="property" data-link-type="propdesc" href="#propdef-border-clip">border-clip</a>), logical background positions (<a class="property" data-link-type="propdesc" href="#propdef-background-position">background-position</a>), and the <span class="css">extend</span> ability of <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/colors.html#propdef-background-repeat">background-repeat</a>.</p>
<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.
</div>
<h2 class="no-num no-toc no-ref heading settled" 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>
<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>
<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>
<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>
<p> This document is governed by the <a href="http://www.w3.org/2015/Process-20150901/" id="w3c_process_revision">1 September 2015 W3C Process Document</a>. </p>
<p></p>
</div>
<div data-fill-with="at-risk"></div>
<nav data-fill-with="table-of-contents" id="toc">
<h2 class="no-num no-toc no-ref" id="contents">Table of Contents</h2>
<ol class="toc" role="directory">
<li><a href="#intro"><span class="secno">1</span> <span class="content"> Introduction</span></a>
<li>
<a href="#backgrounds"><span class="secno">2</span> <span class="content"> Backgrounds</span></a>
<ol class="toc">
<li>
<a href="#the-background-position"><span class="secno">2.1</span> <span class="content"> Background Positioning: the <span class="property">background-position</span> shorthand property</span></a>
<ol class="toc">
<li><a href="#background-position-longhands"><span class="secno">2.1.1</span> <span class="content"> Background Positioning Longhands: the <span class="property">background-position-x</span>, <span class="property">background-position-y</span>, <span class="property">background-position-inline</span>, and <span class="property">background-position-block</span> properties</span></a>
</ol>
</ol>
<li>
<a href="#corners"><span class="secno">3</span> <span class="content"> Corners</span></a>
<ol class="toc">
<li><a href="#corner-sizing"><span class="secno">3.1</span> <span class="content"> Corner Sizing: the 'border-radius property</span></a>
<li><a href="#corner-shaping"><span class="secno">3.2</span> <span class="content"> Corner Shaping: the <span class="property">corner-shape</span> property</span></a>
<li><a href="#corners-shorthand"><span class="secno">3.3</span> <span class="content"> Corner Shape and Size: the <span class="property">corners</span> shorthand</span></a>
</ol>
<li>
<a href="#partial-borders"><span class="secno">4</span> <span class="content"> Partial borders</span></a>
<ol class="toc">
<li><a href="#border-limit"><span class="secno">4.1</span> <span class="content"> Partial Borders: the <span class="property">border-limit</span> property</span></a>
<li><a href="#border-clip"><span class="secno">4.2</span> <span class="content"> The <span class="property">border-clip</span> properties</span></a>
</ol>
<li>
<a href="#changes"><span class="secno">5</span> <span class="content"> Changes</span></a>
<ol class="toc">
<li><a href="#level-changes"><span class="secno">5.1</span> <span class="content"> Additions Since Level 3</span></a>
</ol>
<li><a href="#acknowledgments"><span class="secno">6</span> <span class="content">Acknowledgments</span></a>
<li>
<a href="#conformance"><span class="secno"></span> <span class="content"> Conformance</span></a>
<ol class="toc">
<li><a href="#document-conventions"><span class="secno"></span> <span class="content"> Document conventions</span></a>
<li><a href="#conform-classes"><span class="secno"></span> <span class="content"> Conformance classes</span></a>
<li>
<a href="#conform-responsible"><span class="secno"></span> <span class="content"> Requirements for Responsible Implementation of CSS</span></a>
<ol class="toc">
<li><a href="#conform-partial"><span class="secno"></span> <span class="content"> Partial Implementations</span></a>
<li><a href="#conform-future-proofing"><span class="secno"></span> <span class="content"> Implementations of Unstable and Proprietary Features</span></a>
<li><a href="#conform-testing"><span class="secno"></span> <span class="content"> Implementations of CR-level Features</span></a>
</ol>
</ol>
<li>
<a href="#index"><span class="secno"></span> <span class="content">Index</span></a>
<ol class="toc">
<li><a href="#index-defined-here"><span class="secno"></span> <span class="content">Terms defined by this specification</span></a>
<li><a href="#index-defined-elsewhere"><span class="secno"></span> <span class="content">Terms defined by reference</span></a>
</ol>
<li>
<a href="#references"><span class="secno"></span> <span class="content">References</span></a>
<ol class="toc">
<li><a href="#normative"><span class="secno"></span> <span class="content">Normative References</span></a>
<li><a href="#informative"><span class="secno"></span> <span class="content">Informative References</span></a>
</ol>
<li><a href="#property-index"><span class="secno"></span> <span class="content">Property Index</span></a>
<li><a href="#issues-index"><span class="secno"></span> <span class="content">Issues Index</span></a>
</ol>
</nav>
<main>
<h2 class="heading settled" 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). </p>
<h2 class="heading settled" 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" 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="#propdef-background-position" id="ref-for-propdef-background-position-1">background-position</a> shorthand property</span><a class="self-link" href="#the-background-position"></a></h3>
<table class="def propdef" data-link-for-hint="background-position">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export="" id="propdef-background-position">background-position</dfn>
<tr class="value">
<th>Value:
<td class="prod"><a class="production css" data-link-type="type" href="#typedef-position" id="ref-for-typedef-position-1"><position></a><a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-comma">#</a>
<tr>
<th>Initial:
<td>top left
<tr>
<th>Applies to:
<td>all
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>refer to size of background positioning area <em>minus</em> size of background image
<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>Animation type:
<td>discrete
</table>
<p>See <a data-link-type="biblio" href="#biblio-css3bg">[CSS3BG]</a> for definition.</p>
<p>Where </p>
<pre class="prod"><dfn class="dfn-paneled" data-dfn-type="type" data-export="" id="typedef-position"><position></dfn> = [ [ left <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> center <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> right <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> top <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> bottom <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> end <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><percentage></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><length></var> ]
<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a>
[ left <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> center <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> right <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> x-start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> x-end <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><percentage></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><length></var> ]
[ top <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> center <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> bottom <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> y-start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> y-end <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><percentage></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><length></var> ]
<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a>
[ center <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> [ left <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> right <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> x-start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> x-end ] [ <var><percentage></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><length></var> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> ] &&
[ center <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> [ top <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> bottom <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> y-start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> y-end ] [ <var><percentage></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><length></var> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> ]
<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a>
[ center <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> [ start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> end ] [ <var><percentage></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><length></var> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> ]
[ center <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> [ start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> end ] [ <var><percentage></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><length></var> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> ] ]</pre>
<p>Values have the following meanings:</p>
<dl>
<dt>One value
<dd> If only one value is given,
and that value is <span class="css">start</span> or <span class="css">end</span>,
then the keyword is duplicated;
otherwise the second keyword defaults to <span class="css">center</span>.
The resulting value is treated as a two-component value.
<dt>More than one value
<dd>
If the value contains a <span class="css">start</span> or <span class="css">end</span> keyword,
then the shorthand sets <a class="property" data-link-type="propdesc" href="#propdef-background-position-inline" id="ref-for-propdef-background-position-inline-1">background-position-inline</a> and <a class="property" data-link-type="propdesc" href="#propdef-background-position-block" id="ref-for-propdef-background-position-block-1">background-position-block</a> to the specified values.
Otherwise
the shorthand sets <a class="property" data-link-type="propdesc" href="#propdef-background-position-x" id="ref-for-propdef-background-position-x-1">background-position-x</a> and <a class="property" data-link-type="propdesc" href="#propdef-background-position-y" id="ref-for-propdef-background-position-y-1">background-position-y</a> to the specified values.
<p class="issue" id="issue-e752f96e"><a class="self-link" href="#issue-e752f96e"></a> Specify the value assignment in more detail. Should expand just like Level 3.</p>
</dl>
<p class="issue" id="issue-f4a1aeb0"><a class="self-link" href="#issue-f4a1aeb0"></a> Specify what happens to set of properties that are not set. Maybe they’re just not set?</p>
<h4 class="heading settled" data-level="2.1.1" id="background-position-longhands"><span class="secno">2.1.1. </span><span class="content"> Background Positioning Longhands: the <a class="property" data-link-type="propdesc" href="#propdef-background-position-x" id="ref-for-propdef-background-position-x-2">background-position-x</a>, <a class="property" data-link-type="propdesc" href="#propdef-background-position-y" id="ref-for-propdef-background-position-y-2">background-position-y</a>, <a class="property" data-link-type="propdesc" href="#propdef-background-position-inline" id="ref-for-propdef-background-position-inline-2">background-position-inline</a>, and <a class="property" data-link-type="propdesc" href="#propdef-background-position-block" id="ref-for-propdef-background-position-block-2">background-position-block</a> properties</span><a class="self-link" href="#background-position-longhands"></a></h4>
<p class="issue" id="issue-67389536"><a class="self-link" href="#issue-67389536"></a> This section is still being worked out. The tricky thing is making all the start/end keywords work sanely.</p>
<table class="def propdef" data-link-for-hint="background-position-x">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export="" id="propdef-background-position-x">background-position-x</dfn>
<tr class="value">
<th>Value:
<td class="prod">[ center <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> [ left <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> right <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> x-start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> x-end ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> [ <var><percentage></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><length></var> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-comma">#</a>
<tr>
<th>Initial:
<td>left
<tr>
<th>Applies to:
<td>all
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>refer to width of background positioning area <em>minus</em> width of background image
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>A list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keyword
<tr>
<th>Animation type:
<td>discrete
</table>
<p>This property specifies the background position’s horizontal component.
An omitted origin keyword is assumed to be <a class="css" data-link-type="maybe" href="#valdef-border-limit-left" id="ref-for-valdef-border-limit-left-1">left</a>.</p>
<table class="def propdef" data-link-for-hint="background-position-y">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export="" id="propdef-background-position-y">background-position-y</dfn>
<tr class="value">
<th>Value:
<td class="prod">[ center <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> [ top <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> bottom <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> y-start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> y-end ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> [ <var><percentage></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><length></var> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-comma">#</a>
<tr>
<th>Initial:
<td>left
<tr>
<th>Applies to:
<td>all
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>refer to height of background positioning area <em>minus</em> height of background image
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>A list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keyword
<tr>
<th>Animation type:
<td>discrete
</table>
<p>This property specifies the background position’s vertical component.
An omitted origin keyword is assumed to be <a class="css" data-link-type="maybe" href="#valdef-border-limit-top" id="ref-for-valdef-border-limit-top-1">top</a>.</p>
<table class="def propdef" data-link-for-hint="background-position-inline">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export="" id="propdef-background-position-inline">background-position-inline</dfn>
<tr class="value">
<th>Value:
<td class="prod">[ center <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> [ start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> end ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> [ <var><percentage></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><length></var> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-comma">#</a>
<tr>
<th>Initial:
<td>not applicable (initial value comes from physical property)
<tr>
<th>Applies to:
<td>all
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>refer to inline-size of background positioning area <em>minus</em> inline-size of background image
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>A list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keyword
<tr>
<th>Animation type:
<td>discrete
</table>
<p>This property specifies the background position’s inline-axis component.
An omitted origin keyword is assumed to be <span class="css">start</span>.</p>
<table class="def propdef" data-link-for-hint="background-position-block">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export="" id="propdef-background-position-block">background-position-block</dfn>
<tr class="value">
<th>Value:
<td class="prod">[ center <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> [ start <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> end ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> [ <var><percentage></var> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <var><length></var> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-comma">#</a>
<tr>
<th>Initial:
<td>not applicable (initial value comes from physical property)
<tr>
<th>Applies to:
<td>all
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>refer to size of background positioning area <em>minus</em> size of background image
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>A list, each item consisting of: an offset given as a combination of an absolute length and a percentage, plus an origin keyword
<tr>
<th>Animation type:
<td>discrete
</table>
<p>This property specifies the background position’s block-axis component.
An omitted origin keyword is assumed to be <span class="css">start</span>.</p>
<h2 class="heading settled" 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" 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="def propdef" data-link-for-hint="border-radius">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export="" id="propdef-border-radius">border-radius</dfn>
<tr class="value">
<th>Value:
<td class="prod">[ <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" title="Expands to: em | advance measure | ch | vmin | cm | pc | pixel unit | in | rem | q | vh | ex | pt | vw | vmax | mm"><length></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value"><percentage></a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-num-range">{1,4}</a> [ / [ <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#length-value" title="Expands to: em | advance measure | ch | vmin | cm | pc | pixel unit | in | rem | q | vh | ex | pt | vw | vmax | mm"><length></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> <a class="production css" data-link-type="type" href="https://drafts.csswg.org/css-values-3/#percentage-value"><percentage></a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-num-range">{1,4}</a> ]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-opt">?</a>
<tr>
<th>Initial:
<td>0
<tr>
<th>Applies to:
<td>all elements, except table element when <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/tables.html#propdef-border-collapse">border-collapse</a> is <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-ruby-1/#valdef-ruby-merge-collapse">collapse</a>
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>n/a
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>specified value
<tr>
<th>Animatable:
<td>no
<tr>
<th>Canonical order:
<td>n/a
</table>
<p>See <a data-link-type="biblio" href="#biblio-css3bg">[CSS3BG]</a>.</p>
<h3 class="heading settled" 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" id="ref-for-propdef-corner-shape-1">corner-shape</a> property</span><a class="self-link" href="#corner-shaping"></a></h3>
<table class="def propdef" data-link-for-hint="corner-shape">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export="" id="propdef-corner-shape">corner-shape</dfn>
<tr class="value">
<th>Value:
<td class="prod">[round <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> bevel <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> scoop <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-one">|</a> notch]<a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#mult-num-range">{1,4}</a>
<tr>
<th>Initial:
<td>round
<tr>
<th>Applies to:
<td>all elements, except table element when <a class="property" data-link-type="propdesc" href="https://drafts.csswg.org/css2/tables.html#propdef-border-collapse">border-collapse</a> is <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-ruby-1/#valdef-ruby-merge-collapse">collapse</a>
<tr>
<th>Inherited:
<td>no
<tr>
<th>Percentages:
<td>n/a
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>specified value
<tr>
<th>Animatable:
<td>no
<tr>
<th>Canonical order:
<td>n/a
</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" id="ref-for-propdef-corner-shape-2">corner-shape</a> property specifies a reinterpretation of the radii
to define other corner shapes.</p>
<dl>
<dt><dfn class="dfn-paneled css" data-dfn-for="corner-shape" data-dfn-type="value" data-export="" id="valdef-corner-shape-round"><a class="css" data-link-type="maybe" href="#valdef-corner-shape-round" id="ref-for-valdef-corner-shape-round-1">round</a></dfn>
<dd>Border radii define a convex elliptical curve at the corner.
<dt><dfn class="dfn-paneled css" data-dfn-for="corner-shape" data-dfn-type="value" data-export="" id="valdef-corner-shape-bevel"><a class="css" data-link-type="maybe" href="#valdef-corner-shape-bevel" id="ref-for-valdef-corner-shape-bevel-1">bevel</a></dfn>
<dd>Border radii define a diagonal slice at the corner.
<dt><dfn class="dfn-paneled css" data-dfn-for="corner-shape" data-dfn-type="value" data-export="" id="valdef-corner-shape-scoop"><a class="css" data-link-type="maybe" href="#valdef-corner-shape-scoop" id="ref-for-valdef-corner-shape-scoop-1">scoop</a></dfn>
<dd>Border radii define a concave elliptical curve at the corner.
<dt><dfn class="dfn-paneled css" data-dfn-for="corner-shape" data-dfn-type="value" data-export="" id="valdef-corner-shape-notch"><a class="css" data-link-type="maybe" href="#valdef-corner-shape-notch" id="ref-for-valdef-corner-shape-notch-1">notch</a></dfn>
<dd>Border radii define a concave rectangular notch at the corner.
</dl>
<div class="example" id="example-eb5dcbed">
<a class="self-link" href="#example-eb5dcbed"></a> 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" id="ref-for-propdef-border-radius-1">border-radius</a>,
the right side would be rounded rather than pointy.</p>
</div>
<p class="issue" id="issue-7e3f29b5"><a class="self-link" href="#issue-7e3f29b5"></a> For <a class="css" data-link-type="maybe" href="#valdef-corner-shape-scoop" id="ref-for-valdef-corner-shape-scoop-2">scoop</a> and <a class="css" data-link-type="maybe" href="#valdef-corner-shape-notch" id="ref-for-valdef-corner-shape-notch-2">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>
<p class="issue" id="issue-cba02f09"><a class="self-link" href="#issue-cba02f09"></a> Add a <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-transitions-1/#funcdef-transition-timing-function-cubic-bezier">cubic-bezier()</a> function for random other shapes?
Or some other functions? </p>
<h3 class="heading settled" 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" id="ref-for-propdef-corners-1">corners</a> shorthand</span><a class="self-link" href="#corners-shorthand"></a></h3>
<table class="def propdef" data-link-for-hint="corners">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export="" id="propdef-corners">corners</dfn>
<tr class="value">
<th>Value:
<td class="prod"><a class="production" data-link-type="propdesc" href="#propdef-corner-shape" id="ref-for-propdef-corner-shape-3"><‘corner-shape’></a> <a data-link-type="grammar" href="https://drafts.csswg.org/css-values-3/#comb-any">||</a> <a class="production" data-link-type="propdesc" href="#propdef-border-radius" id="ref-for-propdef-border-radius-2"><‘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>Percentages:
<td>see individual properties
<tr>
<th>Media:
<td>visual
<tr>
<th>Computed value:
<td>see individual properties
<tr>
<th>Animation type:
<td>discrete
</table>
<p>The <a class="property" data-link-type="propdesc" href="#propdef-corners" id="ref-for-propdef-corners-2">corners</a> shorthand sets <a class="property" data-link-type="propdesc" href="#propdef-corner-shape" id="ref-for-propdef-corner-shape-4">corner-shape</a> and <a class="property" data-link-type="propdesc" href="#propdef-border-radius" id="ref-for-propdef-border-radius-3">border-radius</a> in the same declaration.
If either is omitted, it is reset to its initial value.</p>
<div class="example" id="example-9b886b19">
<a class="self-link" href="#example-9b886b19"></a> 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" id="ref-for-propdef-corner-shape-5">corner-shape</a>, the declaration is ignored
(falls back to a rectangle).</p>
</div>
<div class="example" id="example-0f55a243">
<a class="self-link" href="#example-0f55a243"></a> 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" id="ref-for-propdef-border-radius-4">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" id="ref-for-propdef-corners-3">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" data-level="4" id="partial-borders"><span class="secno">4. </span><span class="content"> Partial borders</span><a class="self-link" href="#partial-borders"></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>
<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. </p>
<h3 class="heading settled" data-level="4.1" id="border-limit"><span class="secno">4.1. </span><span class="content"> Partial Borders: the <a class="property" data-link-type="propdesc" href="#propdef-border-limit" id="ref-for-propdef-border-limit-1">border-limit</a> property</span><a class="self-link" href="#border-limit"></a></h3>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export="" id="propdef-border-limit">border-limit</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="https://drafts.csswg.org/css2/tables.html#propdef-border-collapse">border-collapse</a> is <a class="css" data-link-type="maybe" href="https://drafts.csswg.org/css-ruby-1/#valdef-ruby-merge-collapse">collapse</a>
<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. </p>
<dl>
<dt><dfn class="dfn-paneled css" data-dfn-for="border-limit" data-dfn-type="value" data-export="" id="valdef-border-limit-sides"><a class="css" data-link-type="maybe" href="#valdef-border-limit-sides" id="ref-for-valdef-border-limit-sides-1">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">50%</span> draws the middle 50% of the border; by default the
entire side is drawn.
<dt><dfn class="dfn-paneled css" data-dfn-for="border-limit" data-dfn-type="value" data-export="" id="valdef-border-limit-corners"><a class="css" data-link-type="maybe" href="#valdef-border-limit-corners" id="ref-for-valdef-border-limit-corners-1">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="dfn-paneled css" data-dfn-for="border-limit" data-dfn-type="value" data-export="" id="valdef-border-limit-left"><a class="css" data-link-type="maybe" href="#valdef-border-limit-left" id="ref-for-valdef-border-limit-left-2">left</a></dfn>
<dt><dfn class="dfn-paneled css" data-dfn-for="border-limit" data-dfn-type="value" data-export="" id="valdef-border-limit-right"><a class="css" data-link-type="maybe" href="#valdef-border-limit-right" id="ref-for-valdef-border-limit-right-1">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="#valdef-border-limit-corners" id="ref-for-valdef-border-limit-corners-2">corners</a>.
<dt><dfn class="dfn-paneled css" data-dfn-for="border-limit" data-dfn-type="value" data-export="" id="valdef-border-limit-top"><a class="css" data-link-type="maybe" href="#valdef-border-limit-top" id="ref-for-valdef-border-limit-top-2">top</a></dfn>
<dt><dfn class="dfn-paneled css" data-dfn-for="border-limit" data-dfn-type="value" data-export="" id="valdef-border-limit-bottom"><a class="css" data-link-type="maybe" href="#valdef-border-limit-bottom" id="ref-for-valdef-border-limit-bottom-1">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="#valdef-border-limit-corners" id="ref-for-valdef-border-limit-corners-3">corners</a>.
</dl>
<div class="example" id="example-b1dc6000">
<a class="self-link" href="#example-b1dc6000"></a>
<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" 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" id="ref-for-propdef-border-clip-1">border-clip</a> properties</span><a class="self-link" href="#border-clip"></a></h3>
<table class="propdef">
<tbody>
<tr>
<th>Name:
<td><dfn class="dfn-paneled css" data-dfn-type="property" data-export="" id="propdef-border-clip">border-clip</dfn>, <dfn class="css" 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" 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" 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" 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">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>
<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">fr</span> unit, as per <a data-link-type="biblio" href="#biblio-css3grid">[CSS3GRID]</a> or its <a href="https://drafts.csswg.org/css3-grid/">editor’s
edition</a>).
The <span class="css">normal</span> value means
that the border is not split, but shown normally. </p>
<p><a class="property" data-link-type="propdesc" href="#propdef-border-clip" id="ref-for-propdef-border-clip-2">border-clip</a> is a shorthand property for the four individual properties. </p>
<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">1fr</span> had been
specified at the end of the list. </p>
<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>
<p>For horizontal borders, parts are listed from left to right. For
vertical borders, parts are listed from top to bottom. </p>
<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. </p>
<div class="example" id="example-fdd9a140">
<a class="self-link" href="#example-fdd9a140"></a>
<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" id="example-d6a76cbb">
<a class="self-link" href="#example-d6a76cbb"></a>
<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" id="example-48afcd7c">
<a class="self-link" href="#example-48afcd7c"></a>
<p>By making the first part have zero length, the inverse border of
the previous example can easily be created: </p>
<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" id="example-986e1e6e">
<a class="self-link" href="#example-986e1e6e"></a>
<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" id="example-875259c7">
<a class="self-link" href="#example-875259c7"></a>
<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" id="example-396eb432">
<a class="self-link" href="#example-396eb432"></a>
<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" id="example-763dbd88">
<a class="self-link" href="#example-763dbd88"></a>
<p>This rendering: </p>
<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" id="example-9d276605">
<a class="self-link" href="#example-9d276605"></a>
<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. </p>
<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" id="example-fc57d294">
<a class="self-link" href="#example-fc57d294"></a>
<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: </p>
<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. </p>
</div>
<div class="example" id="example-dc7a51f1">
<a class="self-link" href="#example-dc7a51f1"></a>
<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. </p>
<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. </p>
</div>
<div class="example" id="example-a925bbb5">
<a class="self-link" href="#example-a925bbb5"></a>
<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. </p>
<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. </p>
</div>
<div class="example" id="example-4b433205">
<a class="self-link" href="#example-4b433205"></a>
<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: </p>
<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: </p>
<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. </p>
</div>
<h2 class="heading settled" 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" 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 class="issue" id="issue-faa8d599"><a class="self-link" href="#issue-faa8d599"></a>Additions are a work in progress... here’s what we’re planning to add. :) </p>
<ul>