Template:OOOInfoBoxTabber/styles.css

Revision as of 21:13, 12 October 2025 by T-Bone (talk | contribs)
/* OOO Infobox — Tabber wrapper (full-width wrapping tabs, minimal) */

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

/* Alignment overrides */
.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--center { float:none; display:block; margin:0 auto 1em; }

/* Tab strip: full-width justified rows + wrap; kill baseline */
.ooo-infobox-tabwrap .tabber__tabs {
  display: block;
  width: 100%;
  box-sizing: border-box;
  margin: 0 0 .5rem 0;
  border: 0;
  background-image: none;

  text-align: justify;          /* stretch each line to full width */
  text-align-last: left;        /* last line stays left-aligned */
}

/* Force justification on each line */
.ooo-infobox-tabwrap .tabber__tabs::after {
  content: "";
  display: inline-block;
  width: 100%;
  height: 0;
}

/* Tabs: inline pills; allow label wrapping; no explicit margins */
.ooo-infobox-tabwrap .tabber__tab {
  display: inline-block;
  vertical-align: top;
  min-width: 6ch;
  white-space: normal;
  text-align: center;
  line-height: 1.2;

  font-weight: 700;
  font-size: 90%;
  padding: .25rem .5rem;
  text-decoration: none;

  background: var(--background-color-neutral, #f5f5f5);
  color: var(--color-base, #202122);
  border: 1px solid #a2a9b1;    /* literal to satisfy TemplateStyles */
  border-bottom: none;
  border-radius: 12px 12px 0 0;
}

/* Active tab: sit flush with panel */
.ooo-infobox-tabwrap .tabber__tab--active {
  background: var(--background-color-base, #ffffff);
  color: var(--color-base, #202122);
  margin-bottom: -1px;
}

/* Panels: flush with infobox */
.ooo-infobox-tabwrap .tabber__panel {
  padding: 0;
  border: 0;
  background: transparent;
}

/* Mobile: unfloat and full width */
@media (max-width: 640px) {
  .ooo-infobox-tabwrap,
  .ooo-infobox-tabwrap--left,
  .ooo-infobox-tabwrap--none,
  .ooo-infobox-tabwrap--center {
    float: none;
    width: 100%;
    margin: 0 0 1em 0;
  }
}