Difference between revisions of "MediaWiki:Common.css"

Jump to navigation Jump to search
4,333 bytes added ,  19:15, 12 October 2020
Replace Navbox styles with Wikipedia equivalent
(Additional navbox styles.)
(Replace Navbox styles with Wikipedia equivalent)
 
Line 148: Line 148:
 
}
 
}
  
/* Boxes - Navboxes */
 
  
.box.navbox {
+
/* Style for horizontal lists (separator following item).
 +
  @source mediawiki.org/wiki/Snippets/Horizontal_lists
 +
  @revision 8 (2016-05-21)
 +
  @author [[wikipedia:User:Edokter]]
 +
*/
 +
.hlist dl,
 +
.hlist ol,
 +
.hlist ul {
 +
margin: 0;
 +
padding: 0;
 +
}
 +
/* Display list items inline */
 +
.hlist dd,
 +
.hlist dt,
 +
.hlist li {
 +
margin: 0;
 +
display: inline;
 +
}
 +
/* Display nested lists inline */
 +
.hlist.inline,
 +
.hlist.inline dl,
 +
.hlist.inline ol,
 +
.hlist.inline ul,
 +
.hlist dl dl, .hlist dl ol, .hlist dl ul,
 +
.hlist ol dl, .hlist ol ol, .hlist ol ul,
 +
.hlist ul dl, .hlist ul ol, .hlist ul ul {
 +
display: inline;
 +
}
 +
/* Hide empty list items */
 +
.hlist .mw-empty-li {
 +
display: none;
 +
}
 +
/* Generate interpuncts */
 +
.hlist dt:after {
 +
content: ": ";
 +
}
 +
/**
 +
* Note hlist style usage differd in
 +
* the Minerva skin. Remember .hlist is a class defined in core as well! Please check Minerva desktop (and Minerva.css) when changing
 +
* See https://phabricator.wikimedia.org/T213239
 +
*/
 +
.hlist dd:after,
 +
.hlist li:after {
 +
content: " · ";
 +
font-weight: bold;
 +
}
 +
.hlist dd:last-child:after,
 +
.hlist dt:last-child:after,
 +
.hlist li:last-child:after {
 +
content: none;
 +
}
 +
/* Add parentheses around nested lists */
 +
.hlist dd dd:first-child:before, .hlist dd dt:first-child:before, .hlist dd li:first-child:before,
 +
.hlist dt dd:first-child:before, .hlist dt dt:first-child:before, .hlist dt li:first-child:before,
 +
.hlist li dd:first-child:before, .hlist li dt:first-child:before, .hlist li li:first-child:before {
 +
content: " (";
 +
font-weight: normal;
 +
}
 +
.hlist dd dd:last-child:after, .hlist dd dt:last-child:after, .hlist dd li:last-child:after,
 +
.hlist dt dd:last-child:after, .hlist dt dt:last-child:after, .hlist dt li:last-child:after,
 +
.hlist li dd:last-child:after, .hlist li dt:last-child:after, .hlist li li:last-child:after {
 +
content: ")";
 +
font-weight: normal;
 +
}
 +
/* Put ordinals in front of ordered list items */
 +
.hlist ol {
 +
counter-reset: listitem;
 +
}
 +
.hlist ol > li {
 +
counter-increment: listitem;
 +
}
 +
.hlist ol > li:before {
 +
content: " " counter(listitem) "\a0";
 +
}
 +
.hlist dd ol > li:first-child:before,
 +
.hlist dt ol > li:first-child:before,
 +
.hlist li ol > li:first-child:before {
 +
content: " (" counter(listitem) "\a0";
 +
}
 +
 
 +
/* Unbulleted lists */
 +
.plainlist ol,
 +
.plainlist ul {
 +
line-height: inherit;
 +
list-style: none none;
 +
margin: 0;
 +
}
 +
.plainlist ol li,
 +
.plainlist ul li {
 +
margin-bottom: 0;
 +
}
 +
 
 +
/* Navboxes */
 +
 
 +
.navbox {                    /* Navbox container style */
 +
box-sizing: border-box;
 +
border: 1px solid #a2a9b1;
 +
width: 100%;
 +
clear: both;
 +
font-size: 88%;
 +
text-align: center;
 +
padding: 1px;
 +
margin: 1em auto 0;      /* Prevent preceding content from clinging to navboxes */
 +
}
 +
.navbox .navbox {
 +
margin-top: 0;            /* No top margin for nested navboxes */
 +
}
 +
.navbox + .navbox {
 +
margin-top: -1px;        /* Single pixel border between adjacent navboxes */
 +
}
 +
.navbox-inner,
 +
.navbox-subgroup {
 
width: 100%;
 
width: 100%;
padding: .25em;
 
border-spacing: 0;
 
font-size: small;
 
 
}
 
}
.navbox a { white-space: nowrap; }  
+
.navbox-group,
.navbox table { border-spacing: 0; }  
+
.navbox-title,
.navbox th, .navbox td { padding: 0 .5em; }  
+
.navbox-abovebelow {
.navbox .navbox__header {
+
padding: 0.25em 1em;      /* Title, group and above/below styles */
padding: .25em .5em;
+
line-height: 1.5em;
text-align: center;
+
text-align: center;
}
+
}
.navbox .navbox__navbar { float: left; }
+
th.navbox-group {             /* Group style */
.navbox .navbox__navbar p { margin: 0; }
+
white-space: nowrap;
.navbox .navbox__supplemental {
+
/* @noflip */
padding: .5em;
+
text-align: right;
text-align: center;
+
}
}
+
.navbox,
.navbox .navbox__groupname {
+
.navbox-subgroup {
width: 8em;
+
background-color: #fdfdfd; /* Background color */
padding: 0 .5em;
+
}
border: none;
+
.navbox-list {
text-align: left;
+
line-height: 1.5em;
}
+
border-color: #fdfdfd;    /* Must match background color */
 +
}
 +
/* cell spacing for navbox cells */
 +
tr + tr > .navbox-abovebelow,
 +
tr + tr > .navbox-group,
 +
tr + tr > .navbox-image,
 +
tr + tr > .navbox-list {    /* Borders above 2nd, 3rd, etc. rows */
 +
border-top: 2px solid #fdfdfd; /* Must match background color */
 +
}
 +
.navbox th,
 +
.navbox-title {
 +
background-color: #ccccff;      /* Level 1 color */
 +
}
 +
.navbox-abovebelow,
 +
th.navbox-group,
 +
.navbox-subgroup .navbox-title {
 +
background-color: #ddddff;      /* Level 2 color */
 +
}
 +
.navbox-subgroup .navbox-group,
 +
.navbox-subgroup .navbox-abovebelow {
 +
background-color: #e6e6ff;      /* Level 3 color */
 +
}
 +
.navbox-even {
 +
background-color: #f7f7f7;     /* Even row striping */
 +
}
 +
.navbox-odd {
 +
background-color: transparent;  /* Odd row striping */
 +
}
 +
.navbox .hlist td dl,
 +
.navbox .hlist td ol,
 +
.navbox .hlist td ul,
 +
.navbox td.hlist dl,
 +
.navbox td.hlist ol,
 +
.navbox td.hlist ul {
 +
padding: 0.125em 0;      /* Adjust hlist padding in navboxes */
 +
}
 +
 
 +
/* Default styling for Navbar template */
 +
.navbar {
 +
display: inline;
 +
font-size: 88%;
 +
font-weight: normal;
 +
}
 +
.navbar ul {
 +
display: inline-block;
 +
white-space: nowrap;
 +
}
 +
.mw-body-content .navbar ul {
 +
line-height: inherit;
 +
}
 +
.navbar li {
 +
word-spacing: -0.125em;
 +
}
 +
.navbar.mini li abbr[title] {
 +
font-variant: small-caps;
 +
border-bottom: none;
 +
text-decoration: none;
 +
cursor: inherit;
 +
}
 +
/* Navbar styling when nested in infobox and navbox */
 +
.infobox .navbar {
 +
font-size: 100%;
 +
}
 +
.navbox .navbar {
 +
display: block;
 +
font-size: 100%;
 +
}
 +
.navbox-title .navbar {
 +
float: left;
 +
text-align: left;
 +
margin-right: 0.5em;
 +
}
  
 
/* Infobox chronology */
 
/* Infobox chronology */

Navigation menu