MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
No edit summary |
No edit summary Tag: Reverted |
||
| Line 1: | Line 1: | ||
/* ---------- IMAGE-ONLY BUTTONS – 4 PER ROW + TIGHT | //* ---------- IMAGE-ONLY BUTTONS – 4 PER ROW + TIGHT ---------- */ | ||
.cat-grid { | .cat-grid { | ||
display: flex; | display: flex; | ||
flex-wrap: wrap; | flex-wrap: wrap; | ||
justify-content: center; | justify-content: center; | ||
gap: 16px; | gap: 16px; | ||
max-width: 960px; | max-width: 960px; | ||
margin: 30px auto; | margin: 30px auto; | ||
| Line 10: | Line 10: | ||
} | } | ||
/* | /* BUTTON = EXACT IMAGE SIZE */ | ||
.cat-button { | .cat-button { | ||
position: relative; | position: relative; | ||
display: block !important; | display: block !important; | ||
margin: 0 !important; | margin: 0 !important; | ||
padding: 0 !important; | padding: 0 !important; | ||
border: none !important; | border: none !important; | ||
background: none !important; | background: none !important; | ||
overflow: hidden !important; | overflow: hidden !important; | ||
cursor: pointer; | cursor: pointer; | ||
/* | /* FLEX: exact 25% minus gap */ | ||
flex: 0 1 calc(25% - 12px); | flex: 0 1 calc(25% - 12px); | ||
min-width: 180px; | min-width: 180px; | ||
/* CRITICAL: Remove box-shadow from layout */ | |||
box-sizing: border-box !important; | |||
border-radius: 10px !important; | |||
transition: transform 0.25s ease !important; | |||
} | } | ||
/* HOVER: lift */ | /* HOVER: lift + stronger shadow */ | ||
.cat-button:hover, | .cat-button:hover, | ||
.cat-button:focus { | .cat-button:focus { | ||
transform: translateY(-4px); | transform: translateY(-4px) !important; | ||
outline: none !important; | outline: none !important; | ||
} | } | ||
/* IMAGE: | /* IMAGE: 100% of container, no gaps */ | ||
.cat-button img { | .cat-button img { | ||
width: 100%; | width: 100%; | ||
| Line 47: | Line 47: | ||
border: 0; | border: 0; | ||
border-radius: 10px; | border-radius: 10px; | ||
object-fit: cover; /* ← ensures image fills perfectly */ | |||
vertical-align: top; | vertical-align: top; | ||
transition: transform 0.3s ease; | transition: transform 0.3s ease; | ||
} | } | ||
/* HOVER: zoom image */ | |||
.cat-button:hover img { | .cat-button:hover img { | ||
transform: scale(1.08); | transform: scale(1.08); | ||
} | } | ||
/* TEXT OVERLAY | /* SHADOW: applied to ::after (not layout-affecting) */ | ||
.cat-button::after { | |||
content: ""; | |||
position: absolute; | |||
inset: 0; | |||
border-radius: 10px; | |||
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12); | |||
pointer-events: none; | |||
transition: box-shadow 0.25s ease; | |||
z-index: -1; | |||
} | |||
.cat-button:hover::after { | |||
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18); | |||
} | |||
/* TEXT OVERLAY */ | |||
.cat-overlay { | .cat-overlay { | ||
position: absolute; | position: absolute; | ||
| Line 69: | Line 86: | ||
text-align: center; | text-align: center; | ||
pointer-events: none; | pointer-events: none; | ||
background: rgba(0, 0, 0, 0); | background: rgba(0, 0, 0, 0.08); | ||
border-radius: 10px; | border-radius: 10px; | ||
transition: background 0.3s ease, text-shadow 0.3s ease; | transition: background 0.3s ease, text-shadow 0.3s ease; | ||
text-shadow: | 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 | -1.2px 1.2px 0 #000, | ||
1.2px | 1.2px 1.2px 0 #000, | ||
-1.2px | -1.2px 0 0 #000, | ||
1.2px | 1.2px 0 0 #000, | ||
0 | 0 -1.2px 0 #000, | ||
0 | 0 1.2px 0 #000, | ||
0 0 6px rgba(0,0,0,0.6); | 0 0 6px rgba(0,0,0,0.6); | ||
} | } | ||
| Line 90: | Line 106: | ||
-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 | -1.5px 1.5px 0 #000, | ||
1.5px | 1.5px 1.5px 0 #000, | ||
-1.5px | -1.5px 0 0 #000, | ||
1.5px | 1.5px 0 0 #000, | ||
0 | 0 -1.5px 0 #000, | ||
0 | 0 1.5px 0 #000, | ||
0 0 10px rgba(0,0,0,0.7); | 0 0 10px rgba(0,0,0,0.7); | ||
} | } | ||
Revision as of 13:26, 16 November 2025
//* ---------- IMAGE-ONLY BUTTONS – 4 PER ROW + TIGHT ---------- */
.cat-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 16px;
max-width: 960px;
margin: 30px auto;
padding: 0 12px;
}
/* BUTTON = EXACT IMAGE SIZE */
.cat-button {
position: relative;
display: block !important;
margin: 0 !important;
padding: 0 !important;
border: none !important;
background: none !important;
overflow: hidden !important;
cursor: pointer;
/* FLEX: exact 25% minus gap */
flex: 0 1 calc(25% - 12px);
min-width: 180px;
/* CRITICAL: Remove box-shadow from layout */
box-sizing: border-box !important;
border-radius: 10px !important;
transition: transform 0.25s ease !important;
}
/* HOVER: lift + stronger shadow */
.cat-button:hover,
.cat-button:focus {
transform: translateY(-4px) !important;
outline: none !important;
}
/* IMAGE: 100% of container, no gaps */
.cat-button img {
width: 100%;
height: auto;
display: block;
margin: 0;
padding: 0;
border: 0;
border-radius: 10px;
object-fit: cover; /* ← ensures image fills perfectly */
vertical-align: top;
transition: transform 0.3s ease;
}
/* HOVER: zoom image */
.cat-button:hover img {
transform: scale(1.08);
}
/* SHADOW: applied to ::after (not layout-affecting) */
.cat-button::after {
content: "";
position: absolute;
inset: 0;
border-radius: 10px;
box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
pointer-events: none;
transition: box-shadow 0.25s ease;
z-index: -1;
}
.cat-button:hover::after {
box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
}
/* TEXT OVERLAY */
.cat-overlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
color: white;
padding: 8px;
font-weight: 700 !important;
font-size: 1.1em;
text-align: center;
pointer-events: none;
background: rgba(0, 0, 0, 0.08);
border-radius: 10px;
transition: background 0.3s ease, text-shadow 0.3s ease;
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);
}
.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: 2 per row on tablets, 1 on mobile */
@media (max-width: 768px) {
.cat-grid { gap: 12px; } /* ← EVEN TIGHTER when stacked */
.cat-button { flex: 0 1 calc(50% - 9px); } /* 2 per row */
}
@media (max-width: 480px) {
.cat-button { flex: 0 1 100%; } /* 1 per row */
.cat-overlay { font-size: 1em; }
}
.page-Main_Page .full-bg {
position: absolute;
top: 0;
left: 50%;
transform: translateX(-50%);
max-width: 1200px;
height: 100%;
width: 100%;
background: url('/images/3/3c/Indexbg.png') center top/contain no-repeat;
box-shadow: 0 4px 15px rgba(0,0,0,0.1);
z-index: -1;
}