@@ -226,7 +226,7 @@ <h2 class="no-num no-toc" id=contents> Table of contents</h2>
226226 < li > < a href ="#profiles "> < span class =secno > 11. </ span > Profiles</ a >
227227
228228 < li > < a href ="#html4 "> < span class =secno > 12. </ span > Sample style sheet for
229- HTML 4.0 </ a >
229+ HTML</ a >
230230
231231 < li > < a href ="#ua-stylesheet "> < span class =secno > 13. </ span > Appendix A:
232232 Required Predefined Counter Styles</ a >
@@ -2185,64 +2185,77 @@ <h2 id=profiles><span class=secno>11. </span> Profiles</h2>
21852185 < p > The Full profile contains everything.</ p >
21862186 <!-- ====================================================================== -->
21872187
2188- < h2 id =html4 > < span class =secno > 12. </ span > Sample style sheet for HTML 4.0 </ h2 >
2188+ < h2 id =html4 > < span class =secno > 12. </ span > Sample style sheet for HTML</ h2 >
21892189
2190- < p > This section is informative, nor normative.
2190+ < p > This section is informative, nor normative. HTML itself defines the
2191+ actual default properties that apply to HTML lists.
21912192
21922193 < pre >
2193- /* Set up list items */
2194- li { display: list-item; /* counter-increment: list-item; (implied by display: list-item) */ }
2195-
2196- /* Set up ol and ul so that they reset the list-item counter */
2197- ol, ul { counter-reset: list-item; }
2198-
2199- /* Default list style types for ordered lists */
2200- ol { list-style-type: decimal; }
2201-
2202- /* Default list style types for unordered lists up to 3<!-- 8 --> deep */
2203- ul { list-style-type: disc; }
2204- ul ul { list-style-type: square; }
2205- ul ul ul { list-style-type: circle; }
2206- <!-- and so on ad nauseum:
2207- ul ul ul ul { list-style-type: box; }
2208- ul ul ul ul ul { list-style-type: disc; }
2209- ul ul ul ul ul ul { list-style-type: square; }
2210- ul ul ul ul ul ul ul { list-style-type: circle; }
2211- ul ul ul ul ul ul ul ul { list-style-type: box; }
2212- -->
2213- /* The type attribute on ol and ul elements */
2214- ul[type="disc"] { list-style-type: disc; }
2215- ul[type="circle"] { list-style-type: circle; }
2216- ul[type="square"] { list-style-type: square; }
2217- ol[type="1"] { list-style-type: decimal; }
2218- ol[type="a"] { list-style-type: lower-alpha; }
2219- ol[type="A"] { list-style-type: upper-alpha; }
2220- ol[type="i"] { list-style-type: lower-roman; }
2221- ol[type="I"] { list-style-type: upper-roman; }
2222-
2223- /* The start attribute on ol elements */
2224- ol[start] { counter-reset: list-item attr(start, integer, 1); counter-increment: list-item -1; }
2225-
2226- /* The value attribute on li elements */
2227- li[value] { counter-reset: list-item attr(value, integer, 1); counter-increment: none;<!-- XXX interaction with default increase --> }
2228-
2229- /* The above rules don't fully describe HTML4 lists, since they do not cover
2230- behaviors such as margins and the like. The following rules could be used
2231- for this purpose:
2232-
2233- ol, ul { display: block; margin: 1em 0; padding-left: 2.5em; }
2234- ol ol, ol ul, ul ul, ul ol { margin-top: 0; margin-bottom: 0; }
2235- li::marker { margin-right: 1em; text-align: right; }
2236-
2237- */
2238- </ pre >
2194+ /* Set up list items */
2195+ li {
2196+ display: list-item;
2197+ /* counter-increment: list-item; (implied by display: list-item) */
2198+ }
2199+
2200+ /* Set up ol and ul so that they reset the list-item counter */
2201+ ol, ul {
2202+ counter-reset: list-item;
2203+ }
2204+
2205+ /* Default list style types for ordered lists */
2206+ ol {
2207+ list-style-type: decimal;
2208+ }
2209+
2210+ /* Default list style types for unordered lists up to 3 deep */
2211+ ul { list-style-type: disc; }
2212+ ul ul { list-style-type: square; }
2213+ ul ul ul { list-style-type: circle; }
2214+
2215+ /* The type attribute on ol and ul elements */
2216+ ul[type="disc"] { list-style-type: disc; }
2217+ ul[type="circle"] { list-style-type: circle; }
2218+ ul[type="square"] { list-style-type: square; }
2219+ ol[type="1"] { list-style-type: decimal; }
2220+ ol[type="a"] { list-style-type: lower-alpha; }
2221+ ol[type="A"] { list-style-type: upper-alpha; }
2222+ ol[type="i"] { list-style-type: lower-roman; }
2223+ ol[type="I"] { list-style-type: upper-roman; }
2224+
2225+ /* The start attribute on ol elements */
2226+ ol[start] {
2227+ counter-reset: list-item attr(start, integer, 1);
2228+ counter-increment: list-item -1;
2229+ }
22392230
2240- < p class =issue > Another example is required here.</ p >
2241- <!--
2242- <pre>
2243- h1-h6 numbering
2231+ /* The value attribute on li elements */
2232+ li[value] {
2233+ counter-reset: list-item attr(value, integer, 1);
2234+ counter-increment: none;<!-- XXX interaction with default increase -->
2235+ }
2236+
2237+ /* Box Model Rules */
2238+ ol, ul {
2239+ display: block;
2240+ margin: 1em 0;
2241+ padding-left: 2.5em;
2242+ }
2243+
2244+ ol ol, ol ul, ul ul, ul ol {
2245+ margin-top: 0;
2246+ margin-bottom: 0;
2247+ }
2248+
2249+ li {
2250+ text-align: match-parent;
2251+ }
2252+
2253+ li::marker {
2254+ margin-right: 1em;
2255+ text-align: right;
2256+ /* 'display', 'position', and 'text-align' implied by list-style-position */
2257+ }
22442258 </ pre >
2245- -->
22462259 <!-- ====================================================================== -->
22472260
22482261 < h2 id =ua-stylesheet > < span class =secno > 13. </ span > Appendix A: Required
0 commit comments