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
mNo edit summary
Tag: Manual revert
mNo edit summary
Line 1: Line 1:
/* ---------- DULL IMAGE-ONLY BUTTONS WITH OVERLAY TEXT (ONLY DIVS) ---------- */
/* ---------- IMAGE-ONLY BUTTONS – NO BOX, NO PADDING ---------- */
.cat-grid {
.cat-grid {
     display: flex;
     display: flex;
Line 10: Line 10:
}
}


/* Button = image size + overlay */
/* Button = just the image + overlay */
.cat-button {
.cat-button {
     position: relative;
     position: relative;
     display: block;               /* keeps the div block-level */
     display: block;
     line-height: 0;               /* removes any text-induced spacing */
     line-height: 0;                   /* removes any text spacing */
     border-radius: 10px;
     overflow: visible;                /* no clipping */
     overflow: hidden;
    box-shadow: none;                 /* NO SHADOW */
     box-shadow: 0 2px 6px rgba(0,0,0,0.08);
     border: none;                     /* NO BORDER */
     transition: all 0.25s ease;
     padding: 0;                      /* NO PADDING */
    margin: 0;
    border-radius: 0;                 /* NO ROUNDED CORNERS */
     transition: transform 0.25s ease;
     cursor: pointer;
     cursor: pointer;
}
}


/* Hover effect */
/* Hover: only lift, no box */
.cat-button:hover,
.cat-button:hover,
.cat-button:focus {
.cat-button:focus {
    box-shadow: 0 6px 14px rgba(0,0,0,0.15);
     transform: translateY(-4px);
     transform: translateY(-4px);
    z-index: 1;
}
}


/* Image fills the button exactly */
/* Image = full size, no stretching */
.cat-button img {
.cat-button img {
     width: 100%;                   /* responsive width */
     width: 100%;
     height: auto;                 /* preserves aspect ratio */
     height: auto;
     display: block;
     display: block;
    margin: 0;
    padding: 0;
     border: 0;
     border: 0;
}
}


/* Overlay text – centered on the image */
/* 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;
    background: rgba(0,0,0,0.25);
     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.6);
     text-shadow: 0 1px 3px rgba(0,0,0,0.7);
    padding: 12px;
     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;
    pointer-events: none;          /* lets clicks go to the button */
}
}


.cat-button:hover .cat-overlay {
.cat-button:hover .cat-overlay {
     background: rgba(0,0,0,0.4);
     background: rgba(0,0,0,0.5);     /* darker on hover */
}
}


/* Responsive – 2 per row on small screens */
/* 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; }
}