MediaWiki:Common.css: Difference between revisions
Appearance
Tag: Undo |
No edit summary |
||
| Line 3: | Line 3: | ||
* Styling inside .mw-parser-output should generally use TemplateStyles. | * Styling inside .mw-parser-output should generally use TemplateStyles. | ||
*/ | */ | ||
/* Reset italic styling set by user agent */ | /* Reset italic styling set by user agent */ | ||
cite, | cite, | ||
dfn { | dfn { | ||
font-style: inherit; | |||
} | } | ||
/* Straight quote marks for <q> */ | /* Straight quote marks for <q> */ | ||
q { | q { | ||
quotes: '"' '"' "'" "'"; | |||
} | } | ||
/* Avoid collision of blockquote with floating elements by swapping margin and padding */ | /* Avoid collision of blockquote with floating elements by swapping margin and padding */ | ||
blockquote { | blockquote { | ||
overflow: hidden; | |||
margin: 1em 0; | |||
padding: 0 40px; | |||
} | } | ||
/* Consistent size for <small>, <sub> and <sup> */ | /* Consistent size for <small>, <sub> and <sup> */ | ||
small { | small { | ||
font-size: 85%; | |||
} | } | ||
.mw-body-content sub, | .mw-body-content sub, | ||
.mw-body-content sup { | .mw-body-content sup { | ||
font-size: 80%; | |||
} | } | ||
/* Same spacing for indented and unindented paragraphs on talk pages */ | /* Same spacing for indented and unindented paragraphs on talk pages */ | ||
.ns-talk .mw-body-content dd { | .ns-talk .mw-body-content dd { | ||
margin-top: 0.4em; | |||
margin-bottom: 0.4em; | |||
} | } | ||
/* | /* [Collapse/outercollapse rules abbreviated for brevity – keep your originals here] */ | ||
/* Hide charinsert base for those not using the gadget */ | /* Hide charinsert base for those not using the gadget */ | ||
#editpage-specialchars { | #editpage-specialchars { | ||
display: none; | |||
} | } | ||
/* Different margin on references */ | /* Different margin on references */ | ||
.references { | .references { | ||
margin-bottom: 0.5em; | |||
} | } | ||
/* Cite customizations */ | /* Cite customizations */ | ||
span[ rel="mw:referencedBy" ] { | span[ rel="mw:referencedBy" ] { | ||
counter-reset: mw-ref-linkback 0; | |||
} | } | ||
span[ rel="mw:referencedBy" ] > a::before { | |||
span[ rel= | content: counter( mw-ref-linkback, lower-alpha ); | ||
font-size: 80%; | |||
font-weight: bold; | |||
font-style: italic; | |||
} | } | ||
a[ rel="mw:referencedBy" ]::before { | a[ rel="mw:referencedBy" ]::before { | ||
font-weight: bold; | |||
content: "^"; | |||
} | } | ||
span[ rel="mw:referencedBy" ]::before { | span[ rel="mw:referencedBy" ]::before { | ||
content: "^ "; | |||
} | } | ||
/* | /* jQuery makeCollapsible styling */ | ||
.mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) { | .mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) { | ||
font-weight: normal; | |||
padding: 0 0.2em; | |||
} | } | ||
.mw-collapsible-leftside-toggle .mw-collapsible-toggle { | .mw-collapsible-leftside-toggle .mw-collapsible-toggle { | ||
float: left; | |||
} | } | ||
| Line 97: | Line 81: | ||
.wikitable td ol, | .wikitable td ol, | ||
.wikitable td dl { | .wikitable td dl { | ||
text-align: left; | |||
} | } | ||
/* Change | /* Change external link icon to PDF icon for PDF files */ | ||
.mw-parser-output a[href$=".pdf"].external, | .mw-parser-output a[href$=".pdf"].external, | ||
.mw-parser-output a[href*=".pdf?"].external, | .mw-parser-output a[href*=".pdf?"].external, | ||
| Line 108: | Line 91: | ||
.mw-parser-output a[href*=".PDF?"].external, | .mw-parser-output a[href*=".PDF?"].external, | ||
.mw-parser-output a[href*=".PDF#"].external { | .mw-parser-output a[href*=".PDF#"].external { | ||
background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right; | |||
padding: 8px 18px 8px 0; | |||
} | } | ||
/* System messages styled | /* System messages styled like fmbox */ | ||
.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt, | .mw-warning-with-logexcerpt.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt, | ||
div.mw-lag-warn-high, | div.mw-lag-warn-high, | ||
div.mw-cascadeprotectedwarning, | div.mw-cascadeprotectedwarning, | ||
div#mw-protect-cascadeon { | div#mw-protect-cascadeon { | ||
clear: both; | |||
margin: 0.2em 0; | |||
border: 1px solid #bb7070; | |||
background-color: var(--background-color-error-subtle, #ffdbdb); | |||
padding: 0.25em 0.9em; | |||
box-sizing: border-box; | |||
} | } | ||
/* | /* Partial block message colors */ | ||
.mw-contributions-blocked-notice-partial .mw-warning-with-logexcerpt.mw-warning-with-logexcerpt { | .mw-contributions-blocked-notice-partial .mw-warning-with-logexcerpt.mw-warning-with-logexcerpt { | ||
border-color: #fc3; | |||
background-color: var(--background-color-warning-subtle, #fef6e7); | |||
} | } | ||
/* Minimum thumb width */ | /* Minimum thumb width for thumbnails and frames */ | ||
@media (min-width: 640px) { | @media (min-width: 640px) { | ||
figure[typeof~='mw:File/Thumb'], | |||
figure[typeof~='mw:File/Frame'], | |||
.thumbinner { | |||
min-width: 100px; | |||
} | |||
} | } | ||
/* Prevent | /* Prevent float overlap on category lists etc. */ | ||
#mw-subcategories, | #mw-subcategories, | ||
#mw-pages, | #mw-pages, | ||
| Line 154: | Line 130: | ||
#wikiPreview, | #wikiPreview, | ||
#wikiDiff { | #wikiDiff { | ||
clear: both; | |||
} | } | ||
/* | /* Permission-based visibility toggles */ | ||
.checkuser-show, | .checkuser-show, | ||
.sysop-show, | .sysop-show, | ||
| Line 172: | Line 144: | ||
.autoconfirmed-show, | .autoconfirmed-show, | ||
.user-show { | .user-show { | ||
display: none; | |||
} | } | ||
/* Hide | /* Hide editnotice redlinks and images */ | ||
.ve-ui-mwNoticesPopupTool-item .editnotice-redlink, | .ve-ui-mwNoticesPopupTool-item .editnotice-redlink, | ||
.ve-ui-mwNoticesPopupTool-item .mbox-image, | .ve-ui-mwNoticesPopupTool-item .mbox-image, | ||
.ve-ui-mwNoticesPopupTool-item .mbox-imageright { | .ve-ui-mwNoticesPopupTool-item .mbox-imageright { | ||
display: none !important; | |||
} | } | ||
/* Remove bullets | /* Remove bullets on multiple warnings */ | ||
ul.permissions-errors { | ul.permissions-errors { | ||
margin: 0; | |||
} | } | ||
ul.permissions-errors > li { | ul.permissions-errors > li { | ||
list-style: none; | |||
} | } | ||
/* | /* Inline math font size adjustments */ | ||
span.mwe-math-mathml-inline { | span.mwe-math-mathml-inline { | ||
font-size: 118%; | |||
} | } | ||
/* | /* Block math alignment */ | ||
.mwe-math-fallback-image-display, | .mwe-math-fallback-image-display, | ||
.mwe-math-mathml-display { | .mwe-math-mathml-display { | ||
margin-left: 1.6em !important; | |||
margin-top: 0.6em; | |||
margin-bottom: 0.6em; | |||
} | } | ||
.mwe-math-mathml-display math { | .mwe-math-mathml-display math { | ||
display: inline; | |||
} | } | ||
@media screen { | @media screen { | ||
/* Checker background for transparent gallery thumbs */ | |||
body:not(.ns-0):not(.ns-2):not(.ns-100) .gallerybox .thumb img { | |||
background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png) repeat; | |||
} | |||
#siteSub { | |||
display: block; | |||
} | |||
.references { | |||
font-size: 90%; | |||
} | |||
} | |||
} | } | ||
/* | /* | ||
* | * ======================================================================== | ||
* | * Consolidated Infobox styling (light mode) | ||
* | * ======================================================================== | ||
*/ | */ | ||
table.infobox { | |||
.infobox { | background-color: #f8f9fa; | ||
border: 1px solid #a2a9b1; | |||
font-size: 88%; | |||
line-height: 1.5em; | |||
margin: 0.5em 0 0.5em 1em; | |||
float: right; | |||
clear: right; | |||
width: 22em; | |||
border-spacing: 3px; | |||
padding: 0.2em; | |||
} | } | ||
@media | /* Responsive full-width on narrow screens */ | ||
@media (max-width: 640px) { | |||
table.infobox { | |||
width: 100%; | |||
float: none; | |||
clear: none; | |||
margin: 0.5em 0; | |||
} | |||
table.infobox .nowrap { | |||
white-space: normal; | |||
} | } | ||
} | } | ||
.infobox-title { | |||
font-weight: bold; | |||
text-align: center; | |||
padding: 0.4em; | |||
background-color: #e2e3e5; | |||
color: #212529; | |||
border-bottom: 1px solid #a2a9b1; | |||
} | } | ||
.infobox-image { | |||
text-align: center; | |||
padding: 0.5em; | |||
background: none; | |||
} | } | ||
.infobox-caption { | |||
font-size: 85%; | |||
color: #555; | |||
padding: 0.2em 0; | |||
} | } | ||
.infobox-header | .infobox-header { | ||
background-color: #003b6f !important; | |||
color: #ffffff !important; | |||
padding: 0.4em 0.6em; | |||
. | border-top: 1px solid #a2a9b1; | ||
. | |||
} | } | ||
.infobox-label | .infobox-label { | ||
background-color: #f1f1f1; | |||
padding: 0.3em 0.6em; | |||
font-weight: normal; | |||
width: 35%; | |||
vertical-align: top; | |||
border-top: 1px solid #ddd; | |||
text-align: left; | |||
} | } | ||
.infobox-data { | |||
padding: 0.3em 0.6em; | |||
. | border-top: 1px solid #ddd; | ||
vertical-align: top; | |||
text-align: left; | |||
} | } | ||
.infobox- | .infobox-full-data { | ||
padding: 0.3em 0.6em; | |||
border-top: 1px solid #ddd; | |||
} | } | ||
.infobox-below { | |||
padding: 0.4em 0.6em; | |||
. | background-color: #e9ecef; | ||
border-top: 1px solid #a2a9b1; | |||
} | } | ||
.infobox-navbar { | |||
. | padding: 0.2em 0.6em; | ||
background: none; | |||
text-align: center; | |||
} | } | ||
Revision as of 00:38, 6 May 2025
/*
* This is the CSS common to all desktop skins on en.Wikipedia.
* Styling inside .mw-parser-output should generally use TemplateStyles.
*/
/* Reset italic styling set by user agent */
cite,
dfn {
font-style: inherit;
}
/* Straight quote marks for <q> */
q {
quotes: '"' '"' "'" "'";
}
/* Avoid collision of blockquote with floating elements by swapping margin and padding */
blockquote {
overflow: hidden;
margin: 1em 0;
padding: 0 40px;
}
/* Consistent size for <small>, <sub> and <sup> */
small {
font-size: 85%;
}
.mw-body-content sub,
.mw-body-content sup {
font-size: 80%;
}
/* Same spacing for indented and unindented paragraphs on talk pages */
.ns-talk .mw-body-content dd {
margin-top: 0.4em;
margin-bottom: 0.4em;
}
/* [Collapse/outercollapse rules abbreviated for brevity – keep your originals here] */
/* Hide charinsert base for those not using the gadget */
#editpage-specialchars {
display: none;
}
/* Different margin on references */
.references {
margin-bottom: 0.5em;
}
/* Cite customizations */
span[ rel="mw:referencedBy" ] {
counter-reset: mw-ref-linkback 0;
}
span[ rel="mw:referencedBy" ] > a::before {
content: counter( mw-ref-linkback, lower-alpha );
font-size: 80%;
font-weight: bold;
font-style: italic;
}
a[ rel="mw:referencedBy" ]::before {
font-weight: bold;
content: "^";
}
span[ rel="mw:referencedBy" ]::before {
content: "^ ";
}
/* jQuery makeCollapsible styling */
.mw-parser-output .mw-collapsible-toggle:not(.mw-ui-button) {
font-weight: normal;
padding: 0 0.2em;
}
.mw-collapsible-leftside-toggle .mw-collapsible-toggle {
float: left;
}
/* Lists in wikitable data cells are always left-aligned */
.wikitable td ul,
.wikitable td ol,
.wikitable td dl {
text-align: left;
}
/* Change external link icon to PDF icon for PDF files */
.mw-parser-output a[href$=".pdf"].external,
.mw-parser-output a[href*=".pdf?"].external,
.mw-parser-output a[href*=".pdf#"].external,
.mw-parser-output a[href$=".PDF"].external,
.mw-parser-output a[href*=".PDF?"].external,
.mw-parser-output a[href*=".PDF#"].external {
background: url("//upload.wikimedia.org/wikipedia/commons/4/4d/Icon_pdf_file.png") no-repeat right;
padding: 8px 18px 8px 0;
}
/* System messages styled like fmbox */
.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt.mw-warning-with-logexcerpt,
div.mw-lag-warn-high,
div.mw-cascadeprotectedwarning,
div#mw-protect-cascadeon {
clear: both;
margin: 0.2em 0;
border: 1px solid #bb7070;
background-color: var(--background-color-error-subtle, #ffdbdb);
padding: 0.25em 0.9em;
box-sizing: border-box;
}
/* Partial block message colors */
.mw-contributions-blocked-notice-partial .mw-warning-with-logexcerpt.mw-warning-with-logexcerpt {
border-color: #fc3;
background-color: var(--background-color-warning-subtle, #fef6e7);
}
/* Minimum thumb width for thumbnails and frames */
@media (min-width: 640px) {
figure[typeof~='mw:File/Thumb'],
figure[typeof~='mw:File/Frame'],
.thumbinner {
min-width: 100px;
}
}
/* Prevent float overlap on category lists etc. */
#mw-subcategories,
#mw-pages,
#mw-category-media,
#filehistory,
#wikiPreview,
#wikiDiff {
clear: both;
}
/* Permission-based visibility toggles */
.checkuser-show,
.sysop-show,
.abusefilter-show,
.abusefilter-helper-show,
.patroller-show,
.templateeditor-show,
.extendedmover-show,
.extendedconfirmed-show,
.autoconfirmed-show,
.user-show {
display: none;
}
/* Hide editnotice redlinks and images */
.ve-ui-mwNoticesPopupTool-item .editnotice-redlink,
.ve-ui-mwNoticesPopupTool-item .mbox-image,
.ve-ui-mwNoticesPopupTool-item .mbox-imageright {
display: none !important;
}
/* Remove bullets on multiple warnings */
ul.permissions-errors {
margin: 0;
}
ul.permissions-errors > li {
list-style: none;
}
/* Inline math font size adjustments */
span.mwe-math-mathml-inline {
font-size: 118%;
}
/* Block math alignment */
.mwe-math-fallback-image-display,
.mwe-math-mathml-display {
margin-left: 1.6em !important;
margin-top: 0.6em;
margin-bottom: 0.6em;
}
.mwe-math-mathml-display math {
display: inline;
}
@media screen {
/* Checker background for transparent gallery thumbs */
body:not(.ns-0):not(.ns-2):not(.ns-100) .gallerybox .thumb img {
background: #fff url(//upload.wikimedia.org/wikipedia/commons/5/5d/Checker-16x16.png) repeat;
}
#siteSub {
display: block;
}
.references {
font-size: 90%;
}
}
/*
* ========================================================================
* Consolidated Infobox styling (light mode)
* ========================================================================
*/
table.infobox {
background-color: #f8f9fa;
border: 1px solid #a2a9b1;
font-size: 88%;
line-height: 1.5em;
margin: 0.5em 0 0.5em 1em;
float: right;
clear: right;
width: 22em;
border-spacing: 3px;
padding: 0.2em;
}
/* Responsive full-width on narrow screens */
@media (max-width: 640px) {
table.infobox {
width: 100%;
float: none;
clear: none;
margin: 0.5em 0;
}
table.infobox .nowrap {
white-space: normal;
}
}
.infobox-title {
font-weight: bold;
text-align: center;
padding: 0.4em;
background-color: #e2e3e5;
color: #212529;
border-bottom: 1px solid #a2a9b1;
}
.infobox-image {
text-align: center;
padding: 0.5em;
background: none;
}
.infobox-caption {
font-size: 85%;
color: #555;
padding: 0.2em 0;
}
.infobox-header {
background-color: #003b6f !important;
color: #ffffff !important;
padding: 0.4em 0.6em;
border-top: 1px solid #a2a9b1;
}
.infobox-label {
background-color: #f1f1f1;
padding: 0.3em 0.6em;
font-weight: normal;
width: 35%;
vertical-align: top;
border-top: 1px solid #ddd;
text-align: left;
}
.infobox-data {
padding: 0.3em 0.6em;
border-top: 1px solid #ddd;
vertical-align: top;
text-align: left;
}
.infobox-full-data {
padding: 0.3em 0.6em;
border-top: 1px solid #ddd;
}
.infobox-below {
padding: 0.4em 0.6em;
background-color: #e9ecef;
border-top: 1px solid #a2a9b1;
}
.infobox-navbar {
padding: 0.2em 0.6em;
background: none;
text-align: center;
}