1 /**
2 * Style for horizontal lists (separator following item).
3 * @source https://www.mediawiki.org/wiki/Snippets/Horizontal_lists
4 * @revision 9 (2016-08-10)
5 * @author [[User:Edokter]]
6 */
7 .hlist dl,
8 .hlist ol,
9 .hlist ul {
10 margin: 0;
11 padding: 0;
12 }
13
14 /* Display list items inline */
15 .hlist dd,
16 .hlist dt,
17 .hlist li {
18 /* don't trust the note that says margin doesn't work with inline
19 * removing margin: 0 makes dds have margins again */
20 margin: 0;
21 display: inline;
22 }
23
24 /* Display nested lists inline */
25 /*
26 We remove .inline since it's not used here.
27 .hlist.inline,
28 .hlist.inline dl,
29 .hlist.inline ol,
30 .hlist.inline ul,
31 */
32 .hlist dl dl, .hlist dl ol, .hlist dl ul,
33 .hlist ol dl, .hlist ol ol, .hlist ol ul,
34 .hlist ul dl, .hlist ul ol, .hlist ul ul {
35 display: inline;
36 }
37
38 /* Hide empty list items */
39 .hlist .mw-empty-li,
40 .hlist .mw-empty-elt {
41 display: none;
42 }
43
44 /* Generate interpuncts */
45 .hlist dt:after {
46 content: ": ";
47 }
48
49 .hlist dd:after,
50 .hlist li:after {
51 content: " · ";
52 font-weight: bold;
53 }
54
55 .hlist dd:last-child:after,
56 .hlist dt:last-child:after,
57 .hlist li:last-child:after {
58 content: none;
59 }
60
61 /* Add parentheses around nested lists */
62 .hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before,
63 .hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before,
64 .hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before {
65 content: " (";
66 font-weight: normal;
67 }
68
69 .hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after,
70 .hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after,
71 .hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after {
72 content: ")";
73 font-weight: normal;
74 }
75
76 /* Put ordinals in front of ordered list items */
77 .hlist ol {
78 counter-reset: listitem;
79 }
80
81 .hlist ol > li {
82 counter-increment: listitem;
83 }
84
85 .hlist ol > li:before {
86 content: " " counter(listitem) "\a0";
87 }
88
89 .hlist dd ol > li:first-child:before,
90 .hlist dt ol > li:first-child:before,
91 .hlist li ol > li:first-child:before {
92 content: " (" counter(listitem) "\a0";
93 }