MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
/* ---------- IMAGE-ONLY BUTTONS – | /* ---------- IMAGE-ONLY BUTTONS – ZOOM INSIDE ROUNDED CORNERS ---------- */ | ||
.cat-grid { | .cat-grid { | ||
display: flex; | display: flex; | ||
| Line 10: | Line 10: | ||
} | } | ||
/* DIV button – FULL RESET + ROUNDED */ | /* DIV button – FULL RESET + ROUNDED + ZOOM CONTAINER */ | ||
.cat-button { | .cat-button { | ||
position: relative; | position: relative; | ||
| Line 21: | Line 21: | ||
background: none !important; | background: none !important; | ||
box-shadow: none !important; | box-shadow: none !important; | ||
overflow: hidden !important; | overflow: hidden !important; /* ← CRITICAL: clips zoom to corners */ | ||
transition: transform 0.25s ease; | transition: transform 0.25s ease; | ||
cursor: pointer; | cursor: pointer; | ||
} | } | ||
/* HOVER: lift */ | /* HOVER: lift the whole button */ | ||
.cat-button:hover, | .cat-button:hover, | ||
.cat-button:focus { | .cat-button:focus { | ||
| Line 33: | Line 33: | ||
} | } | ||
/* IMAGE: | /* IMAGE: scales inside the rounded container */ | ||
.cat-button img { | .cat-button img { | ||
width: 100%; | width: 100%; | ||
| Line 41: | Line 41: | ||
padding: 0; | padding: 0; | ||
border: 0; | border: 0; | ||
border-radius: 10px; | border-radius: 10px; /* ← matches container */ | ||
vertical-align: top; | vertical-align: top; | ||
transition: transform 0.3s ease; | transition: transform 0.3s ease; | ||
transform-origin: center center; /* ← zoom from center */ | |||
} | } | ||
.cat-button:hover img { | .cat-button:hover img { | ||
transform: scale(1.08); | transform: scale(1.08); /* ← ZOOM INSIDE rounded area */ | ||
} | } | ||
/* TEXT OVERLAY: | /* TEXT OVERLAY: CLEAN BLACK OUTLINE (via shadow) */ | ||
.cat-overlay { | .cat-overlay { | ||
position: absolute; | position: absolute; | ||
| Line 67: | Line 68: | ||
transition: background 0.3s ease, text-shadow 0.3s ease; | transition: background 0.3s ease, text-shadow 0.3s ease; | ||
/* CLEAN BLACK OUTLINE – | /* CLEAN BLACK OUTLINE – 8 directions */ | ||
text-shadow: | text-shadow: | ||
-1.2px -1.2px 0 #000, | -1.2px -1.2px 0 #000, | ||
| Line 77: | Line 78: | ||
0 -1.2px 0 #000, | 0 -1.2px 0 #000, | ||
0 1.2px 0 #000, | 0 1.2px 0 #000, | ||
0 0 6px rgba(0,0,0,0.6); | 0 0 6px rgba(0,0,0,0.6); | ||
} | } | ||
/* HOVER: remove tint + stronger outline | /* HOVER: remove tint + stronger outline */ | ||
.cat-button:hover .cat-overlay { | .cat-button:hover .cat-overlay { | ||
background: transparent; | background: transparent; | ||
Revision as of 10:40, 16 November 2025
/* ---------- IMAGE-ONLY BUTTONS – ZOOM INSIDE ROUNDED CORNERS ---------- */
.cat-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 24px;
max-width: 960px;
margin: 30px auto;
padding: 0 12px;
}
/* DIV button – FULL RESET + ROUNDED + ZOOM CONTAINER */
.cat-button {
position: relative;
display: block !important;
line-height: 0 !important;
margin: 0 !important;
padding: 0 !important;
border: none !important;
border-radius: 10px !important;
background: none !important;
box-shadow: none !important;
overflow: hidden !important; /* ← CRITICAL: clips zoom to corners */
transition: transform 0.25s ease;
cursor: pointer;
}
/* HOVER: lift the whole button */
.cat-button:hover,
.cat-button:focus {
transform: translateY(-4px);
outline: none !important;
}
/* IMAGE: scales inside the rounded container */
.cat-button img {
width: 100%;
height: auto;
display: block;
margin: 0;
padding: 0;
border: 0;
border-radius: 10px; /* ← matches container */
vertical-align: top;
transition: transform 0.3s ease;
transform-origin: center center; /* ← zoom from center */
}
.cat-button:hover img {
transform: scale(1.08); /* ← ZOOM INSIDE rounded area */
}
/* TEXT OVERLAY: CLEAN BLACK OUTLINE (via shadow) */
.cat-overlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 700 !important;
font-size: 1.1em;
text-align: center;
padding: 8px;
pointer-events: none;
background: rgba(0, 0, 0, 0.08);
border-radius: 10px;
transition: background 0.3s ease, text-shadow 0.3s ease;
/* CLEAN BLACK OUTLINE – 8 directions */
text-shadow:
-1.2px -1.2px 0 #000,
1.2px -1.2px 0 #000,
-1.2px 1.2px 0 #000,
1.2px 1.2px 0 #000,
-1.2px 0 0 #000,
1.2px 0 0 #000,
0 -1.2px 0 #000,
0 1.2px 0 #000,
0 0 6px rgba(0,0,0,0.6);
}
/* HOVER: remove tint + stronger outline */
.cat-button:hover .cat-overlay {
background: transparent;
text-shadow:
-1.5px -1.5px 0 #000,
1.5px -1.5px 0 #000,
-1.5px 1.5px 0 #000,
1.5px 1.5px 0 #000,
-1.5px 0 0 #000,
1.5px 0 0 #000,
0 -1.5px 0 #000,
0 1.5px 0 #000,
0 0 10px rgba(0,0,0,0.7);
}
/* RESPONSIVE */
@media (max-width: 768px) {
.cat-grid { gap: 16px; }
.cat-overlay {
font-size: 1em;
text-shadow:
-1px -1px 0 #000,
1px -1px 0 #000,
-1px 1px 0 #000,
1px 1px 0 #000,
-1px 0 0 #000,
1px 0 0 #000,
0 -1px 0 #000,
0 1px 0 #000,
0 0 5px rgba(0,0,0,0.5);
}
.cat-button:hover .cat-overlay {
text-shadow:
-1.2px -1.2px 0 #000,
1.2px -1.2px 0 #000,
-1.2px 1.2px 0 #000,
1.2px 1.2px 0 #000,
-1.2px 0 0 #000,
1.2px 0 0 #000,
0 -1.2px 0 #000,
0 1.2px 0 #000,
0 0 8px rgba(0,0,0,0.6);
}
}