MediaWiki:Common.css: Difference between revisions
mNo edit summary |
Tag: Undo |
||
| (4 intermediate revisions by the same user not shown) | |||
| Line 139: | Line 139: | ||
/* Templates ItemFlexList and ItemLinkBox */ | /* Templates ItemFlexList and ItemLinkBox */ | ||
/* Flex container | /* Flex container */ | ||
.dxx-item-flexlist { | .dxx-item-flexlist { | ||
display: flex !important; | display: flex !important; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
justify-content: space-around; /* spread items across each row */ | |||
row-gap: 12px; /* vertical gap between rows */ | |||
} | } | ||
/* Each tile | /* Each tile */ | ||
.dxx-item-flexlist > .dxx-item-linkbox { | .dxx-item-flexlist > .dxx-item-linkbox { | ||
box-sizing: border-box; | box-sizing: border-box; | ||
flex: | flex: 1 0 140px; /* base 140px, can grow to share extra space */ | ||
max-width: 180px; /* don't let tiles get ridiculously wide */ | |||
} | } | ||
/* Visual styling | /* Visual styling (as you already had) */ | ||
.dxx-item-linkbox { | .dxx-item-linkbox { | ||
margin: 0; | margin: 0; | ||
| Line 164: | Line 164: | ||
} | } | ||
.dxx-item-linkbox img { | .dxx-item-linkbox img { | ||
display: block; | display: block; | ||
margin: 0 auto 4px; | margin: 0 auto 4px; | ||
} | |||
.dxx-item-linkbox-name { | |||
display: block; | |||
margin-top: 4px; | |||
white-space: nowrap; /* no wrapping */ | |||
overflow: hidden; /* clip if too long */ | |||
text-overflow: ellipsis; /* optional: "…" on overflow */ | |||
} | } | ||