MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* ---------- DULL | /* ---------- DULL IMAGE-ONLY BUTTONS WITH OVERLAY TEXT (ONLY DIVS) ---------- */ | ||
.cat-grid { | .cat-grid { | ||
display: flex; | display: flex; | ||
| Line 11: | Line 11: | ||
.cat-button { | .cat-button { | ||
position: relative; | |||
flex: 0 1 200px; | flex: 0 1 200px; | ||
height: 180px; | |||
border-radius: | border-radius: 10px; | ||
overflow: hidden; | overflow: hidden; | ||
background: #f9f9f9; | background: #f9f9f9; | ||
| Line 19: | Line 20: | ||
transition: all 0.25s ease; | transition: all 0.25s ease; | ||
cursor: pointer; | cursor: pointer; | ||
display: | display: block; | ||
} | } | ||
.cat-button:hover, | .cat-button:hover, | ||
.cat-button:focus { | .cat-button:focus { | ||
box-shadow: 0 6px 14px rgba(0,0,0,0.15); | |||
box-shadow: 0 | transform: translateY(-4px); | ||
transform: translateY(- | |||
} | } | ||
.cat-button img { | .cat-button img { | ||
width: 100%; | width: 100%; | ||
height: | height: 100%; | ||
object-fit: cover; | |||
display: block; | display: block; | ||
} | } | ||
.cat- | .cat-overlay { | ||
position: absolute; | |||
inset: 0; | |||
display: flex; | display: flex; | ||
align-items: center; | align-items: center; | ||
justify-content: center; | justify-content: center; | ||
background: rgba(0,0,0,0.25); | |||
color: white; | |||
font-weight: 600; | |||
font-size: 1.1em; | |||
text-shadow: 0 1px 3px rgba(0,0,0,0.6); | |||
padding: 12px; | |||
text-align: center; | |||
transition: background 0.25s ease; | |||
} | |||
.cat-button:hover .cat-overlay { | |||
background: rgba(0,0,0,0.4); | |||
} | } | ||
/* Responsive | /* Responsive */ | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.cat-grid { gap: 16px; } | .cat-grid { gap: 16px; } | ||
.cat-button { flex: 0 1 calc(50% - 8px); } | .cat-button { flex: 0 1 calc(50% - 8px); height: 140px; } | ||
.cat-overlay { font-size: 1em; } | |||
} | } | ||
Revision as of 09:49, 16 November 2025
/* ---------- DULL IMAGE-ONLY BUTTONS WITH OVERLAY TEXT (ONLY DIVS) ---------- */
.cat-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 24px;
max-width: 960px;
margin: 30px auto;
padding: 0 12px;
}
.cat-button {
position: relative;
flex: 0 1 200px;
height: 180px;
border-radius: 10px;
overflow: hidden;
background: #f9f9f9;
box-shadow: 0 2px 6px rgba(0,0,0,0.08);
transition: all 0.25s ease;
cursor: pointer;
display: block;
}
.cat-button:hover,
.cat-button:focus {
box-shadow: 0 6px 14px rgba(0,0,0,0.15);
transform: translateY(-4px);
}
.cat-button img {
width: 100%;
height: 100%;
object-fit: cover;
display: block;
}
.cat-overlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
background: rgba(0,0,0,0.25);
color: white;
font-weight: 600;
font-size: 1.1em;
text-shadow: 0 1px 3px rgba(0,0,0,0.6);
padding: 12px;
text-align: center;
transition: background 0.25s ease;
}
.cat-button:hover .cat-overlay {
background: rgba(0,0,0,0.4);
}
/* Responsive */
@media (max-width: 768px) {
.cat-grid { gap: 16px; }
.cat-button { flex: 0 1 calc(50% - 8px); height: 140px; }
.cat-overlay { font-size: 1em; }
}