Jump to content

MediaWiki:Common.css: Difference between revisions

From λ LUMENWARD
No edit summary
No edit summary
Line 1: Line 1:
/* SAFE BASELINE */
/* Text logo black */
.mw-logo,
.mw-logo a,
.mw-logo a:visited,
.mw-logo a:hover,
.mw-logo a:active {
  color: #000 !important;
}
.mw-logo a:hover { text-decoration: none !important; }
/* Remove Powered by MediaWiki safely */
#footer-poweredby,
#footer-poweredbyico,
.mw-poweredby {
  display: none !important;
}
/* =========================================================
/* =========================================================
   Vector 2022 header layout
   TRUE center search (independent of left/right header content)
   Logo left · Search centered · User tools right
   Vector 2022
   ========================================================= */
   ========================================================= */


/* Turn header into a controlled 3-column grid */
/* Make header positioning context */
.mw-header {
.mw-header {
   display: grid !important;
   position: relative !important;
  grid-template-columns: auto minmax(300px, 720px) auto !important;
  align-items: center !important;
  column-gap: 16px !important;
}
}


/* Logo stays on the left */
/* Absolutely center the search box */
.mw-header .mw-logo {
.mw-header .vector-search-box,
   justify-self: start !important;
.mw-header #p-search {
   position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(720px, calc(100vw - 520px)) !important; /* leaves room for left+right UI */
  margin: 0 !important;
}
}


/* Search is centered */
/* Keep the search vertically aligned */
.mw-header #p-search,
.mw-header .vector-search-box {
.mw-header .vector-search-box {
   justify-self: center !important;
   top: 50% !important;
   width: 100% !important;
   transform: translate(-50%, -50%) !important;
}
}


/* User / account tools forced to the right */
/* Ensure user tools stay right and above any overlap */
.mw-header .vector-user-links,
.mw-header .vector-user-links,
.mw-header .mw-header-user,
.mw-header .mw-header-user,
.mw-header .vector-user-menu,
.mw-header .vector-user-menu,
.mw-header .vector-user-menu-container {
.mw-header .vector-user-menu-container {
   justify-self: end !important;
   position: relative !important;
   margin-left: auto !important;
  z-index: 2 !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;
}
}

Revision as of 19:16, 13 December 2025

/* =========================================================
   TRUE center search (independent of left/right header content)
   Vector 2022
   ========================================================= */

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

/* Absolutely center the search box */
.mw-header .vector-search-box,
.mw-header #p-search {
  position: absolute !important;
  left: 50% !important;
  transform: translateX(-50%) !important;
  width: min(720px, calc(100vw - 520px)) !important; /* leaves room for left+right UI */
  margin: 0 !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,
.mw-header .mw-header-user,
.mw-header .vector-user-menu,
.mw-header .vector-user-menu-container {
  position: relative !important;
  z-index: 2 !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;
}