MediaWiki:Mobile.css

From OpenStreetMap Wiki
Jump to navigation Jump to search

Note: After publishing, you may have to bypass your browser's cache to see the changes.

  • Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
  • Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
  • Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
  • Opera: Press Ctrl-F5.
/* CSS placed here will affect users of the mobile site */

/* Style for horizontal lists (separator following item).
   @source https://en.wikipedia.org/wiki/Template:Hlist/styles.css
 */
.mw-parser-output .hlist ul,
.mw-parser-output .hlist ol {
	padding-left: 0;
}
/* reset hlist margins of Minerva */
.mw-parser-output .hlist li,
.mw-parser-output .hlist dd,
.mw-parser-output .hlist dt {
	margin-right: 0;
}
.mw-parser-output .hlist li:after,
.mw-parser-output .hlist dd:after {
	content: " · ";
	font-weight: bold;
}
.mw-parser-output .hlist dt:after {
	content: ": ";
}
/* Should be removed and moved to templates once TemplateStyles is live */
.mw-parser-output .hlist dd:last-child:after,
.mw-parser-output .hlist dt:last-child:after,
.mw-parser-output .hlist li:last-child:after {
	content: none;
}
/* Add parentheses around nested lists */
/* Should be removed and moved to templates once TemplateStyles is live */
.mw-parser-output .hlist dd dd:first-child:before, .mw-parser-output .hlist dd dt:first-child:before, .mw-parser-output .hlist dd li:first-child:before,
.mw-parser-output .hlist dt dd:first-child:before, .mw-parser-output .hlist dt dt:first-child:before, .mw-parser-output .hlist dt li:first-child:before,
.mw-parser-output .hlist li dd:first-child:before, .mw-parser-output .hlist li dt:first-child:before, .mw-parser-output .hlist li li:first-child:before {
	content: " (";
	font-weight: normal;
}
/* Should be removed and moved to templates once TemplateStyles is live */
.mw-parser-output .hlist dd dd:last-child:after, .mw-parser-output .hlist dd dt:last-child:after, .mw-parser-output .hlist dd li:last-child:after,
.mw-parser-output .hlist dt dd:last-child:after, .mw-parser-output .hlist dt dt:last-child:after, .mw-parser-output .hlist dt li:last-child:after,
.mw-parser-output .hlist li dd:last-child:after, .mw-parser-output .hlist li dt:last-child:after, .mw-parser-output .hlist li li:last-child:after {
	content: ") ";
	font-weight: normal;
}
/* Put ordinals in front of ordered list items */
/* Should be removed and moved to templates once TemplateStyles is live */
.mw-parser-output .hlist ol {
	counter-reset: listitem;
}
/* Should be removed and moved to templates once TemplateStyles is live */
.mw-parser-output .hlist ol > li {
	counter-increment: listitem;
}
/* Should be removed and moved to templates once TemplateStyles is live */
.mw-parser-output .hlist ol > li:before {
	content: " " counter(listitem) " ";
	white-space: nowrap;
}
/* Should be removed and moved to templates once TemplateStyles is live */
.mw-parser-output .hlist dd ol > li:first-child:before,
.mw-parser-output .hlist dt ol > li:first-child:before,
.mw-parser-output .hlist li ol > li:first-child:before {
	content: " (" counter(listitem) " ";
}

.mw-parser-output bdi, .bdi {
	unicode-bidi: embed; unicode-bidi: -webkit-isolate; unicode-bidi: isolate;
}

/* Styles for language bar */
.mw-parser-output .LanguageBar {
    margin : 0;
    background : #f9f9f9;
    border : none;
    padding : 0.5em;
    font-size : 95%;
    line-height : normal;
    text-align : justify;
}

/* Move the hlist separator from each list item to a span within. */
.mw-parser-output .hlist-with-seps li:after {
	content: none;
}
.mw-parser-output .hlist-with-seps .hlist-sep:after {
	content: " · ";
	font-weight: bold;
}
.mw-parser-output .hlist-with-seps li:last-child .hlist-sep:after {
    content: none;
}

/* Hide language names where the page is unavailable, even when the link has been disabled */
.mw-parser-output .LanguageBar .new, .LanguageBar .new + .hlist-sep {
	display: none;
}
/* …but show them again when the links are usable */
.mw-parser-output .LanguageBar.showOther .new,
.mw-parser-output .LanguageBar.showOther .new + .hlist-sep {
	display: inline;
}

/*
.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.
*/

/* Default styling for Navbar template
TODO: Move to Navbar template ASAP
*/
.navbar {
	display: inline;
	font-size: 88%;
	font-weight: normal;
}
.navbar ul {
	display: inline;
	white-space: nowrap;
}
.navbar li {
	word-spacing: -0.125em;
}
.navbar.mini li span {
	font-variant: small-caps;
}
/* Navbar styling when nested in infobox and navbox */
.navbox .navbar,
.infobox .navbar {
	font-size: 100%;
}
.navbox .navbar {
	display: block;
}
.navbox-title .navbar {
	/* @noflip */
	float: left;
	/* @noflip */
	text-align: left;
	/* @noflip */
	margin-right: 0.5em;
	width: 6em;
}
/* Unbulleted lists*/
.plainlist ul {
	list-style: none;
	padding-left: 0; /* Reset Minerva defaults */
}

/* Prevent line breaks in silly places:
   1) Where desired
   2) Links when we don't want them to
   3) Bold "links" to the page itself
   4) Ref tags with group names <ref group="Note"> --> "[Note 1]"
Please document here what pages use this
Enabled 
*/
.mw-parser-output .nowrap,
.nowraplinks a,
.nowraplinks .selflink,
sup.reference a {
	white-space: nowrap;
}
.mw-parser-output .infobox .nowrap {
	white-space: normal !important;
}
/* But allow wrapping where desired: */
.wrap,
.wraplinks a {
	white-space: normal;
}

/* The message body cell(s), such as for {{Commonscat}}.
 * this is a very small subset of the styles from Common.css
 * just to make sure the box isn't squashed without any spacing
 * which looks out of place with visuals of other nearby elements
 */
.mbox-text {
	/* @noflip */
	padding: 0.25em 0.9em;
}

/* Make [[Template:Banner]] responsive */
.topbanner img {
	max-width: 100%;
	height: auto;
}

/* https://phabricator.wikimedia.org/T180396#5317728 */

@media print {
  .navbox, .hatnote, .ambox { display: none; }
}