1/** 2 * DokuWiki Plugin ExtList; _numbering.less 3 * @author Satoshi Sahara <sahara.satoshi@gmail.com> 4 */ 5 6/* -------------------------------------------------------- 7 * Hierarchical ordered list 8 * modified from 9 * Nested numbered list with correct indentation 10 * https://gist.github.com/jirutka/32049196ab75547b7f47 11 * -------------------------------------------------------- 12 */ 13ol.hierarchical { 14 list-style-type: none; 15 counter-reset: item; 16 margin-left: 0; 17 padding: 0; 18 & > li { 19 display: table; 20 counter-increment: item; 21 margin-bottom: 0.6em; 22 } 23 & > li::before { 24 content: counters(item, ".") ". "; 25 display: table-cell; 26 padding-right: 0.6em; 27 } 28 //## ExtList plugin 29 & > li[data-marker]::before { 30 content: attr(data-marker); 31 color: #696969; 32 font-weight: bold; 33 } 34} 35li { 36 ol.hierarchical { 37 & > li { 38 margin: 0; 39 } 40 & > li::before { 41 content: counters(item, ".") " "; 42 } 43 //## ExtList plugin 44 & > li[data-marker]::before { 45 content: attr(data-marker); 46 color: #808080; 47 font-weight: bold; 48 } 49 } 50} 51 52/* -------------------------------------------------------- 53 * Parenthesized latin small letters: ⒜ ⒝ ⒞ 54 * -------------------------------------------------------- 55 */ 56ol.alphabet { 57 list-style-type: none; 58 & > li { 59 position: relative; 60 } 61 & > li[data-marker]::before { 62 content: attr(data-marker); 63 position: absolute; 64 top: 0; 65 left: -1.5em; 66 font-weight: bold; 67 } 68} 69 70/* -------------------------------------------------------- 71 * Parenthesized number: (1) (2) (3) 72 * -------------------------------------------------------- 73 */ 74ol.number { 75 list-style-type: none; 76 margin-left: 0; 77 padding: 0; 78 & > li { 79 display: table; 80 } 81 & > li[value]::before { 82 content: "(" attr(value) ")"; 83 display: table-cell; 84 padding-right: 0.6em; 85 color: #696969; 86 } 87} 88 89/* -------------------------------------------------------- 90 * List-style-type variation 91 * -------------------------------------------------------- 92 */ 93 94ol.Alpha { 95 list-style-type: upper-alpha; 96} 97 98ol.counter { 99 counter-reset: li; 100 & > li { 101 list-style-type: none; 102 counter-increment: li; 103 // border: 1px solid pink; 104 position: relative; 105 } 106 & > li::before { 107 display: marker; 108 content: "(" counter(li) ") "; 109 position: absolute; 110 top: 0; 111 left: -2em; 112 margin-right: .5em; 113 font-family: Consolas, monospace; 114 } 115} 116 117