“模板:Navbox”的版本间的差异

来自TeamMoeg官方WIKI
跳到导航 跳到搜索
[未复核版本][未复核版本]
第1行: 第1行:
<style>/* Navbar */
<style>.navbar{display:inline;font-size:88%;font-weight:400}.navbar ul{display:inline;white-space:nowrap}.navbar li{word-spacing:-.125em}.navbox .navbar{display:block;font-size:100%}.navbox-title .navbar{float:left;text-align:left;margin-right:.5em;width:6em}.hlist dl,.hlist ol,.hlist ul{margin:0;padding:0}.hlist dd,.hlist dt,.hlist li{margin:0;display:inline}.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}.hlist .mw-empty-li,.hlist .mw-empty-elt{display:none}.hlist dt:after{content:": "}.hlist dd:after,.hlist li:after{content:" · ";font-weight:700}.hlist dd:last-child:after,.hlist dt:last-child:after,.hlist li:last-child:after{content:none}.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:400}.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:400}.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"}.navbox{border:1px solid #aaa;box-sizing:border-box;width:100%;margin:auto;clear:both;font-size:88%;text-align:center;padding:1px}.navbox-inner,.navbox-subgroup{width:100%}.navbox + .navbox-styles + .navbox{margin-top:-1px}.navbox th,.navbox-title,.navbox-abovebelow{text-align:center;padding-left:1em;padding-right:1em}th.navbox-group{white-space:nowrap;text-align:right}.navbox,.navbox-subgroup{background:#fdfdfd}.navbox-list{border-color:#fdfdfd}.navbox th,.navbox-title{background:#eaeeff}.navbox-abovebelow,th.navbox-group,.navbox-subgroup .navbox-title{background:#ddf}.navbox-subgroup .navbox-group,.navbox-subgroup .navbox-abovebelow{background:#e6e6ff}.navbox-even{background:#f7f7f7}.navbox-odd{background:transparent}th.navbox-title1{border-left:2px solid #fdfdfd;width:100%}td.navbox-list1{text-align:left;border-left-width:2px;border-left-style:solid}.navbox .hlist td dl,.navbox .hlist td ol,.navbox .hlist td ul,.navbox td.hlist dl,.navbox td.hlist ol,.navbox td.hlist ul{padding:.125em 0}.navbox .hlist dd,.navbox .hlist dt,.navbox .hlist li{white-space:nowrap}.navbox .hlist dd dl,.navbox .hlist dt dl,.navbox .hlist li ol,.navbox .hlist li ul{white-space:normal}ol + .navbox-styles + .navbox,ul + .navbox-styles + .navbox{margin-top:.5em}</style><includeonly>{{#invoke:Navbox|navbox}}</includeonly>
/** {{Shared Template Warning}}
* This TemplateStyles page is separately used for [[Template:Navbar]]
* because of course there are two versions of the same template.
* Be careful when adjusting styles accordingly.
*/
.navbar {
display: inline;
font-size: 88%;
font-weight: normal;
}
 
.navbar ul {
display: inline;
white-space: nowrap;
}
 
.navbar li {
word-spacing: -0.125em;
}
 
/* Navbar styling when nested in navbox */
.navbox .navbar {
display: block;
font-size: 100%;
}
 
.navbox-title .navbar {
/* @noflip */
float: left;
/* @noflip */
text-align: left;
/* @noflip */
margin-right: 0.5em;
width: 6em;
}
 
/* Flatlist */
/**
* Style for horizontal lists (separator following item).
* @source https://www.mediawiki.org/wiki/Snippets/Horizontal_lists
* @revision 9 (2016-08-10)
* @author [[User:Edokter]]
*/
.hlist dl,
.hlist ol,
.hlist ul {
margin: 0;
padding: 0;
}
 
/* Display list items inline */
.hlist dd,
.hlist dt,
.hlist li {
/* don't trust the note that says margin doesn't work with inline
* removing margin: 0 makes dds have margins again */
margin: 0;
display: inline;
}
 
/* Display nested lists inline */
/*
We remove .inline since it's not used here.
.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:after,
.hlist li:after {
content: " · ";
font-weight: bold;
}
 
.hlist dd:last-child:after,
.hlist dt:last-child:after,
.hlist li:last-child:after {
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";
}
 
/* Navbox */
.navbox {
border: 1px solid #aaa;
box-sizing: border-box;
width: 100%;
margin: auto;
clear: both;
font-size: 88%;
text-align: center;
padding: 1px;
}
 
.navbox-inner,
.navbox-subgroup {
width: 100%;
}
 
.navbox + .navbox-styles + .navbox {
/* Single pixel border between adjacent navboxes */
margin-top: -1px;
}
 
.navbox th,
.navbox-title,
.navbox-abovebelow {
text-align: center;
/* Title and above/below styles */
padding-left: 1em;
padding-right: 1em;
}
 
th.navbox-group {
/* Group style */
white-space: nowrap;
/* @noflip */
text-align: right;
}
 
.navbox,
.navbox-subgroup {
background: #fdfdfd;
}
.navbox-list {
/* Must match background color */
border-color: #fdfdfd;
}
 
.navbox th,
.navbox-title {
/* Level 1 color */
background: #eaeeff;
}
 
.navbox-abovebelow,
th.navbox-group,
.navbox-subgroup .navbox-title {
/* Level 2 color */
background: #ddddff;
}
 
.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
/* Level 3 color */
background: #e6e6ff;
}
 
.navbox-even {
/* Even row striping */
background: #f7f7f7;
}
 
.navbox-odd {
/* Odd row striping */
background: transparent;
}
 
th.navbox-title1 {
border-left: 2px solid #fdfdfd;
width: 100%;
}
 
td.navbox-list1 {
text-align: left;
border-left-width: 2px;
border-left-style: solid;
}
 
.navbox .hlist td dl,
.navbox .hlist td ol,
.navbox .hlist td ul,
.navbox td.hlist dl,
.navbox td.hlist ol,
.navbox td.hlist ul {
/* Adjust hlist padding in navboxes */
padding: 0.125em 0;
}
 
.navbox .hlist dd,
.navbox .hlist dt,
.navbox .hlist li {
/* Nowrap list items in navboxes */
white-space: nowrap;
}
 
.navbox .hlist dd dl,
.navbox .hlist dt dl,
.navbox .hlist li ol,
.navbox .hlist li ul {
/* But allow parent list items to be wrapped */
white-space: normal;
}
 
ol + .navbox-styles + .navbox,
ul + .navbox-styles + .navbox {
/* Prevent lists from clinging to navboxes */
margin-top: 0.5em;
}
</style><includeonly>{{#invoke:Navbox|navbox}}</includeonly>

2022年12月6日 (二) 05:45的版本

<style>.navbar{display:inline;font-size:88%;font-weight:400}.navbar ul{display:inline;white-space:nowrap}.navbar li{word-spacing:-.125em}.navbox .navbar{display:block;font-size:100%}.navbox-title .navbar{float:left;text-align:left;margin-right:.5em;width:6em}.hlist dl,.hlist ol,.hlist ul{margin:0;padding:0}.hlist dd,.hlist dt,.hlist li{margin:0;display:inline}.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}.hlist .mw-empty-li,.hlist .mw-empty-elt{display:none}.hlist dt:after{content:": "}.hlist dd:after,.hlist li:after{content:" · ";font-weight:700}.hlist dd:last-child:after,.hlist dt:last-child:after,.hlist li:last-child:after{content:none}.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:400}.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:400}.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"}.navbox{border:1px solid #aaa;box-sizing:border-box;width:100%;margin:auto;clear:both;font-size:88%;text-align:center;padding:1px}.navbox-inner,.navbox-subgroup{width:100%}.navbox + .navbox-styles + .navbox{margin-top:-1px}.navbox th,.navbox-title,.navbox-abovebelow{text-align:center;padding-left:1em;padding-right:1em}th.navbox-group{white-space:nowrap;text-align:right}.navbox,.navbox-subgroup{background:#fdfdfd}.navbox-list{border-color:#fdfdfd}.navbox th,.navbox-title{background:#eaeeff}.navbox-abovebelow,th.navbox-group,.navbox-subgroup .navbox-title{background:#ddf}.navbox-subgroup .navbox-group,.navbox-subgroup .navbox-abovebelow{background:#e6e6ff}.navbox-even{background:#f7f7f7}.navbox-odd{background:transparent}th.navbox-title1{border-left:2px solid #fdfdfd;width:100%}td.navbox-list1{text-align:left;border-left-width:2px;border-left-style:solid}.navbox .hlist td dl,.navbox .hlist td ol,.navbox .hlist td ul,.navbox td.hlist dl,.navbox td.hlist ol,.navbox td.hlist ul{padding:.125em 0}.navbox .hlist dd,.navbox .hlist dt,.navbox .hlist li{white-space:nowrap}.navbox .hlist dd dl,.navbox .hlist dt dl,.navbox .hlist li ol,.navbox .hlist li ul{white-space:normal}ol + .navbox-styles + .navbox,ul + .navbox-styles + .navbox{margin-top:.5em}</style>