MediaWiki:Common.css: Difference between revisions

mNo edit summary
m Undo revision 183 by KPhoenix (talk)
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 for item tiles */
/* Flex container */
.dxx-item-flexlist {
.dxx-item-flexlist {
     display: flex !important;   /* override any theme rules */
     display: flex !important;
     flex-wrap: wrap;
     flex-wrap: wrap;
     gap: 12px 16px;             /* vertical / horizontal spacing */
     justify-content: space-around; /* spread items across each row */
     justify-content: flex-start;
     row-gap: 12px;                   /* vertical gap between rows */
    align-items: flex-start;
}
}


/* Each tile is a fixed-width flex item */
/* Each tile */
.dxx-item-flexlist > .dxx-item-linkbox {
.dxx-item-flexlist > .dxx-item-linkbox {
     box-sizing: border-box;
     box-sizing: border-box;
     flex: 0 0 140px;           /* don't grow; width ~140px */
     flex: 1 0 140px;     /* base 140px, can grow to share extra space */
    max-width: 180px;    /* don't let tiles get ridiculously wide */
}
}


/* Visual styling for the tile */
/* Visual styling (as you already had) */
.dxx-item-linkbox {
.dxx-item-linkbox {
     margin: 0;
     margin: 0;
Line 164: Line 164:
}
}


/* Make sure the image doesn’t act weird */
.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 */
}
}