@@ -1384,42 +1384,30 @@ Outputting Counters: the ''counter()'' and ''counters()'' functions</h3>
1384
1384
<h2 id='ua-stylesheet'>
1385
1385
Appendix A: Sample Style Sheet For HTML</h2>
1386
1386
1387
- Issue: Need to check this section for errors.
1388
-
1389
1387
<em> This section is informative, not normative.
1390
- HTML itself defines the actual default properties that apply to HTML lists.</em>
1388
+ The [[HTML]] <a href="https://html.spec.whatwg.org/multipage/rendering.html#lists">Rendering</a> chapter
1389
+ defines the normative default properties that apply to HTML lists.</em>
1391
1390
1392
1391
<pre>
1393
1392
/* Set up list items */
1394
1393
li {
1395
- display: list-item;
1396
- /* counter-increment: list-item; (implied by display: list-item) */
1394
+ display: list-item; /* implies 'counter-increment: list-item' */
1397
1395
}
1398
1396
1399
- /* Set up ol and ul so that they reset the list-item counter */
1397
+ /* Set up ol and ul so that they scope the list-item counter */
1400
1398
ol, ul {
1401
1399
counter-reset: list-item;
1402
1400
}
1403
1401
1404
- /* Default list style types for ordered lists */
1405
- ol {
1406
- list-style-type: decimal;
1407
- }
1408
-
1409
- /* Default list style types for unordered lists up to 3 deep */
1410
- ul { list-style-type: disc; }
1411
- ul ul { list-style-type: square; }
1412
- ul ul ul { list-style-type: circle; }
1413
- /* Alternately, if Values & Units Level 3 is supported, replace
1414
- the above three lines with: */
1415
- ul { list-style-type: disc; }
1416
- ul ul { list-style-type: cycle(disc, square, circle); }
1402
+ /* Default list style types for lists */
1403
+ ol { list-style-type: decimal; }
1404
+ ul { list-style-type: toggle(disc, circle, square); }
1417
1405
1418
1406
/* The type attribute on ol and ul elements */
1419
- ul[type="disc"] { list-style-type: disc; }
1407
+ ul[type="disc"] { list-style-type: disc; }
1420
1408
ul[type="circle"] { list-style-type: circle; }
1421
1409
ul[type="square"] { list-style-type: square; }
1422
- ol[type="1"] { list-style-type: decimal; }
1410
+ ol[type="1"] { list-style-type: decimal; }
1423
1411
ol[type="a"] { list-style-type: lower-alpha; }
1424
1412
ol[type="A"] { list-style-type: upper-alpha; }
1425
1413
ol[type="i"] { list-style-type: lower-roman; }
@@ -1433,7 +1421,6 @@ Appendix A: Sample Style Sheet For HTML</h2>
1433
1421
/* The value attribute on li elements */
1434
1422
li[value] {
1435
1423
counter-set: list-item attr(value integer, 1);
1436
- counter-increment: none; /* Turn off default increase */
1437
1424
}
1438
1425
1439
1426
/* Handling reversed lists */
@@ -1448,20 +1435,12 @@ Appendix A: Sample Style Sheet For HTML</h2>
1448
1435
/* Box Model Rules */
1449
1436
ol, ul {
1450
1437
display: block;
1451
- margin: 1em 0;
1452
- marker-side: list-container;
1453
- }
1454
-
1455
- ol:dir(ltr), ul:dir(ltr) {
1456
- padding-left: 40px;
1457
- }
1458
- ol:dir(rtl), ul:dir(rtl) {
1459
- padding-right: 40px;
1438
+ margin-block: 1em;
1439
+ marker-side: match-parent;
1440
+ padding-inline-start: 40px;
1460
1441
}
1461
-
1462
1442
ol ol, ol ul, ul ul, ul ol {
1463
- margin-top: 0;
1464
- margin-bottom: 0;
1443
+ margin-block: 0;
1465
1444
}
1466
1445
1467
1446
li {
@@ -1474,7 +1453,6 @@ Appendix A: Sample Style Sheet For HTML</h2>
1474
1453
}
1475
1454
</pre>
1476
1455
1477
-
1478
1456
<h2 class="no-num" id="acknowledgments">
1479
1457
Acknowledgments</h2>
1480
1458
0 commit comments