Template:OOOInfoBoxTabber/styles.css: Difference between revisions

No edit summary
No edit summary
Line 1: Line 1:
/* OOO Infobox – Tabber wrapper (TemplateStyles safe)
/* OOO Infobox – Tabber wrapper (TemplateStyles safe)
   - Default floats right next to article text
   - Default width matches .ooo-infobox (300px)
   - Inherits skin tokens so it works in light/dark modes
   - Right-aligned by default; overrides for left/none/center
   - No fixed width: wrapper shrinks to the infobox (or to an inline width set by Lua)
   - Rounds/clips tab strip to blend with the infobox top corners
*/
*/


Line 9: Line 9:
   float: right;
   float: right;
   clear: right;
   clear: right;
   width: 300px; /* match .ooo-infobox default */
   width: 300px;                     /* match .ooo-infobox default */
   margin: 0 0 1em 1em; /* space from article text */
   margin: 0 0 1em 1em;
 
  /* blend tabs into the infobox with same corner radius */
  border-top-left-radius: 12px;    /* keep in sync with .ooo-infobox */
  border-top-right-radius: 12px;
  overflow: hidden;                /* clip any tab-strip line at corners */
}
}


/* Alignment overrides (module adds these when |align=left/none/center) */
/* Alignment overrides (module adds these classes) */
.ooo-infobox-tabwrap--left  { float: left;  clear: left;  margin: 0 1em 1em 0; }
.ooo-infobox-tabwrap--left  { float: left;  clear: left;  margin: 0 1em 1em 0; }
.ooo-infobox-tabwrap--none  { float: none;              margin: 0 0 1em 0; }
.ooo-infobox-tabwrap--none  { float: none;              margin: 0 0 1em 0; }
Line 22: Line 27:
   display: block;
   display: block;
   margin: 0 0 .5rem 0;
   margin: 0 0 .5rem 0;
   width: 100%;             /* respect wrapper width */
   width: 100%;
   box-sizing: border-box;
   box-sizing: border-box;
  border: 0;                        /* remove the horizontal line */
  padding: 0;
}
}


Line 32: Line 39:
   font-size: 90%;
   font-size: 90%;
   line-height: 1.2;
   line-height: 1.2;
  white-space: normal;              /* wrap long labels */
   padding: .25rem .5rem;
   padding: .25rem .5rem;
   margin-right: .25rem;
   margin-right: .25rem;
Line 38: Line 46:
   background: var(--background-color-neutral, #f5f5f5);
   background: var(--background-color-neutral, #f5f5f5);
   color: var(--color-base, #202122);
   color: var(--color-base, #202122);
   border: 1px solid #a2a9b1;   /* literal to avoid TemplateStyles color warning */
   border: 1px solid #a2a9b1;       /* literal to avoid TemplateStyles warnings */
   border-bottom: none;
   border-bottom: none;
   border-radius: 6px 6px 0 0;
   border-radius: 12px 12px 0 0;     /* match infobox radius */
}
}


/* Active tab blends into the infobox below */
/* Active tab blends into the infobox */
.ooo-infobox-tabwrap .tabber__tab--active {
.ooo-infobox-tabwrap .tabber__tab--active {
   background: var(--background-color-base, #ffffff);
   background: var(--background-color-base, #ffffff);
   color: var(--color-base, #202122);
   color: var(--color-base, #202122);
  margin-bottom: -1px;              /* overlap the infobox border to hide seam */
}
}


/* Tab panel: remove default padding/borders so it sits flush with the infobox */
/* Tab panels sit flush with the infobox */
.ooo-infobox-tabwrap .tabber__panel {
.ooo-infobox-tabwrap .tabber__panel {
   padding: 0;
   padding: 0;
Line 55: Line 64:
}
}


/* Mobile: unfloat and go full width */
/* Mobile: unfloat and full width */
@media (max-width: 640px) {
@media (max-width: 640px) {
   .ooo-infobox-tabwrap,
   .ooo-infobox-tabwrap,