MediaWiki:Common.css

出自微國家百科

注意:在您發布之後,您可能需要清除瀏覽器快取才能看到變更。

  • Firefox或Safari:按住Shift時點擊重新整理,或按Ctrl-F5Ctrl-R(Mac則為⌘-R
  • Google Chrome:Ctrl-Shift-R(Mac則為⌘-Shift-R
  • Internet Explorer或Edge:按住Ctrl時點擊重新整理,或按Ctrl-F5
  • Opera:Ctrl-F5
/* 此 CSS 會套用至所有的介面外觀 */

/* 首頁 */
div.mainpageNavbox > ul{
	display: flex;
}
body.page-首頁.action-view h1.firstHeading, body.page-首頁.action-submit h1.firstHeading { display: none; }

div.mainpageNavbox > ul > li{
	display: flex;
}

/* 介面 */
#ca-talk, #pt-mytalk { display: none!important; }
.ns-2 #ca-talk { display: block!important; }
#ca-viewsource { display: none!important; }
.mw-diff-edit { display: none!important; }
li#t-urlshortener { display: none!important; }
a.mw-jump-link { display: none; }

/* Cookies Warning */
div.mw-cookiewarning-text a { color:#FFF!important; }

/* WikiEditor */
.skin-darkvector .wikiEditor-ui a.oo-ui-buttonElement-button { background-color: inherit !important; }

/* 搜尋 */
.mw-advancedSearch-namespace-6, .mw-advancedSearch-namespace-7 { display: none; }

/* 標誌 */
.mw-wiki-logo {
    background-image: url()
}

.skin-darkvector .mw-wiki-logo {
    background-image: url()
}

@media (-webkit-min-device-pixel-ratio:2), (min--moz-device-pixel-ratio:2), (min-resolution:2dppx), (min-resolution:192dpi) {
    .mw-wiki-logo {
        background-image: url();
        background-size: 135px auto
    }
    .skin-darkvector .mw-wiki-logo {
        background-image: url();
        background-size: 135px auto
    }
}

/* 主條目(模板:More/Main/Further) */
div.hatnote, div.rellink.further { padding-left: 2em; margin-bottom: 0.8em; margin-top: 0.8em; font-size: small; font-style: italic;}

/* 模板文檔 */
div.template-documentation { clear: both; margin: 1em 0 0 0; border: 1px solid #a2a9b1; background-color: #ecfcf4; padding: 1em;}

/* 法律內文列表格式 */
span.legalTitle { font-size: 1.5em; font-weight: normal; line-height: 1.3; margin: 1em 0 0.25em 0; padding: 0; border-bottom: 1px solid #a2a9b1; font-family: 'Linux Libertine', 'Georgia', 'Times', serif; display: block; }
span.legalSubtitle { font-size: 1.2em; font-weight: bold; line-height: 1.6; display: block; margin: 0.3em 0 0; padding: 0.5em 0 0; }
ol.legal > li > ol { counter-reset: subsection; font-size: inherit; }
ol.legal > li > ol > li { list-style: none; position: relative; font-size: inherit; }
ol.legal > li > ol > li:before { counter-increment: subsection; content: "(" counter(subsection) ") "; left: -2em; font-size: inherit; }
ol.legal > li > ol > li > ol { counter-reset: subsubsection; font-size: inherit; }
ol.legal > li > ol > li > ol > li { list-style: none; position: relative; font-size: inherit; }
ol.legal > li > ol > li > ol > li:before { counter-increment: subsubsection; content: "(" counter(subsubsection, lower-roman) ") "; left: -2em; font-size: inherit; }

/* 條目顯示 */
.skin-vector .mw-body-content, .skin-darkvector .mw-body-content{ font-size: 1em; }

/* Navbox */
table.navbox th {
	position: relative;
	text-align: center;
}

table.navbox th span.navbox-bar {
	position: absolute;
    left: 5px;
    top: 50%;
    -webkit-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
            transform: translateY(-50%);
    font-size: 85%;
    font-weight: normal;
}

table.mw-collapsible.navbox th span.mw-collapsible-toggle {
	position: absolute;
    right: 5px;
    top: 50%;
    -webkit-transform: translateY(-50%);
        -ms-transform: translateY(-50%);
            transform: translateY(-50%);
}

table.mw-collapsible.navbox tr:not(:first-child) td {
	font-size: 85%;
	padding: 0 10px;
}

table.lineGraph td {
	padding: 0!important;
}

table.mw-collapsible.navbox tr:not(:first-child) td:first-child {
	text-align: center;
	width: 7.5%;
}

table.navbox ul:not(.normal) {
	margin: 0;
	display: inline;
	padding: 0;
}

table.navbox ul:not(.normal) ul:not(.normal):before {
	content:"(";
}

table.navbox ul:not(.normal) ul:not(.normal):after {
	content:")";
}

table.navbox ul:not(.normal) li {
	display: inline-block;
	margin: 0;
}

table.navbox ul:not(.normal) li:not(:last-child):after {
	content:" ·";
	font-weight:bold;
}

.skin-darkvector table.navbox { border: 1px solid #a2a9b1; }
table.navbox { border: 1px solid #024A64; }

/* 資訊板 */
table.infobox {
    border:1px solid #a2a9b1;
    margin-bottom:0.5em;
    margin-left:1em;
    padding:0.2em;
    float:right;
    clear:right;
}

.skin-vector table.infobox {
    background-color:#f8f9fa;
}

/* 警告提示 */
.rellink {
    padding-left:1.6em;
    margin-bottom:0.5em;
}
table.ambox {
    margin:0px 10%;
    border:1px solid #a2a9b1;
    border-left:10px solid #36c;
}
.skin-vector table.ambox { background:#f8f9fa; }
table.mbox-small-left {
    margin:4px 1em 4px 0;
    width:238px;
    border-collapse:collapse;
    font-size:88%;
    line-height:1.25em;
}
td.mbox-image {
    border:none;
    padding:2px 0 2px 0.9em;
    text-align:center;
}
.ambox td.mbox-image {
    padding:2px 0 2px 0.5em;
}
th.mbox-text, td.mbox-text {
    border:none;
    padding:0.25em 0.9em;
    width:100%;
}
.ambox th.mbox-text, .ambox td.mbox-text {
    padding:0.25em 0.5em;
}
table.ambox-content {
    border-left:10px solid #f28500;
}

/* 檔案摘要 */
table.fileinfotpl-type-information { background:unset; }
.skin-darkvector table.fileinfotpl-type-information td.fileinfo-paramfield { color: #222; }

/* NavBar */
.navbar > ul { display: inline; margin: 0; }
.navbar > ul > li { display: inline; }
.navbar > ul > li:not(:last-child):after { content: " · "; font-weight: bold; }

/* Template:plainlist */
div.plainlist ul, div.plainlist ol { list-style: none; }

/* NoArticleText */
div.hint-row{
	display: inline-table;
	margin-top: 0.5em;
}
div.hint-icon-cell{
	display: table-cell;
	width: 100px;
	text-align: center;
	padding: 0 20px 0 0;
	vertical-align: middle;
}
div.hint-caption-text{
	display: inline-table;
	text-align: justify;
	vertical-align: middle;
}
div.hint-caption-table > div{
	display: table-row;
}
div.hint-caption-text p{
	margin: 0.25em 0 0 0;
}
div.hint-caption-text p:first-of-type{
	margin-top: 0.5em;
}

/* Responsive Button */
div.ResponsiveBtn{
	display: inline-block;
	padding: 8px 16px;
	margin: 5px 10px;
	background: #3366CC;
	font-size: 105%;
	border-radius: 5px;
}
div.ResponsiveBtn, div.ResponsiveBtn a{
	color: #FFF!important;
}
div.plainlinks{
	display: inline-block;
}
div.ResponsiveBtn:hover{
	background: #447FF5;
}

/* mbox */
.tmbox.mbox-small {
	min-width: 0;                /* reset the min-width of tmbox above        */
}
.mediawiki .mbox-inside .tmbox { /* For tmboxes inside other templates. The "mediawiki" class ensures that */
	margin: 2px 0;               /* this declaration overrides other styles (including mbox-small above)   */
	width: 100%;                 /* For Safari and Opera */
}
.mbox-inside .tmbox.mbox-small { /* "small" tmboxes should not be small when  */
	line-height: 1.5em;          /* also "nested", so reset styles that are   */
	font-size: 100%;             /* set in "mbox-small" above.                */
}

/* These mbox-small classes must be placed after all other
   ambox/tmbox/ombox etc classes. "html body.mediawiki" is so
   they override "table.ambox + table.ambox" above. */
html body.mediawiki .mbox-small {   /* For the "small=yes" option. */
	/* @noflip */
	clear: right;
	/* @noflip */
	float: right;
	/* @noflip */
	margin: 4px 0 4px 1em;
	box-sizing: border-box;
	width: 238px;
	font-size: 88%;
	line-height: 1.25em;
}

/* Other pages message box styles */
table.ombox {
	margin: 4px 10%;
	border-collapse: collapse;
	border: 1px solid #a2a9b1;    /* Default "notice" gray */
	background-color: #f8f9fa;
	box-sizing: border-box;
}

table.ombox-notice {
	border: 1px solid #a2a9b1;    /* Gray */
}
table.ombox-speedy {
	border: 2px solid #b32424;    /* Red */
	background-color: #fee7e6;    /* Pink */
}
table.ombox-delete {
	border: 2px solid #b32424;    /* Red */
}
table.ombox-content {
	border: 1px solid #f28500;    /* Orange */
}
table.ombox-style {
	border: 1px solid #fc3;       /* Yellow */
}
table.ombox-move {
	border: 1px solid #9932cc;    /* Purple */
}
table.ombox-protection {
	border: 2px solid #a2a9b1;    /* Gray-gold */
}

/* Namespace backgrounds */
.ns-828 #content { background: #cce6ff; }
.ns-828 #ca-nstab-module.selected, .ns-828 #ca-view.selected, .ns-828 #ca-edit.selected, .ns-828 #ca-history.selected, .ns-828 #ca-watch.selected { background: #cce6ff; background: linear-gradient(white, #cce6ff); }
.ns-28 #content { background: #ffffe6; }
.ns-28 #ca-nstab-官方文件.selected, .ns-28 #ca-view.selected, .ns-28 #ca-edit.selected, .ns-28 #ca-history.selected, .ns-28 #ca-watch.selected { background: #ffffe6; background: linear-gradient(white, #ffffe6); }
.ns-14 #content { background: #ffddcc; }
.ns-14 #ca-nstab-category.selected, .ns-14 #ca-view.selected, .ns-14 #ca-edit.selected, .ns-14 #ca-history.selected, .ns-14 #ca-watch.selected { background: #ffddcc; background: linear-gradient(white, #ffddcc); }
.ns-10 #content { background: #f3e6ff; }
.ns-10 #ca-nstab-template.selected, .ns-10 #ca-view.selected, .ns-10 #ca-edit.selected, .ns-10 #ca-history.selected, .ns-10 #ca-watch.selected { background: #f3e6ff; background: linear-gradient(white, #f3e6ff); }
.ns-8 #content, .ns-4 #content { background: #ffe6ee; }
.ns-8 #ca-nstab-mediawiki.selected, .ns-8 #ca-view.selected, .ns-8 #ca-edit.selected, .ns-8 #ca-history.selected, .ns-8 #ca-watch.selected,
.ns-4 #ca-nstab-project.selected, .ns-4 #ca-view.selected, .ns-4 #ca-edit.selected, .ns-4 #ca-history.selected, .ns-4 #ca-watch.selected { background: #ffe6ee; background: linear-gradient(white, #ffe6ee); }

/* CodeMirror Customised for Dark Mode */
.skin-darkvector div.CodeMirror-scroll { background-color: #4c4c4c; }

/* RottenLinks Table */
.mw-special-RottenLinks table.mw-datatable { width: 100%; word-wrap: break-word; table-layout: fixed; }
.mw-special-RottenLinks table.mw-datatable thead th:nth-child(2), .mw-special-RottenLinks table.mw-datatable thead th:nth-child(3) {
	width: 100px;

/* Tabs */
/*源自萌娘百科 https://zh.moegirl.org.cn/MediaWiki:Gadget-site-styles.css */
.tab .TabLabelText {
    padding: 1px;
    background: #fff;
    cursor: pointer;
    flex: none;
}
 
.tab .TabLabel {
    z-index: 2;
    position: relative;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    -o-user-select: none;
    user-select: none;
    display: flex;
    flex-wrap: wrap;
}
 
.tab .TabLabelText.selected {
    padding: 1px;
    background: white;
}
 
.tab .TabContent {
    background: white;
    padding: 20px 30px;
    position: relative;
    z-index: 1;
    border: 1px solid #aaa;
}
 
.tab .TabContentText {
    display: none;
}
 
.tab .TabContentText.selected {
    display: block;
}
 
.tab .tabLabelTop .TabLabelText {
    border-top: 3px solid transparent;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
}
 
.tab .tabLabelTop .TabLabelText.selected {
    border-top: 3px solid green;
    border-left: 1px solid #aaa;
    border-right: 1px solid #aaa;
}
 
.tab .tabLabelTop.reverse .TabLabelText {
    border-bottom: 3px solid transparent;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    border-top: 1px solid transparent;
}
 
.tab .tabLabelTop.reverse .TabLabelText.selected {
    border-bottom: 3px solid green;
    border-left: 1px solid #aaa;
    border-right: 1px solid #aaa;
    border-top: 1px solid transparent;
}
 
.tab .tabLabelBottom .TabLabelText {
    border-bottom: 3px solid transparent;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
}
 
.tab .tabLabelBottom .TabLabelText.selected {
    border-bottom: 3px solid green;
    border-left: 1px solid #aaa;
    border-right: 1px solid #aaa;
}
 
.tab .tabLabelBottom.reverse .TabLabelText {
    border-top: 3px solid transparent;
    border-left: 1px solid transparent;
    border-right: 1px solid transparent;
    border-bottom: 1px solid transparent;
}
 
.tab .tabLabelBottom.reverse .TabLabelText.selected {
    border-top: 3px solid green;
    border-left: 1px solid #aaa;
    border-right: 1px solid #aaa;
    border-bottom: 1px solid transparent;
}
 
.tab .tabLabelLeft .TabLabelText {
    border-left: 3px solid transparent;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
}
 
.tab .tabLabelLeft .TabLabelText.selected {
    border-left: 3px solid green;
    border-top: 1px solid #aaa;
    border-bottom: 1px solid #aaa;
}
 
.tab .tabLabelLeft.reverse .TabLabelText {
    border-right: 3px solid transparent;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    border-left: 1px solid transparent;
}
 
.tab .tabLabelLeft.reverse .TabLabelText.selected {
    border-right: 3px solid green;
    border-top: 1px solid #aaa;
    border-bottom: 1px solid #aaa;
    border-left: 1px solid transparent;
}
 
.tab .tabLabelRight .TabLabelText {
    border-right: 3px solid transparent;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
}
 
.tab .tabLabelRight .TabLabelText.selected {
    border-right: 3px solid green;
    border-top: 1px solid #aaa;
    border-bottom: 1px solid #aaa;
}
 
.tab .tabLabelRight.reverse .TabLabelText {
    border-left: 3px solid transparent;
    border-top: 1px solid transparent;
    border-bottom: 1px solid transparent;
    border-right: 1px solid transparent;
}
 
.tab .tabLabelRight.reverse .TabLabelText.selected {
    border-left: 3px solid green;
    border-top: 1px solid #aaa;
    border-bottom: 1px solid #aaa;
    border-right: 1px solid transparent;
}
 
.tab .Tabs .TabDivider {
    width: 100%;
    order: 2;
}
 
.tab .Tabs.reverse .TabDivider {
    height: 2px;
}
 
.tab .Tabs.tabLabelLeft .TabLabel,
.tab .Tabs.tabLabelRight .TabContent {
    order: 1;
}
 
.tab .Tabs.tabLabelLeft .TabContent,
.tab .Tabs.tabLabelRight .TabLabel {
    order: 3;
}
 
.tab .Tabs.tabLabelLeft,
.tab .Tabs.tabLabelRight {
    display: flex;
    flex-wrap: nowrap;
    width: auto;
}
 
.tab .Tabs.tabLabelLeft .TabDivider,
.tab .Tabs.tabLabelRight .TabDivider {
    height: 100%;
    width: 0;
}
 
.tab .Tabs.tabLabelLeft.reverse .TabDivider,
.tab .Tabs.tabLabelRight.reverse .TabDivider {
    width: 1px;
}
 
.tab .Tabs.tabLabelLeft .TabLabel,
.tab .Tabs.tabLabelRight .TabLabel {
    flex-direction: column;
}
 
.tab .Tabs.tabLabelLeft:not(.AutoWidth) .TabContent,
.tab .Tabs.tabLabelRight:not(.AutoWidth) .TabContent{
    flex: 1;
}
 
.Tabs {
    max-width: 100%;
}
 
.Tabs.AutoWidth {
    width: max-content;
    display: flow-root;
}
 
.Tabs.FloatLeft {
    float: left;
    margin-right: 1em;
}
 
.Tabs.FloatRight {
    float: right;
    margin-left: 1em;
}
 
.Tabs .Tab {
    border-bottom: 1px solid #aaa;
}
 
.Tabs .Tab:first-child {
    border-top: 1px solid #aaa;
}
 
.Tabs .Tab .TabLabelText {
    padding: 7px;
}
 
.Tabs .Tab .TabContentText {
    padding: 3px;
}
 
.infotemplatebox>table td>.Tabs .TabLabel,
.infotemplatebox>table td>.Tabs .TabContent {
    margin: 0 -1px;
}

/* 'show'/'hide' buttons created dynamically by the CollapsibleTables javascript
   in [[MediaWiki:Common.js]] are styled here so they can be customised. */
.collapseButton {       
    /* @noflip */
    float: right;
    font-weight: normal;
    /* @noflip */
    margin-left: 0.5em;
    /* @noflip */
    text-align: right;
    width: auto;
}

/* custom edits */
/* Default style for navigation boxes */
.navbox {                     /* Navbox container style */
    border: 1px solid #a2a9b1;
    width: 100%; 
    margin: auto;
    clear: both;
    font-size: 88%;
    text-align: center;
    padding: 1px;
}
.navbox-inner,
.navbox-subgroup {
    width: 100%;
}
.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;      /* Background color */
}
.navbox-list {
    border-color: #fdfdfd;    /* Must match background color */
}
.navbox th,
.navbox-title {
     background:#ccf;      /* Level 1 color */
     position: relative;
}
.navbox-abovebelow,
th.navbox-group,
.navbox-subgroup .navbox-title {
    background: #ddddff;      /* Level 2 color */
}
.navbox-subgroup .navbox-group,
.navbox-subgroup .navbox-abovebelow {
    background: #e6e6ff;      /* Level 3 color */
}
.navbox-even {
    background: #f7f7f7;      /* Even row striping */
}
.navbox-odd {
    background: transparent;  /* Odd row striping */
}
table.navbox + table.navbox {  /* Single pixel border between adjacent navboxes */
    margin-top: -1px;          /* (doesn't work for IE6, but that's okay)       */
}
.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: 0.125em 0;       /* Adjust hlist padding in navboxes */
}
.navbox .hlist dd,
.navbox .hlist dt,
.navbox .hlist li {
    white-space: nowrap;      /* Nowrap list items in navboxes */
}
.navbox .hlist dd dl,
.navbox .hlist dt dl,
.navbox .hlist li ol,
.navbox .hlist li ul {
    white-space: normal;      /* But allow parent list items to be wrapped */
}
ol + table.navbox,
ul + table.navbox {
    margin-top: 0.5em;        /* Prevent lists from clinging to navboxes */
}

/* Style for horizontal lists (separator following item) */

.hlist dl,
.hlist ol,
.hlist ul {
    margin: 0;
}
.hlist dd,
.hlist dt,
.hlist li {
    display: inline;
    margin: 0;
}
/* 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;
}
/* 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 parens around nested lists */
.hlist dl dl:before,
.hlist ol ol:before,
.hlist ul ul:before {
    content: "(";
}
.hlist dl dl:after,
.hlist ol ol:after,
.hlist ul ul:after {
    content: ")";
}
/* Put numbers in ordered lists */
.hlist.hnum ol li {
    counter-increment: level1;
}
.hlist.hnum ol li:before {
    content: counter(level1) " ";
}
.hlist.hnum ol ol li {
    counter-increment: level2;
}
.hlist.hnum ol ol li:before {
    content: counter(level2) " ";
}

/* Unbulleted lists */
.plainlist ul {
    line-height: inherit;
    list-style: none none;
    margin: 0;
}
.plainlist ul li {
    margin-bottom: 0;
}

.same-bg { background: none }

/* Styling for jQuery makeCollapsible, matching that of collapseButton */
.mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) {
	font-weight: normal;
	/* @noflip */
	text-align: right;
	padding-right: 0.2em;
	padding-left: 0.2em;
}

.mw-collapsible-leftside-toggle .mw-collapsible-toggle {
	/* @noflip */
	float: left;
	/* @noflip */
	text-align: left;
}

body.skin-minerva .infobox table {
	display: table;
}
body.skin-minerva .infobox caption {
	display: table-caption;
}