MediaWiki:Common.css: Difference between revisions

From WikiPhone
Jump to navigation Jump to search
No edit summary
Undo revision 321 by CaptainChris (talk)
Tag: Undo
 
(15 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* ==============================
  GLOBAL LAYOUT / PAGE STYLES
  ============================== */
 
/* Base page container */
.mp-container {
.mp-container {
   display: flex;
   display: flex;
Line 14: Line 18:
/* Right sidebar */
/* Right sidebar */
.mp-right {
.mp-right {
   flex: 0 0 320px;        
   flex: 0 0 320px;
   max-width: 100%;
   max-width: 100%;
   box-sizing: border-box;
   box-sizing: border-box;
Line 41: Line 45:
   }
   }
}
}
/* ==============================
  CONTRIBUTION CTA BUTTON
  ============================== */


.wp-contrib-cta {
.wp-contrib-cta {
Line 48: Line 56:
}
}


  /* layout */
.wp-contrib-cta__btn {
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   justify-content: center;  
   justify-content: center;
   gap: 0.75rem;
   gap: 0.75rem;
   width: min(100%, 28rem);
   width: min(100%, 28rem);
   padding: 0.9rem 1.2rem;
   padding: 0.9rem 1.2rem;
   background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
   background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
   color: #fff;
   color: #fff;
Line 64: Line 71:
   box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35),
   box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35),
               0 2px 6px rgba(0, 0, 0, 0.15);
               0 2px 6px rgba(0, 0, 0, 0.15);
   border: 1px solid rgba(255,255,255,0.18);
   border: 1px solid rgba(255, 255, 255, 0.18);
   transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
   transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}
}
Line 82: Line 89:


.wp-contrib-cta__btn:focus-visible {
.wp-contrib-cta__btn:focus-visible {
   outline: 3px solid #a5b4fc; /* soft indigo focus ring */
   outline: 3px solid #a5b4fc;
   outline-offset: 3px;
   outline-offset: 3px;
}
}
Line 88: Line 95:
.wp-contrib-cta__icon,
.wp-contrib-cta__icon,
.wp-contrib-cta__arrow {
.wp-contrib-cta__arrow {
  /* fixed space so the label stays visually centered,
    even with icons on both sides */
   width: 1.5em;
   width: 1.5em;
   height: 1.5em;
   height: 1.5em;
Line 114: Line 119:
@media (prefers-color-scheme: dark) {
@media (prefers-color-scheme: dark) {
   .wp-contrib-cta__btn {
   .wp-contrib-cta__btn {
     border-color: rgba(255,255,255,0.22);
     border-color: rgba(255, 255, 255, 0.22);
   }
   }
}
}
/* ==============================
  MAIN PAGE HEADING HIDES
  ============================== */


body.page-Main_Page #firstHeading,
body.page-Main_Page #firstHeading,
body.page-Main_Page .firstHeading,
body.page-Main_Page .firstHeading,
body.page-Main_Page h1.firstHeading {
body.page-Main_Page h1.firstHeading {
    display: none !important;
  display: none !important;
}
}


Line 127: Line 136:
body.page-Main_Page .mw-body h1,
body.page-Main_Page .mw-body h1,
body.page-Main_Page #contentSub {
body.page-Main_Page #contentSub {
    display: none !important;
  display: none !important;
    margin: 0 !important;
  margin: 0 !important;
    padding: 0 !important;
  padding: 0 !important;
    border: none !important;
  border: none !important;
}
}


/* [[Template:Infobox]], [[Template:Infobox row]] */
/* ==============================
  INFOBOX
  ============================== */
 
.infobox {
.infobox {
position: relative;
  float: right;
float: right;
  clear: right;
margin: -2em 0 1em 1em; /* pull upward to remove top gap */
  width: 280px;
width: 300px;
  margin: 0 0 1em 1em;
font-size: 90%;
  background: #f9f9f9;
background: #ffffff;
  border: 1px solid #aaa;
border: 1px solid #b8d4f1; /* soft blue border */
  font-size: 90%;
padding: 2px;
  color: #000;
overflow: hidden; /* fix weird float spacing */
  border-collapse: collapse;
box-shadow: 0 1px 3px rgba(0, 50, 100, 0.1);
border-radius: 4px;
clear: none !important; /* prevent forced drop below title */
z-index: 1; /* makes sure it stacks above content if overlapping slightly */
}
}


@media all and (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 all and (max-width: 337px) {
.infobox {
margin-left: -16px;
margin-right: -16px;
border-left: none;
border-right: none;
}
}
 
/* optional: specific fix for MW heading float glitch */
.mw-body-content > .infobox {
margin-top: -2em !important;
}
#firstHeading + .infobox {
margin-top: -2em !important;
position: relative;
top: -0.5em;
}
}


/* --- title --- */
/* title */
.infobox-title {
.infobox-title {
background: #3b82f6; /* bright medium blue */
  background: #b0c4de;
color: #ffffff;
  text-align: center;
padding-top: 8px;
  font-weight: bold;
padding-bottom: 8px;
  font-size: 110%;
border-radius: 2px 2px 0 0;
  padding: 3px 4px;
}
  border-bottom: 1px solid #aaa;
 
.infobox > .infobox-title {
font-weight: bold;
text-align: center;
font-size: 120%;
border: none;
}
}


/* --- lists + layout --- */
/* image */
.infobox th + td > ul {
list-style: none;
margin-left: unset;
}
 
/* --- image area --- */
.infobox-imagearea {
.infobox-imagearea {
text-align: center;
  text-align: center;
padding: 4px;
  background: #fff;
  padding: 4px;
  border-bottom: 1px solid #aaa;
}
}


.infobox-imagearea > div:not(:first-child) {
.infobox-imagearea img {
padding-top: 1em;
  max-width: 100%;
  height: auto;
}
}


/* horizontally center animated images */
/* rows */
.mw-body-content .infobox-imagearea .animated {
.infobox-rows {
display: inline-flex;
  width: 100%;
align-items: center;
  border-collapse: collapse;
}
}


/* infobox gallery tweaks */
.infobox-rows th,
.infobox-imagearea li.gallerybox div.thumb {
.infobox-rows td {
background: none;
  padding: 2px 5px; /* tighter spacing */
border: none;
  vertical-align: top;
margin: 0;
  border-bottom: 1px solid #ddd;
}
}


.infobox-imagearea ul.gallery,
.infobox-rows th {
.infobox-imagearea li.gallerybox,
  text-align: left;
.infobox-imagearea li.gallerybox div.thumb > div {
  font-weight: bold;
margin: 0 !important;
  width: 35%;
  background: #f2f2f2;
}
}


.infobox-imagearea li.gallerybox div.gallerytext {
.infobox-rows td {
font-weight: bold;
  background: #fff;
font-size: 100%;
padding: 0;
}
}


/* --- tabber tweaks --- */
/* footer */
.infobox-imagearea .tabber .tabbertab,
.infobox-footer {
.infobox-imagearea ul.tabbernav li a,
  text-align: center;
.infobox-imagearea ul.tabbernav li.tabberactive a {
  font-style: italic;
background: none;
  background: #f2f2f2;
border: none;
  border-top: 1px solid #aaa;
  padding: 3px;
  font-size: 85%;
}
}


.infobox-imagearea ul.tabbernav {
/* spacing fix */
font: inherit;
.mw-parser-output > .infobox + p {
font-size: 100%;
  margin-top: 0 !important;
}
}


.infobox-imagearea ul.tabbernav li a:hover,
.infobox td p:empty,
.infobox-imagearea ul.tabbernav li.tabberactive a:hover {
.infobox td p:has(br) {
color: #0d47a1; /* deep blue hover */
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}
}


.infobox-imagearea ul.tabbernav > li {
.infobox-section th {
margin-bottom: 5px;
  background: #b0c4de !important;
padding: 0;
  color: #000;
}
  text-align: center;
 
  font-weight: bold;
.infobox-imagearea ul.tabbernav > li > a {
  border-bottom: 1px solid #aaa;
color: #2763c4; /* standard blue tab text */
  padding: 4px;
padding-bottom: 1px;
display: block;
}
 
/* prevent tab text jump */
.infobox-imagearea ul.tabbernav > li > a::before {
display: block;
content: attr(alt);
font-weight: bold;
height: 0;
color: transparent;
overflow: hidden;
visibility: hidden;
}
 
.infobox-imagearea ul.tabbernav > li.tabberactive {
border: none;
}
 
.infobox-imagearea ul.tabbernav > li.tabberactive > a {
font-weight: bold;
border-bottom: 2px solid #3b82f6; /* blue active underline */
color: #1e40af; /* darker blue active text */
}
 
/* --- rows --- */
.infobox .infobox-rows {
display: table;
margin: 0 !important;
width: 100% !important;
border-collapse: collapse !important;
border-spacing: 0;
}
 
.infobox-rows tr:nth-child(2n) {
background-color: #f0f7ff; /* light blue alternating rows */
}
 
.infobox-rows > tbody > tr > th {
text-align: left;
white-space: nowrap;
color: #0d47a1;
}
 
.mw-body-content .infobox-rows p {
margin: 0;
}
 
/* merge adjacent dls */
.infobox-rows dl + dl {
margin-top: -0.4em;
}
 
.infobox-rows dl:last-child {
margin-bottom: 0.2em;
}
 
/* --- footer --- */
.infobox-footer {
text-align: center;
color: #0d47a1;
background: #e8f2ff;
border-top: 1px solid #b8d4f1;
padding: 4px;
font-style: italic;
}
 
/* hide debug JSON */
.history-json {
display: none;
}
}


/* remove Vector padding that causes gap above first floated element */
.infobox .infobox-section{
.vector-body,
  background: var(--quaternary, #5865f2);
#bodyContent {
  color:#fff;
   padding-top: 0 !important;
  text-align:left;
   padding:.35em .6em;
  font-weight:600;
}
}


.mw-body-content {
.infobox .infobox-section{
   margin-top: 0 !important;
   display:block;
   padding-top: 0 !important;
  background: var(--quaternary, #5865f2);
}
  color:#fff;
 
   padding:.4em .6em;
/* make sure the infobox stays snug under title */
  font-weight:600;
.mw-body-content > .infobox {
   border-radius:4px;
   margin-top: 0 !important;
   margin:.5em 0;
   float: right;
}
}

Latest revision as of 21:33, 10 November 2025

/* ==============================
   GLOBAL LAYOUT / PAGE STYLES
   ============================== */

/* Base page container */
.mp-container {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  box-sizing: border-box;
}

.mp-left {
  flex: 1 1 auto;
  min-width: 0;
}

/* Right sidebar */
.mp-right {
  flex: 0 0 320px;
  max-width: 100%;
  box-sizing: border-box;
  border-left: 1px solid #e0e0e0;
  padding-left: 16px;
  margin-left: 4px;
}

.mp-right > * {
  width: 100%;
}

@media (max-width: 900px) {
  .mp-container {
    flex-direction: column;
  }
  .mp-right {
    flex: none;
    width: 100%;
    border-left: 0;
    border-top: 1px solid #e0e0e0;
    padding-left: 0;
    padding-top: 12px;
    margin-left: 0;
    margin-top: 12px;
  }
}

/* ==============================
   CONTRIBUTION CTA BUTTON
   ============================== */

.wp-contrib-cta {
  display: flex;
  justify-content: center;
  margin: 1rem 0;
}

.wp-contrib-cta__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  width: min(100%, 28rem);
  padding: 0.9rem 1.2rem;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #fff;
  border-radius: 999px;
  font-weight: 700;
  font-size: clamp(14px, 2.8vw, 18px);
  text-decoration: none;
  box-shadow: 0 10px 25px rgba(37, 99, 235, 0.35),
              0 2px 6px rgba(0, 0, 0, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.18);
  transition: transform 120ms ease, box-shadow 120ms ease, filter 120ms ease;
}

.wp-contrib-cta__btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(37, 99, 235, 0.45),
              0 4px 10px rgba(0, 0, 0, 0.18);
  filter: brightness(1.03);
}

.wp-contrib-cta__btn:active {
  transform: translateY(0);
  box-shadow: 0 6px 18px rgba(37, 99, 235, 0.35),
              0 2px 6px rgba(0, 0, 0, 0.14);
}

.wp-contrib-cta__btn:focus-visible {
  outline: 3px solid #a5b4fc;
  outline-offset: 3px;
}

.wp-contrib-cta__icon,
.wp-contrib-cta__arrow {
  width: 1.5em;
  height: 1.5em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 1.5em;
  line-height: 1;
}

.wp-contrib-cta__text {
  text-align: center;
  flex: 0 1 auto;
  line-height: 1.2;
}

@media (prefers-reduced-motion: no-preference) {
  .wp-contrib-cta__btn:hover .wp-contrib-cta__arrow {
    transform: translateX(2px);
    transition: transform 120ms ease;
  }
}

@media (prefers-color-scheme: dark) {
  .wp-contrib-cta__btn {
    border-color: rgba(255, 255, 255, 0.22);
  }
}

/* ==============================
   MAIN PAGE HEADING HIDES
   ============================== */

body.page-Main_Page #firstHeading,
body.page-Main_Page .firstHeading,
body.page-Main_Page h1.firstHeading {
  display: none !important;
}

body.page-Main_Page #siteSub,
body.page-Main_Page .mw-body h1,
body.page-Main_Page #contentSub {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: none !important;
}

/* ==============================
   INFOBOX
   ============================== */

.infobox {
  float: right;
  clear: right;
  width: 280px;
  margin: 0 0 1em 1em;
  background: #f9f9f9;
  border: 1px solid #aaa;
  font-size: 90%;
  color: #000;
  border-collapse: collapse;
}

@media (max-width: 600px) {
  .infobox {
    float: none;
    margin: 0 auto 1em auto;
    width: 100%;
  }
}

/* title */
.infobox-title {
  background: #b0c4de;
  text-align: center;
  font-weight: bold;
  font-size: 110%;
  padding: 3px 4px;
  border-bottom: 1px solid #aaa;
}

/* image */
.infobox-imagearea {
  text-align: center;
  background: #fff;
  padding: 4px;
  border-bottom: 1px solid #aaa;
}

.infobox-imagearea img {
  max-width: 100%;
  height: auto;
}

/* rows */
.infobox-rows {
  width: 100%;
  border-collapse: collapse;
}

.infobox-rows th,
.infobox-rows td {
  padding: 2px 5px; /* tighter spacing */
  vertical-align: top;
  border-bottom: 1px solid #ddd;
}

.infobox-rows th {
  text-align: left;
  font-weight: bold;
  width: 35%;
  background: #f2f2f2;
}

.infobox-rows td {
  background: #fff;
}

/* footer */
.infobox-footer {
  text-align: center;
  font-style: italic;
  background: #f2f2f2;
  border-top: 1px solid #aaa;
  padding: 3px;
  font-size: 85%;
}

/* spacing fix */
.mw-parser-output > .infobox + p {
  margin-top: 0 !important;
}

.infobox td p:empty,
.infobox td p:has(br) {
  display: none !important;
  margin: 0 !important;
  padding: 0 !important;
}

.infobox-section th {
  background: #b0c4de !important;
  color: #000;
  text-align: center;
  font-weight: bold;
  border-bottom: 1px solid #aaa;
  padding: 4px;
}

.infobox .infobox-section{
  background: var(--quaternary, #5865f2);
  color:#fff;
  text-align:left;
  padding:.35em .6em;
  font-weight:600;
}

.infobox .infobox-section{
  display:block;
  background: var(--quaternary, #5865f2);
  color:#fff;
  padding:.4em .6em;
  font-weight:600;
  border-radius:4px;
  margin:.5em 0;
}