MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
(Further tweaks)
(Added unbulleted lists and vgregion preview warning CSS)
 
(4 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 */
.action-view.page-Main_Page #siteSub, .action-submit.page-Main_Page #siteSub,
.action-view.page-Main_Page #contentSub, .action-submit.page-Main_Page #contentSub,
.action-view.page-Main_Page .firstHeading, .action-submit.page-Main_Page .firstHeading {
  display: none;
}
.text-bottomline {
  border-bottom-style: solid;
  border-bottom-width: 1px;
  border-bottom-color: #a2a9b1;
}
#disclaimer-box {
  border: 1px solid #eaecf0;
  padding: 1em;
  background-color: #f8f9fa;
}


/* Add styling for kbd HTML tag */
/* Add styling for kbd HTML tag */
Line 41: Line 22:


kbd:hover, kbd:focus {
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);
  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);
  transform: translateY(2px);
}
}


kbd:active {
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);
  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);  
  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;
}
}

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