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 | - Default width matches .ooo-infobox (300px) | ||
- | - Right-aligned by default; overrides for left/none/center | ||
- | - 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; /* | 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 | /* 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%; | 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; | border: 1px solid #a2a9b1; /* literal to avoid TemplateStyles warnings */ | ||
border-bottom: none; | border-bottom: none; | ||
border-radius: | border-radius: 12px 12px 0 0; /* match infobox radius */ | ||
} | } | ||
/* Active tab blends into the infobox | /* 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 | /* 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 | /* Mobile: unfloat and full width */ | ||
@media (max-width: 640px) { | @media (max-width: 640px) { | ||
.ooo-infobox-tabwrap, | .ooo-infobox-tabwrap, |