MediaWiki:Common.css: Difference between revisions

No edit summary
No edit summary
Line 143: Line 143:


/* ==============================
/* ==============================
   INFOBOX REDESIGN (v2)
   INFOBOX
   ============================== */
   ============================== */


/* container */
/* container */
.infobox {
.infobox {
  position: relative;
   float: right;
   float: right;
   width: 300px;
  clear: right;
   margin: -2em 0 1em 1em;
   width: 280px;
   margin: 0 0 1em 1em;
  background: #f9f9f9;
  border: 1px solid #aaa;
   font-size: 90%;
   font-size: 90%;
   background: #fff;
   color: #000;
  border: 1px solid #b8d4f1;
   border-collapse: collapse;
  border-radius: 6px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  clear: none !important;
   border-collapse: collapse !important;
}
}


@media (max-width: 511px) {
@media (max-width: 600px) {
   .infobox {
   .infobox {
     float: none;
     float: none;
     margin: 0 0 1em 0;
     margin: 0 auto 1em auto;
     width: auto;
     width: 100%;
  }
}
 
@media (max-width: 337px) {
  .infobox {
    margin-left: -16px;
    margin-right: -16px;
    border-left: none;
    border-right: none;
   }
   }
}
}
Line 181: Line 169:
/* title */
/* title */
.infobox-title {
.infobox-title {
  background: #b0c4de;
   text-align: center;
   text-align: center;
   font-weight: bold;
   font-weight: bold;
   font-size: 120%;
   font-size: 110%;
  background: #3b82f6;
   padding: 4px;
  color: #fff;
   border-bottom: 1px solid #aaa;
   padding: 8px;
   border-radius: 4px 4px 0 0;
}
}


Line 193: Line 180:
.infobox-imagearea {
.infobox-imagearea {
   text-align: center;
   text-align: center;
  background: #fff;
   padding: 6px;
   padding: 6px;
  background: #fafcff;
   border-bottom: 1px solid #aaa;
   border-bottom: 1px solid #d5e4f6;
}
}


Line 201: Line 188:
   max-width: 100%;
   max-width: 100%;
   height: auto;
   height: auto;
  border-radius: 3px;
}
}


/* rows */
/* rows */
.infobox .infobox-rows {
.infobox-rows {
  display: table;
   width: 100%;
   width: 100%;
   border-collapse: collapse !important;
   border-collapse: collapse;
}
}


.infobox-rows tr {
.infobox-rows th,
   border-bottom: 1px solid #e6effb;
.infobox-rows td {
  padding: 3px 5px;
  vertical-align: top;
   border-bottom: 1px solid #ddd;
}
}


.infobox-rows tr:last-child {
  border-bottom: none;
}
.infobox-rows tr:nth-child(2n) {
  background-color: #f4f8ff;
}
/* labels (left column) */
.infobox-rows th {
.infobox-rows th {
   text-align: left;
   text-align: left;
   white-space: nowrap;
   font-weight: bold;
  color: #0d47a1;
  background-color: #f1f6ff;
  padding: 4px 6px;
   width: 35%;
   width: 35%;
   font-weight: 600;
   background: #f2f2f2;
  border-right: 1px solid #d8e5fb;
  vertical-align: middle;
}
}


/* values (right column) */
.infobox-rows td {
.infobox-rows td {
  padding: 4px 6px;
  line-height: 1.1em;
  vertical-align: middle;
  color: #222;
   background: #fff;
   background: #fff;
}
}


/* eliminate extra whitespace */
/* hover off for old-school simplicity */
.infobox td > div,
.infobox td > p {
  margin: 0 !important;
  padding: 0 !important;
  display: inline !important;
}
 
/* optional alternating hover for clarity */
.infobox-rows tr:hover {
.infobox-rows tr:hover {
   background-color: #e8f1ff;
   background: none;
}
}


/* footer / bottom text */
/* footer */
.infobox-footer {
.infobox-footer {
   text-align: center;
   text-align: center;
  color: #0d47a1;
  background: #e8f2ff;
  border-top: 1px solid #b8d4f1;
  padding: 5px;
   font-style: italic;
   font-style: italic;
   font-size: 90%;
   background: #f2f2f2;
}
  border-top: 1px solid #aaa;
 
  padding: 4px;
/* remove stray p spacing and cleanup */
   font-size: 85%;
.mw-parser-output > .infobox + p:empty,
.mw-parser-output > .infobox + p:has(> br:only-child) {
   display: none !important;
}
}


/* spacing fix */
.mw-parser-output > .infobox + p {
.mw-parser-output > .infobox + p {
   margin-top: 0 !important;
   margin-top: 0 !important;
}
/* debug hiding */
.history-json {
  display: none;
}
}