Template:OOOInfoBoxTabber/styles.css: Difference between revisions

No edit summary
Tag: Reverted
No edit summary
Tag: Reverted
Line 1: Line 1:
/* OOO Infobox – Tabber wrapper
/* OOO Infobox – Tabber wrapper (full-width, wrapping tabs)
   - Default width matches .ooo-infobox (300px)
   - Default width matches .ooo-infobox (300px)
   - Tabs fill full width (equal columns)
   - Right by default; left/none/center overrides
  - Hides any separator line drawn by themes/extensions
*/
*/


/* Wrapper */
.ooo-infobox-tabwrap {
.ooo-infobox-tabwrap {
   float: right;
   float: right;
   clear: right;
   clear: right;
   width: 300px;                 /* keep in sync with .ooo-infobox */
   width: 300px;                 /* keep in sync with .ooo-infobox */
   margin: 0 0 1em 1em;
   margin: 0 0 1em 1em;
}
}


/* alignment overrides (set by module |align=...) */
/* Alignment overrides (set by module |align=...) */
.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; }
.ooo-infobox-tabwrap--center { float:none; display:block; margin:0 auto 1em; }
.ooo-infobox-tabwrap--center { float:none; display:block; margin:0 auto 1em; }


/* TAB STRIP full-width equal tabs */
/* TAB STRIP: full-width rows, equal columns per row, wraps as needed */
.ooo-infobox-tabwrap .tabber__tabs {
.ooo-infobox-tabwrap .tabber__tabs {
   display: flex;
   display: flex;
   flex-wrap: nowrap;           /* keep in one row; change to wrap if you prefer */
   flex-wrap: wrap;
   gap: .25rem;
   gap: .25rem;
   margin: 0 0 .5rem 0;
   margin: 0 0 .5rem 0;
   width: 100%;
   width: 100%;
   box-sizing: border-box;
   box-sizing: border-box;
   border: 0;                   /* kill any normal border */
   border: 0;                     /* hide any theme baseline */
   background-image: none;       /* kill image-based lines */
   background-image: none;
 
  position: relative;          /* for the overlay below */
}
 
/* Overlay to MASK any stubborn baseline drawn by skins */
.ooo-infobox-tabwrap .tabber__tabs::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -1px;                /* sits on top of baseline */
  height: 2px;                  /* just enough to cover */
  background: var(--background-color-base, #ffffff); /* page bg (handles dark) */
}
}


/* Individual tabs – make them share the width equally */
/* TABS: share row width equally; labels can wrap */
.ooo-infobox-tabwrap .tabber__tab {
.ooo-infobox-tabwrap .tabber__tab {
   flex: 1 1 0;
   flex: 1 1 0;                   /* equal width within each row */
   min-width: 0;                 /* allow shrinking without overflow */
   min-width: 7ch;               /* avoid tiny pills with many tabs */
   text-align: center;
   text-align: center;
  white-space: normal;          /* allow wrapping */
  line-height: 1.2;


  display: inline-block;
   font-weight: 700;
   font-weight: 700;
   font-size: 90%;
   font-size: 90%;
  line-height: 1.2;
  white-space: normal;
   padding: .2rem .5rem;
   padding: .2rem .5rem;
   text-decoration: none;
   text-decoration: none;
Line 57: Line 44:
   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 avoids TemplateStyles warnings */
   border: 1px solid #a2a9b1;     /* literal to satisfy TemplateStyles */
   border-bottom: none;         /* blends into panel */
   border-bottom: none;
   border-radius: 6px 6px 0 0;
   border-radius: 6px 6px 0 0;
}
}


/* Active tab blends; slight overlap hides any seam with the panel */
/* Active tab: sit flush with the panel (no seam) */
.ooo-infobox-tabwrap .tabber__tab--active {
.ooo-infobox-tabwrap .tabber__tab--active {
   background: var(--background-color-base, #ffffff);
   background: var(--background-color-base, #ffffff);
Line 69: Line 56:
}
}


/* Panels */
/* PANELS: flush with the infobox */
.ooo-infobox-tabwrap .tabber__panel {
.ooo-infobox-tabwrap .tabber__panel {
   padding: 0;
   padding: 0;
Line 76: Line 63:
}
}


/* MOBILE */
/* Mobile: unfloat and full width */
@media (max-width: 640px) {
@media (max-width: 640px) {
   .ooo-infobox-tabwrap,
   .ooo-infobox-tabwrap,
Line 86: Line 73:
     margin: 0 0 1em 0;
     margin: 0 0 1em 0;
   }
   }
  /* on mobile you might prefer wrapping instead of equal-width squeeze: */
  .ooo-infobox-tabwrap .tabber__tabs { flex-wrap: wrap; }
  .ooo-infobox-tabwrap .tabber__tab { flex: 1 1 auto; }
}
}