MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
No edit summary Tag: Reverted |
No edit summary Tag: Reverted |
||
| Line 34: | Line 34: | ||
} | } | ||
.cat-button:hover .cat-overlay { | .cat-button:hover .cat-overlay { | ||
Revision as of 09:56, 16 November 2025
/* ---------- DULL IMAGE-ONLY BUTTONS WITH OVERLAY TEXT (ONLY DIVS) ---------- */
.cat-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
max-width: 960px;
}
/* Button = image size + overlay */
.cat-button {
position: relative;
display: block; /* keeps the div block-level */
line-height: 0; /* removes any text-induced spacing */
border-radius: 10px;
overflow: hidden;
box-shadow: 0 2px 6px rgba(0,0,0,0.08);
transition: all 0.25s ease;
cursor: pointer;
}
/* Hover effect */
.cat-button:hover,
.cat-button:focus {
box-shadow: 0 6px 14px rgba(0,0,0,0.15);
transform: translateY(-4px);
}
/* Image fills the button exactly */
.cat-button img {
width: 100%; /* responsive width */
height: auto; /* preserves aspect ratio */
display: block;
border: 0;
}
.cat-button:hover .cat-overlay {
background: rgba(0,0,0,0.4);
}
/* Responsive – 2 per row on small screens */
@media (max-width: 768px) {
.cat-grid { gap: 16px; }
.cat-overlay { font-size: 1em; }
}