Toggle menu
20
62
5
870
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: Reverted
Line 108: Line 108:
     .cat-overlay { font-size: 1em; }
     .cat-overlay { font-size: 1em; }
}
}
/* ---------- FIXED SCREEN PARALLAX BACKGROUND (DOES NOT SCROLL) ---------- */
 
 
/* ---------- PURE CSS FIXED PARALLAX (NO JS) ---------- */
.parallax-bg-container {
.parallax-bg-container {
     position: fixed;
     position: fixed;
Line 115: Line 117:
     width: 100%;
     width: 100%;
     height: 100vh;
     height: 100vh;
     z-index: -10;                         /* ← BEHIND ALL CONTENT */
     z-index: -10;
     perspective: 1000px;
     perspective: 1000px;
     overflow: hidden;
     overflow: hidden;
Line 121: Line 123:
}
}


/* 3D Layers – FIXED */
/* Layers – fixed + scroll movement via background-position */
.parallax-layer {
.parallax-layer {
     position: fixed;                       /* ← FIXED TO SCREEN */
     position: fixed;
     inset: 0;
     inset: 0;
     background-size: cover !important;
     background-size: cover !important;
     background-position: center !important;
     background-position: center 0 !important;   /* ← starts at top */
     background-repeat: no-repeat !important;
     background-repeat: repeat-y !important;     /* ← allows vertical scroll */
     background-attachment: fixed !important;   /* ← DOES NOT SCROLL */
     background-attachment: fixed !important;
     width: 100% !important;
     width: 100% !important;
     height: 100% !important;
     height: 200vh !important;                   /* ← taller than screen */
     pointer-events: none !important;
     transition: background-position 0.1s ease-out;
}
}


/* DEPTH */
/* DEPTH + SPEED */
.layer-back {
.layer-back {
     background-image: url('/images/2/21/GreenskinsBG.png');
     background-image: url('/images/2/21/GreenskinsBG.png') !important;
     transform: translateZ(-300px) scale(1.4);
     transform: translateZ(-400px) scale(1.5);
    z-index: 1;
    background-position-y: calc(50vh - (var(--scroll, 0) * 0.3)) !important;
}
}


.layer-mid {
.layer-mid {
     background-image: url('/images/4/49/Greenskins1.png');
     background-image: url('/images/4/49/Greenskins1.png') !important;
     transform: translateZ(-150px) scale(1.2);
     transform: translateZ(-200px) scale(1.3);
    z-index: 2;
    background-position-y: calc(50vh - (var(--scroll, 0) * 0.5)) !important;
}
}


.layer-front {
.layer-front {
     background-image: url('/images/2/26/Greenskins2.png');
     background-image: url('/images/2/26/Greenskins2.png') !important;
     transform: translateZ(0) scale(1);
     transform: translateZ(0) scale(1);
    z-index: 3;
    background-position-y: calc(50vh - (var(--scroll, 0) * 0.7)) !important;
}
}


/* Optional hover enhancement */
/* SCROLL TRACKING (CSS-only) */
.parallax-3d-container:hover .layer-back  { transform: translateZ(-320px) scale(1.42); }
html {
.parallax-3d-container:hover .layer-mid  { transform: translateZ(-160px) scale(1.21); }
    --scroll: 0;
.parallax-3d-container:hover .layer-front { transform: translateZ(-10px) scale(1.01); }
}
 
html::before {
/* Mobile: flatten */
    content: "";
@media (max-width: 768px) {
    position: fixed;
     .parallax-3d-container {
    top: 0;
         height: 50vh;
    left: 0;
         perspective: none;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    background: transparent;
}
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
    /* This trick updates --scroll on scroll */
     .parallax-bg-container::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
         height: 100vh;
         background: linear-gradient(transparent, transparent);
        animation: parallax-scroll 1s linear infinite;
     }
     }
     .parallax-layer {
     @keyframes parallax-scroll {
         transform: none !important;
         to { --scroll: 100vh; }
        background-attachment: scroll;
     }
     }
    .layer-back  { background-position: center 30%; }
    .layer-mid  { background-position: center 50%; }
    .layer-front { background-position: center 70%; }
}
}

Revision as of 11:54, 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; }
}


/* ---------- PURE CSS FIXED PARALLAX (NO JS) ---------- */
.parallax-bg-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -10;
    perspective: 1000px;
    overflow: hidden;
    pointer-events: none;
}

/* Layers – fixed + scroll movement via background-position */
.parallax-layer {
    position: fixed;
    inset: 0;
    background-size: cover !important;
    background-position: center 0 !important;   /* ← starts at top */
    background-repeat: repeat-y !important;     /* ← allows vertical scroll */
    background-attachment: fixed !important;
    width: 100% !important;
    height: 200vh !important;                   /* ← taller than screen */
    transition: background-position 0.1s ease-out;
}

/* DEPTH + SPEED */
.layer-back {
    background-image: url('/images/2/21/GreenskinsBG.png') !important;
    transform: translateZ(-400px) scale(1.5);
    z-index: 1;
    background-position-y: calc(50vh - (var(--scroll, 0) * 0.3)) !important;
}

.layer-mid {
    background-image: url('/images/4/49/Greenskins1.png') !important;
    transform: translateZ(-200px) scale(1.3);
    z-index: 2;
    background-position-y: calc(50vh - (var(--scroll, 0) * 0.5)) !important;
}

.layer-front {
    background-image: url('/images/2/26/Greenskins2.png') !important;
    transform: translateZ(0) scale(1);
    z-index: 3;
    background-position-y: calc(50vh - (var(--scroll, 0) * 0.7)) !important;
}

/* SCROLL TRACKING (CSS-only) */
html {
    --scroll: 0;
}
html::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    pointer-events: none;
    background: transparent;
}
@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
    /* This trick updates --scroll on scroll */
    .parallax-bg-container::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: linear-gradient(transparent, transparent);
        animation: parallax-scroll 1s linear infinite;
    }
    @keyframes parallax-scroll {
        to { --scroll: 100vh; }
    }
}