MediaWiki:Common.css: Difference between revisions

No edit summary
Undo revision 321 by CaptainChris (talk)
Tag: Undo
 
(25 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* ==============================
/* Main page layout */
  GLOBAL LAYOUT / PAGE STYLES
  ============================== */
 
/* Base page container */
.mp-container {
.mp-container {
   display: flex;
   display: flex;
   align-items: flex-start;
   align-items: flex-start;
   gap: 20px;
   gap: 20px;
  /* keep everything inside the wiki content width */
   box-sizing: border-box;
   box-sizing: border-box;
}
}


/* Left column fills remaining space */
.mp-left {
.mp-left {
   flex: 1 1 auto;
   flex: 1 1 auto;
   min-width: 0; /* prevents weird overflow with long content */
   min-width: 0;
}
}


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


/* Make cards/embed inside the sidebar not hang off the edge */
.mp-right > * {
.mp-right > * {
   width: 100%;
   width: 100%;
}
}


/* Responsive: stack on narrow screens */
@media (max-width: 900px) {
@media (max-width: 900px) {
   .mp-container {
   .mp-container {
Line 47: Line 46:
}
}


/* Contribute button */
/* ==============================
  CONTRIBUTION CTA BUTTON
  ============================== */
 
.wp-contrib-cta {
.wp-contrib-cta {
   display: flex;
   display: flex;
Line 55: Line 57:


.wp-contrib-cta__btn {
.wp-contrib-cta__btn {
  /* layout */
   display: flex;
   display: flex;
   align-items: center;
   align-items: center;
   justify-content: center; /* centers the label */
   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;
  /* vibe */
   background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
   background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
   color: #fff;
   color: #fff;
Line 72: 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 90: 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 96: 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 113: Line 110:
}
}


/* smooth arrow nudge on hover (respects reduced motion) */
@media (prefers-reduced-motion: no-preference) {
@media (prefers-reduced-motion: no-preference) {
   .wp-contrib-cta__btn:hover .wp-contrib-cta__arrow {
   .wp-contrib-cta__btn:hover .wp-contrib-cta__arrow {
Line 121: Line 117:
}
}


/* dark mode-ish pages (if your skin flips bg), keep contrast decent */
@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 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;
}
}