Template:Content/styles.css: Difference between revisions

From Delanor Wiki
Jump to navigation Jump to search
No edit summary
Tag: Reverted
No edit summary
Tags: Manual revert Reverted
Line 8: Line 8:
}
}


/* Tile container */
.tile {
.tile {
     width: 180px;
     width: 180px;
     height: 240px; /* Fixed height */
     height: 240px; /* Fixed height */
     padding: 0.5em;
     padding: 0.5em;
     background: #fdfaf3;
     background: #fdfaf3;
Line 31: Line 30:
}
}


/* Image container */
/* Fixed-size image container */
.tile-top {
.tile-top {
     width: 100%;
     width: 100%;
     height: 140px;
     height: 140px; /* ✅ Adjust this as needed for image room */
     display: flex;
     display: flex;
     justify-content: center;
     justify-content: center;
Line 40: Line 39:
     box-sizing: border-box;
     box-sizing: border-box;
     overflow: hidden;
     overflow: hidden;
     padding: 0;
     padding: 0.25em;
}
}


/* Images auto-crop to fit tile */
/* Contained image */
.tile-top img {
.tile-top img {
     width: 100%;
     max-height: 100%;
     height: 100%;
     max-width: 100%;
     object-fit: cover; /* ✅ Auto crop oversized images */
     object-fit: contain;
     display: block;
     display: block;
}
}
Line 59: Line 58:
     width: 100%;
     width: 100%;
     padding: 0.5em 0 0.3em 0;
     padding: 0.5em 0 0.3em 0;
    border: none;
     margin: 0;
     margin: 0;
    border: none;
     box-sizing: border-box;
     box-sizing: border-box;
     background: none;
     background: none;
}
}


/* Unstyle links */
/* Remove link styles */
.tile-bottom a,
.tile-bottom a,
.tile-top a {
.tile-top a {
Line 88: Line 87:
}
}


/* Mobile layout */
/* Mobile view */
@media (max-width: 800px) {
@media (max-width: 800px) {
     .tile {
     .tile {
         width: 45%;
         width: 45%;
         height: auto;
         height: auto;
    }
    .tile-top {
        height: 120px;
     }
     }
}
}

Revision as of 06:16, 26 July 2025

.tile-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 2em;
    margin: 2em auto;
    max-width: 1200px;
}

.tile {
    width: 180px;
    height: 240px; /* ✅ Fixed height */
    padding: 0.5em;
    background: #fdfaf3;
    border: 1px solid #c8b68e;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: transform 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    overflow: hidden;
}

.tile:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Fixed-size image container */
.tile-top {
    width: 100%;
    height: 140px; /* ✅ Adjust this as needed for image room */
    display: flex;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
    overflow: hidden;
    padding: 0.25em;
}

/* Contained image */
.tile-top img {
    max-height: 100%;
    max-width: 100%;
    object-fit: contain;
    display: block;
}

/* Text label */
.tile-bottom {
    font-size: 1em;
    font-weight: 500;
    color: #222;
    text-align: center;
    width: 100%;
    padding: 0.5em 0 0.3em 0;
    border: none;
    margin: 0;
    box-sizing: border-box;
    background: none;
}

/* Remove link styles */
.tile-bottom a,
.tile-top a {
    all: unset;
    font-size: inherit;
    font-weight: inherit;
    color: inherit;
    display: inline-block;
    text-align: center;
    line-height: 1.4;
    border: none;
    background: none;
    padding: 0;
    margin: 0;
    cursor: pointer;
}

.tile-bottom a:hover,
.tile-top a:hover {
    text-decoration: underline;
    color: #000;
}

/* Mobile view */
@media (max-width: 800px) {
    .tile {
        width: 45%;
        height: auto;
    }
}