MediaWiki:Mobile.css: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/** | /* | ||
* This is the CSS common to all mobile skins on en.Wikipedia. | |||
* Styling inside .mw-parser-output should generally use TemplateStyles. | |||
* | |||
* [[mw:Recommendations for mobile friendly articles on Wikimedia wikis]] may be | |||
* | * worth reviewing. | ||
** | * | ||
* | * special note that this page loads late by Javascript, which may cause | ||
* | * [[FOUC]]s for "lead" content if styled from here. See [[phab:T190083]] | ||
* | */ | ||
* | |||
*/ | |||
/* Reset user agent styles. We don't reset small or blockquote here deliberately */ | /* Reset user agent styles. We don't reset small or blockquote here deliberately */ | ||
| Line 30: | Line 21: | ||
/* Hide the images */ | /* Hide the images */ | ||
.geo-nondefault, .geo-multi-punct, | .geo-nondefault, | ||
.geo-multi-punct, | |||
/* Hide stuff meant for accounts with special permissions. Made visible again in | /* Hide stuff meant for accounts with special permissions. Made visible again in | ||
[[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-patroller.css]] and | [[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-patroller.css]] and | ||
| Line 40: | Line 32: | ||
.patroller-show, | .patroller-show, | ||
.extendedconfirmed-show, | .extendedconfirmed-show, | ||
.autoconfirmed-show | .autoconfirmed-show { | ||
display: none; | display: none; | ||
} | } | ||
/* | /* Prevent flags in tables from collapsing | ||
Fix for T116318 | |||
*/ | |||
. | .flagicon img { | ||
min-width: 25px; | |||
} | |||
/* Prevent unnecessary margin at the bottom of centralnotices */ | |||
.cnotice { | |||
margin-bottom: 0 !important; | |||
} | } | ||
/* | |||
* BELOW HERE THERE BE SOONTOBE TEMPLATESTYLES THINGS; | |||
* SEE [[MediaWiki talk:Common.css/to do]] | |||
*/ | |||
/* | /* | ||
.infobox | .infobox | ||
| Line 69: | Line 67: | ||
.content .mw-parser-output .infobox-below { | .content .mw-parser-output .infobox-below { | ||
text-align: center; | text-align: center; | ||
} | } | ||
| Line 98: | Line 90: | ||
font-family: serif; | font-family: serif; | ||
white-space: nowrap; | white-space: nowrap; | ||
} | } | ||
/* Normal font styling for wikitable row headers with scope="row" tag */ | /* Normal font styling for wikitable row headers with scope="row" tag */ | ||
.wikitable.plainrowheaders th[scope=row] { | .wikitable.plainrowheaders th[scope=row], | ||
.wikitable.plainrowheaders th[scope=rowgroup] { | |||
font-weight: normal; | font-weight: normal; | ||
/* @noflip */ | /* @noflip */ | ||
| Line 130: | Line 100: | ||
} | } | ||
/* One of the not TemplateStyles things */ | |||
/* | |||
/* https://phabricator.wikimedia.org/T180396#5317728 */ | /* https://phabricator.wikimedia.org/T180396#5317728 */ | ||
| Line 238: | Line 109: | ||
display: none !important; | display: none !important; | ||
} | } | ||
} | } | ||
Revision as of 11:12, 9 March 2023
/*
* This is the CSS common to all mobile skins on en.Wikipedia.
* Styling inside .mw-parser-output should generally use TemplateStyles.
*
* [[mw:Recommendations for mobile friendly articles on Wikimedia wikis]] may be
* worth reviewing.
*
* special note that this page loads late by Javascript, which may cause
* [[FOUC]]s for "lead" content if styled from here. See [[phab:T190083]]
*/
/* Reset user agent styles. We don't reset small or blockquote here deliberately */
cite,
dfn {
font-style: inherit;
}
q {
quotes: '"' '"' "'" "'";
}
/* Hide the images */
.geo-nondefault,
.geo-multi-punct,
/* Hide stuff meant for accounts with special permissions. Made visible again in
[[MediaWiki:Group-sysop.css]], [[MediaWiki:Group-patroller.css]] and
[[MediaWiki:Group-autoconfirmed.css]]. */
.checkuser-show,
.sysop-show,
.templateeditor-show,
.extendedmover-show,
.patroller-show,
.extendedconfirmed-show,
.autoconfirmed-show {
display: none;
}
/* Prevent flags in tables from collapsing
Fix for T116318
*/
.flagicon img {
min-width: 25px;
}
/* Prevent unnecessary margin at the bottom of centralnotices */
.cnotice {
margin-bottom: 0 !important;
}
/*
* BELOW HERE THERE BE SOONTOBE TEMPLATESTYLES THINGS;
* SEE [[MediaWiki talk:Common.css/to do]]
*/
/*
.infobox
DO NOT style infobox's here. That should be taken care of in the associated templates via template styles. Styles here will lead to flash of unstyled content on mobile.
*/
/* removed inline from module as we work toward Tstyles support
* Use three classes to match specificity of MobileFrontend/Minerva selectors */
.content .mw-parser-output .infobox-header,
.content .mw-parser-output .infobox-subheader,
.content .mw-parser-output .infobox-above,
.content .mw-parser-output .infobox-title,
.content .mw-parser-output .infobox-image,
.content .mw-parser-output .infobox-full-data,
.content .mw-parser-output .infobox-below {
text-align: center;
}
/* Prevent line breaks in silly places:
1) Where desired
2) Links when we don't want them to
*/
.mw-parser-output .nowrap,
.nowraplinks a {
white-space: nowrap;
}
.mw-parser-output .infobox .nowrap {
white-space: normal !important;
}
/* But allow wrapping where desired: */
.wrap,
.wraplinks a {
white-space: normal;
}
/* Generic class texhtml class for inline math */
span.texhtml {
font-family: serif;
white-space: nowrap;
}
/* Normal font styling for wikitable row headers with scope="row" tag */
.wikitable.plainrowheaders th[scope=row],
.wikitable.plainrowheaders th[scope=rowgroup] {
font-weight: normal;
/* @noflip */
text-align: left;
}
/* One of the not TemplateStyles things */
/* https://phabricator.wikimedia.org/T180396#5317728 */
@media print {
.navbox,
.hatnote,
.ambox {
display: none !important;
}
}