MediaWiki:BentoGrid.css
From The Seven Sages of Rome
Note: After publishing, you may have to bypass your browser's cache to see the changes.
- Firefox / Safari: Hold Shift while clicking Reload, or press either Ctrl-F5 or Ctrl-R (⌘-R on a Mac)
- Google Chrome: Press Ctrl-Shift-R (⌘-Shift-R on a Mac)
- Internet Explorer / Edge: Hold Ctrl while clicking Refresh, or press Ctrl-F5
- Opera: Press Ctrl-F5.
/* Bento Grid */
.bento-grid {
display: grid;
grid-template-columns: repeat(4, 1fr);
grid-gap: 15px;
padding: 15px;
}
.bento-item {
background-color: #f8f9fa;
border-radius: 10px;
padding: 20px;
display: flex;
flex-direction: column;
justify-content: center;
align-items: center;
text-align: center;
transition: all 0.3s ease;
}
.bento-item:hover {
transform: translateY(-5px);
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}
.bento-item h3 {
margin-bottom: 10px;
}
.bento-item h3 span a {
color: black !important;
}
.bento-item p {
margin-bottom: 0;
}
.bento-item-primary {
grid-column: span 2;
grid-row: span 6;
background-color: transparent;
}
.bento-item-wide {
grid-column: span 2;
}
@media (max-width: 1035px) {
.bento-grid {
grid-template-columns: repeat(2, 1fr);
}
.bento-item-primary,
.bento-item-regular,
.bento-item-wide {
grid-column: span 2;
}
}
/* Ensure maps fit inside bento items */
.bento-item .content-container {
width: 100%;
height: 300px; /* Adjust as needed */
}
/* Override Semantic MediaWiki map container if needed */
.bento-item .smw-map-container {
width: 100% !important;
height: 100% !important;
}
/* Optional: Give the map-container a border radius like your cards */
.content-container {
border-radius: 10px;
overflow: hidden;
}