Toggle menu
20
62
5
836
Irontide Fantasy Roleplay
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

MediaWiki:Common.css: Difference between revisions

MediaWiki interface page
No edit summary
Tag: Reverted
No edit summary
Tag: Manual revert
Line 107: Line 107:
     .cat-button { flex: 0 1 100%; }              /* 1 per row */
     .cat-button { flex: 0 1 100%; }              /* 1 per row */
     .cat-overlay { font-size: 1em; }
     .cat-overlay { font-size: 1em; }
}
/* Target your logo image – CHANGE THE SELECTOR IF NEEDED */
.cat-grid + .logo-container img,          /* ← if logo is after .cat-grid */
.logo img,                                /* ← common class */
#main-logo img,                          /* ← or use your own ID/class */
div[style*="text-align: center"] img,    /* ← fallback for inline styles */
img[alt="Logo"],                          /* ← if alt text is "Logo" */
img[src*="logo"],                        /* ← if filename has "logo" */
img.logo-image {                          /* ← add class="logo-image" to your img */
    transition: none !important;          /* ← NO ANIMATION */
    transform: none !important;          /* ← NO SCALE */
    width: auto !important;
    height: auto !important;
    max-width: 100% !important;
    display: block;
}
/* Remove hover zoom */
.cat-grid + .logo-container img:hover,
.logo img:hover,
#main-logo img:hover,
div[style*="text-align: center"] img:hover,
img[alt="Logo"]:hover,
img[src*="logo"]:hover,
img.logo-image:hover {
    transform: none !important;
    filter: none !important;
    box-shadow: none !important;
}
}

Revision as of 11:26, 16 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: 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;
    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 */
}

/* 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;
    vertical-align: top;
    transition: transform 0.3s ease;
    transform-origin: center center;
}

.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;
    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;

    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; }
}