MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
mNo edit summary Tag: Manual revert |
mNo edit summary |
||
| Line 1: | Line 1: | ||
/* ---------- | /* ---------- IMAGE-ONLY BUTTONS – NO BOX, NO PADDING ---------- */ | ||
.cat-grid { | .cat-grid { | ||
display: flex; | display: flex; | ||
| Line 10: | Line 10: | ||
} | } | ||
/* Button = image | /* Button = just the image + overlay */ | ||
.cat-button { | .cat-button { | ||
position: relative; | position: relative; | ||
display: block; | display: block; | ||
line-height: 0; | line-height: 0; /* removes any text spacing */ | ||
overflow: visible; /* no clipping */ | |||
box-shadow: none; /* NO SHADOW */ | |||
border: none; /* NO BORDER */ | |||
transition: | padding: 0; /* NO PADDING */ | ||
margin: 0; | |||
border-radius: 0; /* NO ROUNDED CORNERS */ | |||
transition: transform 0.25s ease; | |||
cursor: pointer; | cursor: pointer; | ||
} | } | ||
/* Hover | /* Hover: only lift, no box */ | ||
.cat-button:hover, | .cat-button:hover, | ||
.cat-button:focus { | .cat-button:focus { | ||
transform: translateY(-4px); | transform: translateY(-4px); | ||
z-index: 1; | |||
} | } | ||
/* Image | /* Image = full size, no stretching */ | ||
.cat-button img { | .cat-button img { | ||
width: 100%; | width: 100%; | ||
height: auto; | height: auto; | ||
display: block; | display: block; | ||
margin: 0; | |||
padding: 0; | |||
border: 0; | border: 0; | ||
} | } | ||
/* Overlay text – | /* Overlay text – on top of image */ | ||
.cat-overlay { | .cat-overlay { | ||
position: absolute; | position: absolute; | ||
| Line 44: | Line 49: | ||
align-items: center; | align-items: center; | ||
justify-content: center; | justify-content: center; | ||
color: white; | color: white; | ||
font-weight: 600; | font-weight: 600; | ||
font-size: 1.1em; | font-size: 1.1em; | ||
text-shadow: 0 1px 3px rgba(0,0,0,0. | text-shadow: 0 1px 3px rgba(0,0,0,0.7); | ||
text-align: center; | text-align: center; | ||
padding: 8px; | |||
pointer-events: none; | |||
background: rgba(0,0,0,0.3); /* subtle dark tint */ | |||
transition: background 0.25s ease; | transition: background 0.25s ease; | ||
} | } | ||
.cat-button:hover .cat-overlay { | .cat-button:hover .cat-overlay { | ||
background: rgba(0,0,0,0. | background: rgba(0,0,0,0.5); /* darker on hover */ | ||
} | } | ||
/* Responsive | /* Responsive */ | ||
@media (max-width: 768px) { | @media (max-width: 768px) { | ||
.cat-grid { gap: 16px; } | .cat-grid { gap: 16px; } | ||
.cat-overlay { font-size: 1em; } | .cat-overlay { font-size: 1em; } | ||
} | } | ||
Revision as of 09:59, 16 November 2025
/* ---------- IMAGE-ONLY BUTTONS – NO BOX, NO PADDING ---------- */
.cat-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 24px;
max-width: 960px;
margin: 30px auto;
padding: 0 12px;
}
/* Button = just the image + overlay */
.cat-button {
position: relative;
display: block;
line-height: 0; /* removes any text spacing */
overflow: visible; /* no clipping */
box-shadow: none; /* NO SHADOW */
border: none; /* NO BORDER */
padding: 0; /* NO PADDING */
margin: 0;
border-radius: 0; /* NO ROUNDED CORNERS */
transition: transform 0.25s ease;
cursor: pointer;
}
/* Hover: only lift, no box */
.cat-button:hover,
.cat-button:focus {
transform: translateY(-4px);
z-index: 1;
}
/* Image = full size, no stretching */
.cat-button img {
width: 100%;
height: auto;
display: block;
margin: 0;
padding: 0;
border: 0;
}
/* Overlay text – on top of image */
.cat-overlay {
position: absolute;
inset: 0;
display: flex;
align-items: center;
justify-content: center;
color: white;
font-weight: 600;
font-size: 1.1em;
text-shadow: 0 1px 3px rgba(0,0,0,0.7);
text-align: center;
padding: 8px;
pointer-events: none;
background: rgba(0,0,0,0.3); /* subtle dark tint */
transition: background 0.25s ease;
}
.cat-button:hover .cat-overlay {
background: rgba(0,0,0,0.5); /* darker on hover */
}
/* Responsive */
@media (max-width: 768px) {
.cat-grid { gap: 16px; }
.cat-overlay { font-size: 1em; }
}