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) | ||
- | - Right by default; left/none/center overrides | ||
*/ | */ | ||
/* Wrapper */ | |||
.ooo-infobox-tabwrap { | .ooo-infobox-tabwrap { | ||
float: right; | float: right; | ||
clear: right; | clear: right; | ||
width: 300px; | width: 300px; /* keep in sync with .ooo-infobox */ | ||
margin: 0 0 1em 1em; | margin: 0 0 1em 1em; | ||
} | } | ||
/* | /* 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 | /* 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: | 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; | border: 0; /* hide any theme baseline */ | ||
background-image: none; | background-image: none; | ||
} | } | ||
/* | /* 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: | min-width: 7ch; /* avoid tiny pills with many tabs */ | ||
text-align: center; | text-align: center; | ||
white-space: normal; /* allow wrapping */ | |||
line-height: 1.2; | |||
font-weight: 700; | font-weight: 700; | ||
font-size: 90%; | font-size: 90%; | ||
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; | border: 1px solid #a2a9b1; /* literal to satisfy TemplateStyles */ | ||
border-bottom: none; | border-bottom: none; | ||
border-radius: 6px 6px 0 0; | border-radius: 6px 6px 0 0; | ||
} | } | ||
/* Active tab | /* 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: flush with the infobox */ | ||
.ooo-infobox-tabwrap .tabber__panel { | .ooo-infobox-tabwrap .tabber__panel { | ||
padding: 0; | padding: 0; | ||
Line 76: | Line 63: | ||
} | } | ||
/* | /* 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; | ||
} | } | ||
} | } |