模板:Flatlist/styles.css:修订间差异
来自RIA | Wiki
更多操作
建立内容为“/* Style for horizontal lists (separator following item). 水平列表样式 @source mediawiki.org/wiki/Snippets/Horizontal_lists @revision 9 - branch 1…”的新页面 |
4 -> 2 |
||
| 第8行: | 第8行: | ||
.hlist ol, | .hlist ol, | ||
.hlist ul { | .hlist ul { | ||
margin: 0; | |||
padding: 0; | |||
} | } | ||
/* Display list items inline | /* Display list items inline | ||
| 第16行: | 第16行: | ||
.hlist dt, | .hlist dt, | ||
.hlist li { | .hlist li { | ||
margin: 0; | |||
display: inline; | |||
} | } | ||
/* Display nested lists inline | /* Display nested lists inline | ||
| 第28行: | 第28行: | ||
.hlist ol dl, .hlist ol ol, .hlist ol ul, | .hlist ol dl, .hlist ol ol, .hlist ol ul, | ||
.hlist ul dl, .hlist ul ol, .hlist ul ul { | .hlist ul dl, .hlist ul ol, .hlist ul ul { | ||
display: inline; | |||
} | } | ||
/* Hide empty list items | /* Hide empty list items | ||
| 第34行: | 第34行: | ||
.hlist .mw-empty-li, | .hlist .mw-empty-li, | ||
.hlist .mw-empty-elt { | .hlist .mw-empty-elt { | ||
display: none; | |||
} | } | ||
/* Generate interpuncts | /* Generate interpuncts | ||
生成冒号 */ | 生成冒号 */ | ||
.hlist dt:after { | .hlist dt:after { | ||
content: ": "; | |||
} | } | ||
.hlist dd:before, | .hlist dd:before, | ||
.hlist li:before { | .hlist li:before { | ||
content: " • "; | |||
/* font-weight: bold; */ | |||
} | } | ||
.hlist dd:first-of-type:before, | .hlist dd:first-of-type:before, | ||
.hlist dt:last-child:after, | .hlist dt:last-child:after, | ||
.hlist li:first-child:before { | .hlist li:first-child:before { | ||
content: none; | |||
} | } | ||
/* Add parentheses around nested lists | /* Add parentheses around nested lists | ||
| 第56行: | 第56行: | ||
.hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt 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 { | .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 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 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 { | .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 | /* Put ordinals in front of ordered list items | ||
在有序列表项前生成序号 */ | 在有序列表项前生成序号 */ | ||
.hlist ol { | .hlist ol { | ||
counter-reset: listitem; | |||
} | } | ||
.hlist ol > li { | .hlist ol > li { | ||
counter-increment: listitem; | |||
} | } | ||
.hlist ol > li:before { | .hlist ol > li:before { | ||
content: " " counter(listitem) "\a0"; | |||
} | } | ||
.hlist dd ol > li:first-child:before, | .hlist dd ol > li:first-child:before, | ||
.hlist dt ol > li:first-child:before, | .hlist dt ol > li:first-child:before, | ||
.hlist li ol > li:first-child:before { | .hlist li ol > li:first-child:before { | ||
content: " (" counter(listitem) "\a0"; | |||
} | } | ||
/* reset padding for Minerva skin */ | /* reset padding for Minerva skin */ | ||
body.skin-minerva .hlist.hlist-separate ul li:after { | body.skin-minerva .hlist.hlist-separate ul li:after { | ||
padding: 0 0.5em; | |||
} | } | ||
2021年3月6日 (六) 11:28的版本
/* 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: " • ";
/* font-weight: bold; */
}
.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 skin */
body.skin-minerva .hlist.hlist-separate ul li:after {
padding: 0 0.5em;
}