Jump to content

MediaWiki:Common.css: Difference between revisions

From λ LUMENWARD
No edit summary
No edit summary
Line 1: Line 1:
/* =========================================================
/* =========================================================
   TRUE center search (independent of left/right header content)
   Lumenward — minimal, stable global adjustments
   Vector 2022
   Skin: Vector 2022
   ========================================================= */
   ========================================================= */


/* Make header positioning context */
.mw-header {
  position: relative !important;
}


/* Absolutely center the search box */
/* ---------------------------------------------------------
.mw-header .vector-search-box,
  Text logo styling (λ LUMENWARD)
.mw-header #p-search {
  --------------------------------------------------------- */
  position: absolute !important;
.mw-logo,
  left: 50% !important;
.mw-logo a,
   transform: translateX(-50%) !important;
.mw-logo a:visited,
   width: min(720px, calc(100vw - 520px)) !important; /* leaves room for left+right UI */
.mw-logo a:hover,
  margin: 0 !important;
.mw-logo a:active {
   color: #000 !important;
   text-decoration: none !important;
}
}


/* Keep the search vertically aligned */
.mw-header .vector-search-box {
  top: 50% !important;
  transform: translate(-50%, -50%) !important;
}


/* Ensure user tools stay right and above any overlap */
/* ---------------------------------------------------------
.mw-header .vector-user-links,
  Remove "Powered by MediaWiki" everywhere
.mw-header .mw-header-user,
  --------------------------------------------------------- */
.mw-header .vector-user-menu,
#footer-poweredby,
.mw-header .vector-user-menu-container {
#footer-poweredbyico,
   position: relative !important;
.mw-poweredby {
  z-index: 2 !important;
   display: none !important;
}
}


/* Ensure logo/menu stays left and above any overlap */
.mw-header .mw-logo,
.mw-header .mw-header-start,
.mw-header .vector-header-start {
  position: relative !important;
  z-index: 2 !important;
}


@media (max-width: 900px) {
/* ---------------------------------------------------------
  .mw-header .vector-search-box,
   Search bar positioning
  .mw-header #p-search {
   - True center, nudged slightly right (~80px)
    position: static !important;
   - Does NOT affect login/user icons or logo
    transform: none !important;
   --------------------------------------------------------- */
    width: 100% !important;
    margin: 8px 0 0 !important;
  }
}
 
/* =========================================================
   Vector 2022: proper header layout
   Left (logo/menu) · Center (search) · Right (user/login)
   No absolute positioning
   ========================================================= */


/* Undo any previous absolute-centering rules */
/* Make header a positioning context */
.mw-header .vector-search-box,
.mw-header #p-search {
  position: static !important;
  left: auto !important;
  top: auto !important;
  transform: none !important;
  margin: 0 !important;
  width: auto !important;
}
 
/* Vector 2022 header container becomes a 3-zone flex row */
.mw-header .vector-header-container {
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}
 
/* Left zone */
.mw-header .vector-header-start {
  flex: 0 0 auto !important;
}
 
/* Middle zone: take remaining space and center contents */
.mw-header .vector-header-middle {
  flex: 1 1 auto !important;
  display: flex !important;
  justify-content: center !important;
}
 
/* Right zone: stick to far right */
.mw-header .vector-header-end {
  flex: 0 0 auto !important;
  margin-left: auto !important;
  display: flex !important;
  justify-content: flex-end !important;
}
 
/* Search sizing (centered) */
.mw-header .vector-header-middle .vector-search-box,
.mw-header .vector-header-middle #p-search {
  width: min(720px, 100%) !important;
}
 
/* =========================================================
  Center ONLY the search bar (do not affect header layout)
  Vector 2022 safe adjustment
  ========================================================= */
 
/* Target the search container only */
.mw-header .vector-search-box,
.mw-header #p-search {
  margin-left: auto !important;
  margin-right: auto !important;
  max-width: 720px !important;
  width: 100% !important;
}
 
/* =========================================================
  Center ONLY the search bar (override right-aligned container)
  ========================================================= */
 
/* Make the header a positioning context (doesn't move other items) */
.mw-header {
.mw-header {
   position: relative !important;
   position: relative !important;
}
}


/* Center the search element itself */
/* Position search bar */
.mw-header .vector-search-box,
.mw-header .vector-search-box,
.mw-header #p-search {
.mw-header #p-search {
   position: absolute !important;
   position: absolute !important;
   left: 50% !important;
   left: calc(50% + 80px) !important; /* ~5 spacebars to the right */
   top: 50% !important;
   top: 50% !important;
   transform: translate(-50%, -50%) !important;
   transform: translate(-50%, -50%) !important;
   width: min(720px, calc(100vw - 520px)) !important; /* leaves room for logo + user menu */
 
   width: min(720px, calc(100vw - 520px)) !important;
   margin: 0 !important;
   margin: 0 !important;
}
}


/* Small screens: revert to normal flow so nothing overlaps */
/* Mobile safety: revert to normal flow */
@media (max-width: 900px) {
@media (max-width: 900px) {
   .mw-header .vector-search-box,
   .mw-header .vector-search-box,
   .mw-header #p-search {
   .mw-header #p-search {
     position: static !important;
     position: static !important;
    left: auto !important;
    top: auto !important;
     transform: none !important;
     transform: none !important;
     width: 100% !important;
     width: 100% !important;
     margin: 15px 0 0 !important;
     margin: 12px 0 0 !important;
   }
   }
}
}
width: min(720px, calc(100vw - 620px)) !important;

Revision as of 19:29, 13 December 2025

/* =========================================================
   Lumenward — minimal, stable global adjustments
   Skin: Vector 2022
   ========================================================= */


/* ---------------------------------------------------------
   Text logo styling (λ LUMENWARD)
   --------------------------------------------------------- */
.mw-logo,
.mw-logo a,
.mw-logo a:visited,
.mw-logo a:hover,
.mw-logo a:active {
  color: #000 !important;
  text-decoration: none !important;
}


/* ---------------------------------------------------------
   Remove "Powered by MediaWiki" everywhere
   --------------------------------------------------------- */
#footer-poweredby,
#footer-poweredbyico,
.mw-poweredby {
  display: none !important;
}


/* ---------------------------------------------------------
   Search bar positioning
   - True center, nudged slightly right (~80px)
   - Does NOT affect login/user icons or logo
   --------------------------------------------------------- */

/* Make header a positioning context */
.mw-header {
  position: relative !important;
}

/* Position search bar */
.mw-header .vector-search-box,
.mw-header #p-search {
  position: absolute !important;
  left: calc(50% + 80px) !important; /* ~5 spacebars to the right */
  top: 50% !important;
  transform: translate(-50%, -50%) !important;

  width: min(720px, calc(100vw - 520px)) !important;
  margin: 0 !important;
}

/* Mobile safety: revert to normal flow */
@media (max-width: 900px) {
  .mw-header .vector-search-box,
  .mw-header #p-search {
    position: static !important;
    left: auto !important;
    top: auto !important;
    transform: none !important;

    width: 100% !important;
    margin: 12px 0 0 !important;
  }
}