MediaWiki:Common.css: Difference between revisions

From KSI Wiki
Jump to: navigation, search
mNo edit summary
mNo edit summary
Line 1: Line 1:
/* CSS placed here will be applied to all skins */
/* CSS placed here will be applied to all skins */


 
/* ===== Existing badge backgrounds ===== */
.HOF-Background {  
.HOF-Background {
background-image: url("http://wiki.ksiglobal.com/images/7/70/Hall_of_fame_bg.png");  
  background-image: url("http://wiki.ksiglobal.com/images/7/70/Hall_of_fame_bg.png");
width:250px;
  width: 250px;
height:75px;
  height: 75px;
}
}


.Red-Background {  
.Red-Background {
background-image: url("https://wiki.ksiglobal.com/images/a/a1/Red-Background.png");  
  background-image: url("https://wiki.ksiglobal.com/images/a/a1/Red-Background.png");
width:250px;
  width: 250px;
height:75px;
  height: 75px;
}
}


.Blue-Background {  
.Blue-Background {
background-image: url("https://wiki.ksiglobal.com/images/5/53/Blue_bg.png");  
  background-image: url("https://wiki.ksiglobal.com/images/5/53/Blue_bg.png");
width:250px;
  width: 250px;
height:75px;
  height: 75px;
}
}


.Green-Background {  
.Green-Background {
background-image: url("https://wiki.ksiglobal.com/images/b/b2/United_bg.png");  
  background-image: url("https://wiki.ksiglobal.com/images/b/b2/United_bg.png");
width:250px;
  width: 250px;
height:75px;
  height: 75px;
}
}


.AlignTop {
.AlignTop {
    display: inline-block;
  display: inline-block;
    vertical-align: top;
  vertical-align: top;
}
}


Line 34: Line 34:


.ksiprofile{
.ksiprofile{
   display:grid;
   display: grid;
   grid-template-columns: 1fr 340px;
   grid-template-columns: 1fr 340px;
   gap:18px;
   gap: 18px;
   align-items:start;
   align-items: start;
}
}


Line 44: Line 44:
}
}


/* Base card */
.ksicard{
.ksicard{
   background: rgba(255,255,255,0.03);
   background: rgba(255,255,255,0.03);
Line 53: Line 54:
}
}


/* Sticky infobox card */
@media (min-width: 901px){
@media (min-width: 901px){
   .ksisticky{ position: sticky; top: 76px; }
   .ksisticky{ position: sticky; top: 76px; }
Line 64: Line 66:
}
}


/* Optional: make images (awards/badges) feel modern on hover */
/* Subtle hover polish for images inside cards */
.ksicard img{
.ksicard img{
   border-radius: 10px;
   border-radius: 10px;
Line 74: Line 76:
}
}


/* Prevent infobox/table floats from breaking the sidebar grid */
/* ===== Sidebar behavior ===== */
.ksiside .floatright,
.ksiside table{
  float: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}


/* Sidebar: force clean vertical stacking */
/* Sidebar is a vertical stack */
.ksiside{
.ksiside{
   display: flex;
   display: flex;
   flex-direction: column;
   flex-direction: column;
   gap: 12px;
   gap: 10px;          /* tighter than before */
  margin: 0 !important;
  padding: 0 !important;
}
}
/* Badges/templates in sidebar: behave like normal blocks */
 
/* Each sidebar child is its own block; no floats; no weird positioning */
.ksiside > *{
.ksiside > *{
   display: block;
   display: block !important;
  width: 100%;
}
.ksiside .HOF-Background,
.ksiside .Red-Background,
.ksiside .Blue-Background,
.ksiside .Green-Background{
  position: static !important;
  float: none !important;
  margin: 0 !important;
}
/* Infobox in sidebar: prevent overflow and weird offsets */
.ksiside .infobox,
.ksiside .portable-infobox,
.ksiside table{
   width: 100% !important;
   width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
}
/* Make badge backgrounds feel like cards */
.ksiside .HOF-Background,
.ksiside .Red-Background,
.ksiside .Blue-Background,
.ksiside .Green-Background{
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
  overflow: hidden;
}
/* === HARD STOP: prevent sidebar overlap from floats/negative margins === */
.ksiside > *{
   clear: both !important;
   clear: both !important;
   float: none !important;
   float: none !important;
   position: relative !important;
   position: relative !important;
   z-index: 1 !important;
   z-index: 1 !important;
   margin: 0 0 12px 0 !important;
   margin: 0 !important;
  padding: 0 !important;
}
}


/* MediaWiki common wrappers that can float unexpectedly */
/* MediaWiki wrappers that sometimes float (kill them in sidebar) */
.ksiside .floatright,
.ksiside .floatright,
.ksiside .tright,
.ksiside .tright,
Line 136: Line 107:
   float: none !important;
   float: none !important;
   clear: both !important;
   clear: both !important;
   margin: 0 0 12px 0 !important;
   margin: 0 !important;
}
}


/* Make sure the infobox starts AFTER badges */
/* Sidebar cards: slightly tighter padding than main cards */
.ksiside .ksicard{
.ksiside .ksicard{
  padding: 10px 12px !important;
  margin: 0 !important; /* remove big vertical gaps between sidebar cards */
   clear: both !important;
   clear: both !important;
}
}
/* Tighten sidebar spacing */
 
.ksiside{
/* ===== Badges inside the badge card ===== */
   gap: 8px !important;
 
/* Put your badges into a clean centered stack */
.ksibadges{
  display: flex;
  flex-direction: column;
   gap: 10px;
  align-items: center; /* centers 250px-wide badges */
}
}


.ksiside > *{
/* Badge blocks: fixed size, centered, no extra margins */
  margin: 0 !important;
.ksibadges .HOF-Background,
  padding: 0 !important;
.ksibadges .Red-Background,
}
.ksibadges .Blue-Background,
/* Badge blocks: compact and consistent */
.ksibadges .Green-Background{
.ksiside .HOF-Background,
  display: block !important;
.ksiside .Red-Background,
.ksiside .Blue-Background,
.ksiside .Green-Background{
   width: 250px !important;
   width: 250px !important;
   height: 75px !important;
   height: 75px !important;
   margin: 0 auto !important;     /* center */
   margin: 0 !important;
   display: block !important;
   position: static !important;
  float: none !important;
 
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
  overflow: hidden;
}
}


/* If those badges contain text elements, stop them expanding spacing */
/* If badge templates output stray spacing, neutralize it inside badge card */
.ksiside .HOF-Background *,
.ksibadges p{
.ksiside .Red-Background *,
.ksiside .Blue-Background *,
.ksiside .Green-Background *{
   margin: 0 !important;
   margin: 0 !important;
   line-height: 1.1 !important;
}
.ksibadges br{
   display: none !important;
}
}


/* Sidebar card: less padding so it doesn't feel huge */
/* Tighten the gap between badge card and infobox card */
.ksiside .ksicard{
.ksiside .ksibadges{
  margin-bottom: 6px !important;
}
.ksiside .ksiprofilecard{
   margin-top: 0 !important;
   margin-top: 0 !important;
  padding: 10px 12px !important;
}
}


/* If the infobox is a table, remove its outer margin */
/* ===== Infobox containment ===== */
 
/* Prevent infobox/table widths from overflowing the sidebar */
.ksiside .infobox,
.ksiside .portable-infobox,
.ksiside table{
.ksiside table{
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
   margin: 0 !important;
   margin: 0 !important;
}
/* If your infobox uses table cells, keep it from creating extra spacing */
.ksiside table td,
.ksiside table th{
  vertical-align: top;
}
}

Revision as of 11:44, 2 January 2026

/* CSS placed here will be applied to all skins */

/* ===== Existing badge backgrounds ===== */
.HOF-Background {
  background-image: url("http://wiki.ksiglobal.com/images/7/70/Hall_of_fame_bg.png");
  width: 250px;
  height: 75px;
}

.Red-Background {
  background-image: url("https://wiki.ksiglobal.com/images/a/a1/Red-Background.png");
  width: 250px;
  height: 75px;
}

.Blue-Background {
  background-image: url("https://wiki.ksiglobal.com/images/5/53/Blue_bg.png");
  width: 250px;
  height: 75px;
}

.Green-Background {
  background-image: url("https://wiki.ksiglobal.com/images/b/b2/United_bg.png");
  width: 250px;
  height: 75px;
}

.AlignTop {
  display: inline-block;
  vertical-align: top;
}

/* ===== KSI Modern Profile Layout (DarkVector-safe) ===== */

.ksiprofile{
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 18px;
  align-items: start;
}

@media (max-width: 900px){
  .ksiprofile{ grid-template-columns: 1fr; }
}

/* Base card */
.ksicard{
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.10);
  border-radius: 14px;
  padding: 14px 16px;
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
  margin: 12px 0;
}

/* Sticky infobox card */
@media (min-width: 901px){
  .ksisticky{ position: sticky; top: 76px; }
}

/* Clean section headings inside cards */
.ksicard h2{
  border-bottom: 0 !important;
  margin-top: 0.2em;
  padding-bottom: 6px;
}

/* Subtle hover polish for images inside cards */
.ksicard img{
  border-radius: 10px;
  transition: transform 120ms ease, box-shadow 120ms ease;
}
.ksicard img:hover{
  transform: scale(1.04);
  box-shadow: 0 10px 18px rgba(0,0,0,0.35);
}

/* ===== Sidebar behavior ===== */

/* Sidebar is a vertical stack */
.ksiside{
  display: flex;
  flex-direction: column;
  gap: 10px;           /* tighter than before */
  margin: 0 !important;
  padding: 0 !important;
}

/* Each sidebar child is its own block; no floats; no weird positioning */
.ksiside > *{
  display: block !important;
  width: 100% !important;
  clear: both !important;
  float: none !important;
  position: relative !important;
  z-index: 1 !important;
  margin: 0 !important;
  padding: 0 !important;
}

/* MediaWiki wrappers that sometimes float (kill them in sidebar) */
.ksiside .floatright,
.ksiside .tright,
.ksiside .thumb,
.ksiside .thumbinner,
.ksiside .mw-halign-right{
  float: none !important;
  clear: both !important;
  margin: 0 !important;
}

/* Sidebar cards: slightly tighter padding than main cards */
.ksiside .ksicard{
  padding: 10px 12px !important;
  margin: 0 !important; /* remove big vertical gaps between sidebar cards */
  clear: both !important;
}

/* ===== Badges inside the badge card ===== */

/* Put your badges into a clean centered stack */
.ksibadges{
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: center; /* centers 250px-wide badges */
}

/* Badge blocks: fixed size, centered, no extra margins */
.ksibadges .HOF-Background,
.ksibadges .Red-Background,
.ksibadges .Blue-Background,
.ksibadges .Green-Background{
  display: block !important;
  width: 250px !important;
  height: 75px !important;
  margin: 0 !important;
  position: static !important;
  float: none !important;

  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow: 0 10px 24px rgba(0,0,0,0.22);
  overflow: hidden;
}

/* If badge templates output stray spacing, neutralize it inside badge card */
.ksibadges p{
  margin: 0 !important;
}
.ksibadges br{
  display: none !important;
}

/* Tighten the gap between badge card and infobox card */
.ksiside .ksibadges{
  margin-bottom: 6px !important;
}
.ksiside .ksiprofilecard{
  margin-top: 0 !important;
}

/* ===== Infobox containment ===== */

/* Prevent infobox/table widths from overflowing the sidebar */
.ksiside .infobox,
.ksiside .portable-infobox,
.ksiside table{
  width: 100% !important;
  max-width: 100% !important;
  box-sizing: border-box;
  margin: 0 !important;
}

/* If your infobox uses table cells, keep it from creating extra spacing */
.ksiside table td,
.ksiside table th{
  vertical-align: top;
}