Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:Main Page/Sandbox/card/styles.css: Difference between revisions

Template page
Xeravax (talk | contribs)
Created page with "Container for the tile grid: .resonite-home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin: 1em 0 2em 0; } The Card/Tile: .home-card { position: relative; background: #161b22; border: 1px solid #30363d; border-radius: 8px; padding: 24px 10px; text-align: center; transition: background 0.2s, transform 0.1s; display: flex; flex-direction: column; align-..."
 
Xeravax (talk | contribs)
No edit summary
Line 10: Line 10:
.home-card {
.home-card {
     position: relative;
     position: relative;
    cursor: pointer;
     background: #161b22;
     background: #161b22;
     border: 1px solid #30363d;
     border: 1px solid #30363d;
Line 36: Line 37:
     margin-bottom: 12px;
     margin-bottom: 12px;
     line-height: 1;
     line-height: 1;
    position: relative;
    z-index: 0;
}
/* Label: stretch over entire card so the link fills the card (one clickable area) */
.home-card__label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 1em;
}
}


/* Label styling and the "Full Click" trick */
.home-card__label a {
.home-card__label a {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
     color: #c9d1d9 !important;
     color: #c9d1d9 !important;
     font-weight: bold;
     font-weight: bold;
     text-decoration: none !important;
     text-decoration: none !important;
     font-size: 0.95em;
     font-size: 0.95em;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}
}


Line 54: Line 84:
.home-card--orange .home-card__icon {
.home-card--orange .home-card__icon {
     filter: none;
     filter: none;
}
/* Expanding the link to cover the whole card */
.home-card__label a::after {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1;
}
}



Revision as of 18:55, 3 February 2026

/* Container for the tile grid */
.resonite-home-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
    gap: 12px;
    margin: 1em 0 2em 0;
}

/* The Card/Tile */
.home-card {
    position: relative;
    cursor: pointer;
    background: #161b22;
    border: 1px solid #30363d;
    border-radius: 8px;
    padding: 24px 10px;
    text-align: center;
    transition: background 0.2s, transform 0.1s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.home-card:hover {
    transform: translateY(-2px);
}

/* Default hover when no solid background */
.home-card:not(.home-card--red):not(.home-card--orange):hover {
    background: #21262d;
    border-color: #8b949e;
}

/* Icon size and spacing */
.home-card__icon {
    font-size: 2.5em;
    margin-bottom: 12px;
    line-height: 1;
    position: relative;
    z-index: 0;
}

/* Label: stretch over entire card so the link fills the card (one clickable area) */
.home-card__label {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    padding-bottom: 1em;
}

.home-card__label a {
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    color: #c9d1d9 !important;
    font-weight: bold;
    text-decoration: none !important;
    font-size: 0.95em;
    background: none !important;
    border: none !important;
    border-radius: 0 !important;
    padding: 0 !important;
    box-shadow: none !important;
}

/* White text on solid dark cards (red, orange) */
.home-card--red .home-card__label a,
.home-card--orange .home-card__label a {
    color: #fff !important;
}
.home-card--red .home-card__icon,
.home-card--orange .home-card__icon {
    filter: none;
}

/* Color variants: Your first day (solid dark red), Rules (solid dark brown/maroon) */
.home-card--red {
    background: #5c1a1a;
    border: 1px solid #7a2222;
    border-top: 3px solid #f85149;
}
.home-card--red:hover {
    background: #6e2222;
    border-color: #8b3030;
}

.home-card--orange {
    background: #4a2c1a;
    border: 1px solid #5c3820;
    border-top: 3px solid #f0883e;
}
.home-card--orange:hover {
    background: #5a3620;
    border-color: #6e4428;
}

/* What now?: dark grey + yellow border. Creation & technical: grey + green. Advanced: grey + blue. */
.home-card--yellow {
    background: #161b22;
    border: 1px solid #30363d;
    border-top: 3px solid #d4a72c;
}
.home-card--green {
    background: #161b22;
    border: 1px solid #30363d;
    border-top: 3px solid #3fb950;
}
.home-card--blue {
    background: #161b22;
    border: 1px solid #30363d;
    border-top: 3px solid #58a6ff;
}
.home-card--purple {
    background: #161b22;
    border: 1px solid #30363d;
    border-top: 3px solid #bc8cff;
}