MediaWiki:Common.css: Difference between revisions
MediaWiki interface page
More actions
Madammagicka (talk | contribs) No edit summary |
Madammagicka (talk | contribs) No edit summary |
||
| Line 138: | Line 138: | ||
/* ======= D&D RACE PAGE | /* ======= D&D RACE PAGE — HTML IMG VERSION ======= */ | ||
.race-page { | .race-page { | ||
| Line 166: | Line 166: | ||
transition: transform 0.15s ease, box-shadow 0.15s ease; | transition: transform 0.15s ease, box-shadow 0.15s ease; | ||
overflow: visible; | overflow: visible; /* no scrollbars */ | ||
max-width: 100%; | max-width: 100%; /* prevent horizontal overflow */ | ||
word-wrap: break-word; | word-wrap: break-word; /* break long text cleanly */ | ||
} | } | ||
| Line 176: | Line 176: | ||
} | } | ||
/* Race name above the image */ | |||
.race-title { | .race-title { | ||
font-size: 1.4em; | font-size: 1.4em; | ||
| Line 186: | Line 187: | ||
} | } | ||
/* | /* Image styling */ | ||
.race-image img { | .race-image img { | ||
display: block; | display: block; | ||
width: 100%; | width: 100%; /* scale to card width */ | ||
height: auto; | height: auto; /* keep aspect ratio */ | ||
border: 2px solid #d8c4a0; | border: 2px solid #d8c4a0; | ||
border-radius: 4px; | border-radius: 4px; | ||
| Line 196: | Line 197: | ||
} | } | ||
/* | /* Body text */ | ||
.race-body { | .race-body { | ||
font-size: 0.95em; | font-size: 0.95em; | ||
line-height: 1.45em; | line-height: 1.45em; | ||
text-align: left; | text-align: left; | ||
white-space: normal; /* wrap text naturally */ | |||
white-space: normal; | overflow: visible; /* no scrollbars */ | ||
overflow: visible; | |||
width: 100%; | width: 100%; | ||
} | } | ||
Revision as of 17:08, 26 November 2025
/* ---------- IMAGE-ONLY BUTTONS – 4 PER ROW + TIGHT SPACING ---------- */
.cat-grid {
display: flex;
flex-wrap: wrap;
justify-content: center;
gap: 16px; /* ← CLOSER HORIZONTAL & VERTICAL */
max-width: 960px;
margin: 30px auto;
padding: 0 12px;
}
/* DIV button – FULL RESET + ROUNDED + ZOOM CONTAINER */
.cat-button {
position: relative;
display: inline-block; /* <- REQUIRED for proper shrink-to-content */
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;
transition: transform 0.25s ease;
cursor: pointer;
/* ← MAX 4 PER ROW: 25% width minus gap */
flex: 0 1 calc(25% - 12px); /* 4 × (25% - gap/4) */
min-width: 180px; /* prevent too small */
height: auto;
}
.cat-button p {
margin: 0 !important;
padding: 0 !important;
line-height: 0 !important;
display: contents !important; /* ← removes box but keeps children */
}
/* HOVER: lift */
.cat-button:hover,
.cat-button:focus {
transform: translateY(-4px);
outline: none !important;
}
/* IMAGE: zoom inside rounded */
.cat-button img {
width: 100%;
height: auto;
display: block;
margin: 0;
padding: 0;
border: 0;
border-radius: 10px;
transform-origin: 50% 50% !important; /* FULL CENTER */
vertical-align: center;
transition: transform 0.3s ease;
transform-origin: center center;
object-fit: cover; /* prevents letterboxing */
box-shadow: inset 0 0 6px rgba(0,0,0,0.07);
}
.cat-button:hover img {
transform: scale(1.08);
}
/* TEXT OVERLAY: BOLD + CLEAN BLACK OUTLINE */
.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: 960px;
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;
}
#footer-info-lastmod {
display: none;
}
/* ======= D&D RACE PAGE — HTML IMG VERSION ======= */
.race-page {
font-family: "Georgia", serif;
padding: 20px;
background: #f7f3e6;
border: 2px solid #c8b58a;
border-radius: 8px;
box-shadow: 0 0 10px rgba(0,0,0,0.15);
}
.race-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 20px;
margin-top: 20px;
}
/* Cards auto-grow vertically */
.race-card {
background: #fffdf8;
border: 2px solid #b89b6b;
border-radius: 6px;
padding: 15px;
text-align: center;
box-shadow: 0 3px 8px rgba(0,0,0,0.15);
transition: transform 0.15s ease, box-shadow 0.15s ease;
overflow: visible; /* no scrollbars */
max-width: 100%; /* prevent horizontal overflow */
word-wrap: break-word; /* break long text cleanly */
}
.race-card:hover {
transform: translateY(-4px);
box-shadow: 0 6px 12px rgba(0,0,0,0.25);
}
/* Race name above the image */
.race-title {
font-size: 1.4em;
font-weight: bold;
font-family: "Cinzel", serif;
margin-bottom: 10px;
letter-spacing: 1px;
border-bottom: 2px solid #d8c4a0;
padding-bottom: 6px;
}
/* Image styling */
.race-image img {
display: block;
width: 100%; /* scale to card width */
height: auto; /* keep aspect ratio */
border: 2px solid #d8c4a0;
border-radius: 4px;
margin-bottom: 12px;
}
/* Body text */
.race-body {
font-size: 0.95em;
line-height: 1.45em;
text-align: left;
white-space: normal; /* wrap text naturally */
overflow: visible; /* no scrollbars */
width: 100%;
}