Jump to content

MediaWiki:Common.css: Difference between revisions

From nUSA Wiki
No edit summary
No edit summary
Line 1: Line 1:
.infobox-subbox {
/* General infobox styling */
padding: 0;
.infobox {
border: none;
    width: 300px;
margin: -3px;
    border: 1px solid #aaa;
width: auto;
    border-collapse: collapse;
min-width: 100%;
    margin: 1em 0;
font-size: 100%;
    background-color: #f9f9f9;
clear: none;
    font-family: sans-serif;
float: none;
background-color: transparent;
}
}


.infobox-3cols-child {
.infobox th,
margin: auto;
.infobox td {
    padding: 5px 10px;
    text-align: left;
}
}


.infobox .navbar {
.infobox th {
font-size: 100%;
    background-color: #e5e5e5;
    font-weight: bold;
}
}


/* T281642 */
/* Styling for the image section */
body.skin-minerva .infobox-header,
.infobox-image {
body.skin-minerva .infobox-subheader,
    text-align: center;
body.skin-minerva  .infobox-above,
    padding: 10px;
body.skin-minerva .infobox-title,
body.skin-minerva  .infobox-image,
body.skin-minerva  .infobox-full-data,
body.skin-minerva .infobox-below {
text-align: center;
}
}


.infobox-subbox {
.infobox-caption {
padding: 0;
    font-size: 0.8em;
border: none;
    color: #777;
margin: -3px;
    margin-top: 5px;
width: auto;
min-width: 100%;
font-size: 100%;
clear: none;
float: none;
background-color: transparent;
}
}


.infobox-3cols-child {
/* Header styling */
margin: auto;
.infobox-header {
    background-color: #f0f0f0;
    font-weight: bold;
    text-align: center;
}
}


.infobox .navbar {
/* Label styling */
font-size: 100%;
.infobox-label {
    font-weight: bold;
    padding-right: 10px;
    vertical-align: top;
}
}


/* Dark theme: [[William_Wragg]], [[Coral_Castle]] */
/* Data styling */
.infobox-data {
    font-size: 1em;
}


@media screen {
/* Styling for the flag and seal images */
    html.skin-theme-clientpref-night .infobox-full-data:not(.notheme) > div:not(.notheme)[style] {
.infobox-data img {
    background: #1f1f23 !important;
    max-width: 100%;
      /* switch with var( --color-base ) when supported. */
    height: auto;
      color: #f8f9fa;
}
}
}


/* Navbar (links) styling */
.infobox-navbar {
    border-top: 1px solid #ccc;
    padding-top: 5px;
    text-align: center;
}


@media screen and ( prefers-color-scheme: dark) {
.navbar a {
     html.skin-theme-clientpref-os .infobox-full-data:not(.notheme) div:not(.notheme) {
     text-decoration: none;
      background: #1f1f23 !important;
    color: #0066cc;
      /* switch with var( --color-base ) when supported. */
     margin: 0 5px;
      color: #f8f9fa;
     }
}
}


.navbar a:hover {
    text-decoration: underline;
}
/* The hlist class for inline lists */
.mw-parser-output .hlist {
    margin: 0;
    padding: 0;
    list-style: none;
    display: inline-block;
}


/* Since infobox is a table, many infobox templates take advantage of this to add columns and rows to the infobox itself rather than as part of a new table inside them. This class should be discouraged and removed on the long term, but allows us to at least identify these tables going forward
.mw-parser-output .hlist li {
Currently in use on: [[Module:Infobox3cols]]
     display: inline-block;
Fixes issue described in https://phabricator.wikimedia.org/F55300125 on Vector 2022.
     margin-right: 10px;
*/
@media (min-width: 640px) {
  body.skin--responsive .infobox-table {
    display: table !important;
  }
  body.skin--responsive .infobox-table > caption {
    display: table-caption !important;
  }
  body.skin--responsive .infobox-table > tbody {
     display: table-row-group;
  }
  body.skin--responsive .infobox-table tr {
     display: table-row !important;
  }
  body.skin--responsive .infobox-table th,
  body.skin--responsive .infobox-table td {
    padding-left: inherit;
    padding-right: inherit;
  }
}
}

Revision as of 05:16, 2 January 2025

/* General infobox styling */
.infobox {
    width: 300px;
    border: 1px solid #aaa;
    border-collapse: collapse;
    margin: 1em 0;
    background-color: #f9f9f9;
    font-family: sans-serif;
}

.infobox th,
.infobox td {
    padding: 5px 10px;
    text-align: left;
}

.infobox th {
    background-color: #e5e5e5;
    font-weight: bold;
}

/* Styling for the image section */
.infobox-image {
    text-align: center;
    padding: 10px;
}

.infobox-caption {
    font-size: 0.8em;
    color: #777;
    margin-top: 5px;
}

/* Header styling */
.infobox-header {
    background-color: #f0f0f0;
    font-weight: bold;
    text-align: center;
}

/* Label styling */
.infobox-label {
    font-weight: bold;
    padding-right: 10px;
    vertical-align: top;
}

/* Data styling */
.infobox-data {
    font-size: 1em;
}

/* Styling for the flag and seal images */
.infobox-data img {
    max-width: 100%;
    height: auto;
}

/* Navbar (links) styling */
.infobox-navbar {
    border-top: 1px solid #ccc;
    padding-top: 5px;
    text-align: center;
}

.navbar a {
    text-decoration: none;
    color: #0066cc;
    margin: 0 5px;
}

.navbar a:hover {
    text-decoration: underline;
}

/* The hlist class for inline lists */
.mw-parser-output .hlist {
    margin: 0;
    padding: 0;
    list-style: none;
    display: inline-block;
}

.mw-parser-output .hlist li {
    display: inline-block;
    margin-right: 10px;
}