MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
(Move TOC code to Common)
(Added unbulleted lists and vgregion preview warning CSS)
 
(9 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */


/* Hide the title on the main page */
/* Add styling for kbd HTML tag */
.action-view.page-Main_Page #siteSub, .action-submit.page-Main_Page #siteSub,
kbd {
.action-view.page-Main_Page #contentSub, .action-submit.page-Main_Page #contentSub,
  box-sizing: border-box;
.action-view.page-Main_Page .firstHeading, .action-submit.page-Main_Page .firstHeading {
  text-align: center;
  color: #555;
  cursor: pointer;
  margin: 0 8px;
  padding: 0 5px;
  border-color: #f2f2f2;
  border-style: solid;
  text-shadow: 0 0.5px 1px #777, 0 2px 6px #f2f2f2;
  border-width: 1px;
  border-radius: 5px;
  background: -webkit-linear-gradient(top, #f9f9f9 0%, #D2D2D2 80%, #c0c0c0 100%);
  font-family: sans-serif;
  display: inline-block;
  transition: box-shadow 0.3s ease, transform 0.15s ease;
  box-shadow: 0 0 1px #888,0 1px 0 #fff, 0 6px 0 #C0C0C0, 0 8px 17px rgba(#444, 0.4), 2px 1px 4px rgba(#444, 0.25), -2px 1px 4px rgba(#444, 0.25), 0 9px 16px rgba(#444, 0.1);
}
 
kbd:hover, kbd:focus {
  box-shadow: 0 0 1px #888,0 1px 0 #fff, 0 4px 0 #C0C0C0, 0 2px 35px rgba(#444, 0.3), 2px 2px 4px rgba(#444, 0.25), -2px 2px 4px rgba(#444, 0.25), 0 7px 4px rgba(#444, 0.1);
  transform: translateY(2px);
}
 
kbd:active {
  box-shadow: 0 0 1px #888,0 1px 0 #fff, 0 0 0 #C0C0C0, 0 0px 30px rgba(#444, 0.15), 2px 2px 4px rgba(#444, 0.25), -2px 2px 4px rgba(#444, 0.25), 0 0px 4px rgba(#444, 0.25);
  transform: translateY(4px);
}
 
/**
* Style for horizontal lists (separator following item).
* @source https://www.mediawiki.org/wiki/Snippets/Horizontal_lists
* @revision 9 (2016-08-10)
* @author https://www.mediawiki.org/wiki/User:Edokter
*/
.hlist dl,
.hlist ol,
.hlist ul {
  margin: 0;
  padding: 0;
}
 
/* Display list items inline */
.hlist dd,
.hlist dt,
.hlist li {
  /* don't trust the note that says margin doesn't work with inline
  * removing margin: 0 makes dds have margins again */
  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,
.hlist .mw-empty-elt {
   display: none;
   display: none;
}
}


.text-bottomline {
/* Generate interpuncts */
   border-bottom-style: solid;  
.hlist dt:after {
   border-bottom-width: 1px;
  content: ": ";
   border-bottom-color: #a2a9b1;
}
 
.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;
}
}


/* Add columns to TOC in Game Patches page */
.plainlist ol li,
.page-Help_Game_Patches #toc > ul:nth-child(3) {
.plainlist ul li {
  column-count: 3;
margin-bottom: 0;
}
}


.page-Help_Game_Patches #toc > ul > .toclevel-1 {
/* Module:vgregion Preview Warning */
  page-break-inside: avoid;
.vgr-preview-warning {
font-style: italic;
padding-left: 1.6em;
margin-bottom: 0.5em;
color: red;
}
}

Latest revision as of 20:58, 16 March 2024

/* CSS placed here will be applied to all skins */

/* Add styling for kbd HTML tag */
kbd {
  box-sizing: border-box;
  text-align: center;
  color: #555;
  cursor: pointer;
  margin: 0 8px;
  padding: 0 5px;
  border-color: #f2f2f2;
  border-style: solid;
  text-shadow: 0 0.5px 1px #777, 0 2px 6px #f2f2f2;
  border-width: 1px;
  border-radius: 5px;
  background: -webkit-linear-gradient(top, #f9f9f9 0%, #D2D2D2 80%, #c0c0c0 100%);
  font-family: sans-serif;
  display: inline-block;
  transition: box-shadow 0.3s ease, transform 0.15s ease;
  box-shadow: 0 0 1px #888,0 1px 0 #fff, 0 6px 0 #C0C0C0, 0 8px 17px rgba(#444, 0.4), 2px 1px 4px rgba(#444, 0.25), -2px 1px 4px rgba(#444, 0.25), 0 9px 16px rgba(#444, 0.1);
}

kbd:hover, kbd:focus {
  box-shadow: 0 0 1px #888,0 1px 0 #fff, 0 4px 0 #C0C0C0, 0 2px 35px rgba(#444, 0.3), 2px 2px 4px rgba(#444, 0.25), -2px 2px 4px rgba(#444, 0.25), 0 7px 4px rgba(#444, 0.1);
  transform: translateY(2px);
}

kbd:active {
  box-shadow: 0 0 1px #888,0 1px 0 #fff, 0 0 0 #C0C0C0, 0 0px 30px rgba(#444, 0.15), 2px 2px 4px rgba(#444, 0.25), -2px 2px 4px rgba(#444, 0.25), 0 0px 4px rgba(#444, 0.25);
  transform: translateY(4px); 
}

/**
 * Style for horizontal lists (separator following item).
 * @source https://www.mediawiki.org/wiki/Snippets/Horizontal_lists
 * @revision 9 (2016-08-10)
 * @author https://www.mediawiki.org/wiki/User:Edokter
 */
.hlist dl,
.hlist ol,
.hlist ul {
  margin: 0;
  padding: 0;
}

/* Display list items inline */
.hlist dd,
.hlist dt,
.hlist li {
  /* don't trust the note that says margin doesn't work with inline
   * removing margin: 0 makes dds have margins again */
  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,
.hlist .mw-empty-elt {
  display: none;
}

/* Generate interpuncts */
.hlist dt:after {
  content: ": ";
}

.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;
}

/* Module:vgregion Preview Warning */
.vgr-preview-warning {
	font-style: italic;
	padding-left: 1.6em;
	margin-bottom: 0.5em;
	color: red;
}