Skip to content

Commit b8ee50e

Browse files
committed
[css-lists-3] Clean up / update default HTML style rules.
1 parent 9d63557 commit b8ee50e

File tree

1 file changed

+13
-35
lines changed

1 file changed

+13
-35
lines changed

css-lists-3/Overview.bs

+13-35
Original file line numberDiff line numberDiff line change
@@ -1384,42 +1384,30 @@ Outputting Counters: the ''counter()'' and ''counters()'' functions</h3>
13841384
<h2 id='ua-stylesheet'>
13851385
Appendix A: Sample Style Sheet For HTML</h2>
13861386

1387-
Issue: Need to check this section for errors.
1388-
13891387
<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>
13911390

13921391
<pre>
13931392
/* Set up list items */
13941393
li {
1395-
display: list-item;
1396-
/* counter-increment: list-item; (implied by display: list-item) */
1394+
display: list-item; /* implies 'counter-increment: list-item' */
13971395
}
13981396

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 */
14001398
ol, ul {
14011399
counter-reset: list-item;
14021400
}
14031401

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); }
14171405

14181406
/* The type attribute on ol and ul elements */
1419-
ul[type="disc"] { list-style-type: disc; }
1407+
ul[type="disc"] { list-style-type: disc; }
14201408
ul[type="circle"] { list-style-type: circle; }
14211409
ul[type="square"] { list-style-type: square; }
1422-
ol[type="1"] { list-style-type: decimal; }
1410+
ol[type="1"] { list-style-type: decimal; }
14231411
ol[type="a"] { list-style-type: lower-alpha; }
14241412
ol[type="A"] { list-style-type: upper-alpha; }
14251413
ol[type="i"] { list-style-type: lower-roman; }
@@ -1433,7 +1421,6 @@ Appendix A: Sample Style Sheet For HTML</h2>
14331421
/* The value attribute on li elements */
14341422
li[value] {
14351423
counter-set: list-item attr(value integer, 1);
1436-
counter-increment: none; /* Turn off default increase */
14371424
}
14381425

14391426
/* Handling reversed lists */
@@ -1448,20 +1435,12 @@ Appendix A: Sample Style Sheet For HTML</h2>
14481435
/* Box Model Rules */
14491436
ol, ul {
14501437
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;
14601441
}
1461-
14621442
ol ol, ol ul, ul ul, ul ol {
1463-
margin-top: 0;
1464-
margin-bottom: 0;
1443+
margin-block: 0;
14651444
}
14661445

14671446
li {
@@ -1474,7 +1453,6 @@ Appendix A: Sample Style Sheet For HTML</h2>
14741453
}
14751454
</pre>
14761455

1477-
14781456
<h2 class="no-num" id="acknowledgments">
14791457
Acknowledgments</h2>
14801458

0 commit comments

Comments
 (0)