add numeration styles for ordered lists
authorDan Allen <dan@opendevise.com>
Fri, 9 Feb 2018 23:48:43 +0000 (16:48 -0700)
committerDan Allen <dan@opendevise.com>
Sat, 10 Feb 2018 03:00:30 +0000 (20:00 -0700)
src/css/doc.css

index 96599f5..a62b937 100644 (file)
 }
 
 .doc ol > li::before {
-  /* use counter(ordered-list, lower-alpha) to make letters */
-  content: "." counter(ordered-list);
   font-weight: 500;
   display: inline-block;
   width: 1em;
   direction: rtl;
-  margin: 0 0.5em 0 -1.5em;
+  /* NOTE the browser using -1.25em as left offset */
+  margin: -1.25px 0.5em 0 -1.5em;
   text-align: right;
   position: absolute;
 }
 
+.doc ol.arabic > li::before {
+  content: "." counter(ordered-list);
+}
+
+/* NOTE decimal-leading-zero not yet supported; @counter-style not supported in Chrome */
+
+.doc ol.loweralpha > li::before {
+  content: "." counter(ordered-list, lower-alpha);
+}
+
+.doc ol.lowergreek > li::before {
+  content: "." counter(ordered-list, lower-greek);
+}
+
+.doc ol.lowerroman > li::before {
+  content: "." counter(ordered-list, lower-roman);
+}
+
+.doc ol.upperalpha > li::before {
+  content: "." counter(ordered-list, upper-alpha);
+}
+
+.doc ol.upperroman > li::before {
+  content: "." counter(ordered-list, upper-roman);
+}
+
 .doc ul.checklist {
   padding-left: 0.5rem;
   list-style: none;