Template:OOOInfoBoxTabber/styles.css: Difference between revisions
No edit summary |
No edit summary |
||
Line 1: | Line 1: | ||
/* OOO Infobox — Tabber wrapper (full-width | /* OOO Infobox — Tabber wrapper (full-width lines, neat wrap) */ | ||
/* Wrapper (default right) */ | /* Wrapper (default right) */ | ||
Line 14: | Line 14: | ||
.ooo-infobox-tabwrap--center { float:none; display:block; margin:0 auto 1em; } | .ooo-infobox-tabwrap--center { float:none; display:block; margin:0 auto 1em; } | ||
/* | /* Tabs row: full-width per line, tidy wrap, no baseline */ | ||
.ooo-infobox-tabwrap .tabber__tabs { | .ooo-infobox-tabwrap .tabber__tabs { | ||
display: | display: flex; | ||
flex-wrap: wrap; | |||
column-gap: .25rem; /* spacing between pills */ | |||
row-gap: .25rem; | |||
justify-content: space-between; /* stretch each line to full width */ | |||
margin: 0 0 .25rem 0; /* tighter spacing above the box */ | |||
width: 100%; | width: 100%; | ||
box-sizing: border-box; | box-sizing: border-box; | ||
border: 0; | border: 0; | ||
background-image: none; | background-image: none; | ||
} | } | ||
/* | /* Filler flex item so the LAST line stays left-aligned (no awkward stretch) */ | ||
.ooo-infobox-tabwrap .tabber__tabs::after { | .ooo-infobox-tabwrap .tabber__tabs::after { | ||
content: ""; | content: ""; | ||
flex: 999 0 0; | |||
} | } | ||
/* | /* Pills */ | ||
.ooo-infobox-tabwrap .tabber__tab { | .ooo-infobox-tabwrap .tabber__tab { | ||
flex: 0 1 auto; /* natural width; can shrink a bit if needed */ | |||
min-width: 4ch; /* was 6ch; smaller so 5 short tabs fit a row */ | |||
min-width: 6ch; | white-space: normal; /* allow wrapping on long labels */ | ||
white-space: normal; | |||
text-align: center; | text-align: center; | ||
line-height: 1.2; | line-height: 1.2; | ||
Line 56: | Line 54: | ||
} | } | ||
/* Active | /* Active pill sits flush with the panel */ | ||
.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 63: | Line 61: | ||
} | } | ||
/* Panels | /* Panels */ | ||
.ooo-infobox-tabwrap .tabber__panel { | .ooo-infobox-tabwrap .tabber__panel { | ||
padding: 0; | padding: 0; | ||
Line 70: | Line 68: | ||
} | } | ||
/* Mobile | /* Mobile */ | ||
@media (max-width: 640px) { | @media (max-width: 640px) { | ||
.ooo-infobox-tabwrap, | .ooo-infobox-tabwrap, |