/* Style for horizontal lists (separator following item).
* 水平列表样式
* @source mediawiki.org/wiki/Snippets/Horizontal_lists
* @revision 9 - branch 1 (2020-08-14)
* @author [[mw:User:Edokter]] and [[User:Aunst]]
*/
.hlist dl,
.hlist ol,
.hlist ul {
margin: 0;
padding: 0;
}
/* Display list items inline
* 以内联形式显示列表项 */
.hlist dd,
.hlist dt,
.hlist li {
margin: 0;
display: inline;
}
/* Display nested lists inline
* 以内联形式显示嵌套列表 */
.hlist.inline,
.hlist.inline dl,
.hlist.inline ol,
.hlist.inline ul,
.hlist dl dl, .hlist dl ol, .hlist dl ul,
.hlist ol dl, .hlist ol ol, .hlist ol ul,
.hlist ul dl, .hlist ul ol, .hlist ul ul {
display: inline;
}
/* Hide empty list items
* 隐藏空列表项 */
.hlist .mw-empty-li,
.hlist .mw-empty-elt {
display: none;
}
/* Generate interpuncts
* 生成冒号 */
.hlist dt:after {
content: ": ";
}
.hlist dd:before,
.hlist li:before {
content: " • ";
}
.hlist dd:first-of-type:before,
.hlist dt:last-child:after,
.hlist li:first-child:before {
content: none;
}
/* Add parentheses around nested lists
* 在嵌套列表周围添加括号 */
.hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before,
.hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before,
.hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before {
content: " (";
font-weight: normal;
}
.hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after,
.hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after,
.hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after {
content: ")";
font-weight: normal;
}
/* Put ordinals in front of ordered list items
* 在有序列表项前生成序号 */
.hlist ol {
counter-reset: listitem;
}
.hlist ol > li {
counter-increment: listitem;
}
.hlist ol > li:before {
content: " " counter(listitem) "\a0";
}
.hlist dd ol > li:first-child:before,
.hlist dt ol > li:first-child:before,
.hlist li ol > li:first-child:before {
content: " (" counter(listitem) "\a0";
}
/* reset padding for Minerva Neue skin
* 重设 Minerva Neue 皮肤中列表的边距 */
body.skin-minerva .hlist.hlist-separate ul li:after {
padding: 0 0.5em;
}