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)
No edit summary
Tag: Manual revert
Xeravax (talk | contribs)
No edit summary
 
(6 intermediate revisions by the same user not shown)
Line 1: Line 1:
/* Container for the tile grid */
/* Container for the tile grid - flex wrap so cards fill each row and wrap to next line */
.resonite-home-grid {
.resonite-home-grid {
     display: grid;
     display: flex;
     grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
     flex-wrap: wrap;
     gap: 12px;
     gap: 12px;
     margin: 1em 0 2em 0;
     margin: 1em 0 2em 0;
    align-items: stretch;
}
.resonite-home-grid > .home-card {
    flex: 1 1 170px;
    min-width: 170px;
}
}


Line 26: Line 32:
}
}


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


/* Icon size and spacing */
/* Icon: ensure emoji or image displays (no code-block styling) */
.home-card__icon {
.home-card__icon {
     font-size: 2.5em;
     font-size: 2.5em;
Line 39: Line 45:
     position: relative;
     position: relative;
     z-index: 0;
     z-index: 0;
    font-family: inherit;
    white-space: normal;
}
.home-card__icon img {
    max-height: 2.5em;
    width: auto;
    vertical-align: middle;
}
/* Undo code-block appearance if parser wraps label in <pre> */
.home-card__label pre {
    display: inline;
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    white-space: normal;
    background: none;
    border: none;
}
}


Line 76: Line 102:
}
}


/* White text on solid dark cards (red, orange) */
/* External link: show only label + small icon (no full URL) */
.home-card--external .home-card__label a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.home-card--external .home-card__label a::after {
    content: " \29C9";
    font-size: 0.75em;
    opacity: 0.85;
    white-space: nowrap;
}
 
/* White text on all full-color cards */
.home-card--red .home-card__label a,
.home-card--red .home-card__label a,
.home-card--orange .home-card__label a {
.home-card--orange .home-card__label a,
.home-card--yellow .home-card__label a,
.home-card--green .home-card__label a,
.home-card--blue .home-card__label a,
.home-card--purple .home-card__label a {
     color: #fff !important;
     color: #fff !important;
}
}
.home-card--red .home-card__icon,
.home-card--red .home-card__icon,
.home-card--orange .home-card__icon {
.home-card--orange .home-card__icon,
.home-card--yellow .home-card__icon,
.home-card--green .home-card__icon,
.home-card--blue .home-card__icon,
.home-card--purple .home-card__icon {
     filter: none;
     filter: none;
}
}


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


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


/* What now?: dark grey + yellow border. Creation & technical: grey + green. Advanced: grey + blue. */
.home-card--yellow {
.home-card--yellow {
     background: #161b22;
     background: #3d3520;
     border: 1px solid #30363d;
     border: 2px solid #d4a72c;
     border-top: 3px solid #d4a72c;
}
.home-card--yellow:hover {
    background: #4a4020;
     border-color: #e5b82e;
}
}
.home-card--green {
.home-card--green {
     background: #161b22;
     background: #1a2e1a;
     border: 1px solid #30363d;
     border: 2px solid #3fb950;
     border-top: 3px solid #3fb950;
}
.home-card--green:hover {
    background: #1e3d1e;
     border-color: #56d364;
}
}
.home-card--blue {
.home-card--blue {
     background: #161b22;
     background: #1a2433;
     border: 1px solid #30363d;
     border: 2px solid #58a6ff;
     border-top: 3px solid #58a6ff;
}
.home-card--blue:hover {
    background: #1e2d44;
     border-color: #79c0ff;
}
}
.home-card--purple {
.home-card--purple {
     background: #161b22;
     background: #2a1a3d;
     border: 1px solid #30363d;
     border: 2px solid #bc8cff;
     border-top: 3px solid #bc8cff;
}
.home-card--purple:hover {
    background: #35204a;
    border-color: #d2a8ff;
}
 
/* Light theme support.
  Per MediaWiki recommendations: support explicit (skin-theme-clientpref-day)
  and automatic/OS mode (skin-theme-clientpref-os + prefers-color-scheme: light). */
@media screen {
    html.skin-theme-clientpref-day .home-card {
    background: #f6f8fa;
    border-color: #d0d7de;
}
html.skin-theme-clientpref-day .home-card:not(.home-card--red):not(.home-card--orange):not(.home-card--yellow):not(.home-card--green):not(.home-card--blue):not(.home-card--purple):hover {
    background: #eaeef2;
    border-color: #8b949e;
}
html.skin-theme-clientpref-day .home-card__label a {
    color: #24292f !important;
}
html.skin-theme-clientpref-day .home-card__icon img {
    filter: invert(1);
}
/* Light theme: dark text on light pastel backgrounds for readability */
html.skin-theme-clientpref-day .home-card--red .home-card__label a,
html.skin-theme-clientpref-day .home-card--orange .home-card__label a,
html.skin-theme-clientpref-day .home-card--yellow .home-card__label a,
html.skin-theme-clientpref-day .home-card--green .home-card__label a,
html.skin-theme-clientpref-day .home-card--blue .home-card__label a,
html.skin-theme-clientpref-day .home-card--purple .home-card__label a {
    color: #24292f !important;
}
/* Invert white icons so they're visible on light backgrounds */
html.skin-theme-clientpref-day .home-card--red .home-card__icon img,
html.skin-theme-clientpref-day .home-card--orange .home-card__icon img,
html.skin-theme-clientpref-day .home-card--yellow .home-card__icon img,
html.skin-theme-clientpref-day .home-card--green .home-card__icon img,
html.skin-theme-clientpref-day .home-card--blue .home-card__icon img,
html.skin-theme-clientpref-day .home-card--purple .home-card__icon img {
    filter: invert(1);
}
/* Light theme color variants */
html.skin-theme-clientpref-day .home-card--red {
    background: #ffebe9;
    border-color: #cf222e;
}
html.skin-theme-clientpref-day .home-card--red:hover {
    background: #ffcecb;
    border-color: #cf222e;
}
html.skin-theme-clientpref-day .home-card--orange {
    background: #fff8c5;
    border-color: #9a6700;
}
html.skin-theme-clientpref-day .home-card--orange:hover {
    background: #fae17d;
    border-color: #9a6700;
}
html.skin-theme-clientpref-day .home-card--yellow {
    background: #fff8c5;
    border-color: #9a6700;
}
html.skin-theme-clientpref-day .home-card--yellow:hover {
    background: #fae17d;
    border-color: #9a6700;
}
html.skin-theme-clientpref-day .home-card--green {
    background: #dafbe1;
    border-color: #2da44e;
}
html.skin-theme-clientpref-day .home-card--green:hover {
    background: #aceebb;
    border-color: #2da44e;
}
html.skin-theme-clientpref-day .home-card--blue {
    background: #ddf4ff;
    border-color: #0969da;
}
html.skin-theme-clientpref-day .home-card--blue:hover {
    background: #b6e3ff;
    border-color: #0969da;
}
html.skin-theme-clientpref-day .home-card--purple {
    background: #fbefff;
    border-color: #8250df;
}
html.skin-theme-clientpref-day .home-card--purple:hover {
    background: #ecd8ff;
    border-color: #8250df;
}
}
@media screen and (prefers-color-scheme: light) {
    html.skin-theme-clientpref-os .home-card {
        background: #f6f8fa;
        border-color: #d0d7de;
    }
    html.skin-theme-clientpref-os .home-card:not(.home-card--red):not(.home-card--orange):not(.home-card--yellow):not(.home-card--green):not(.home-card--blue):not(.home-card--purple):hover {
        background: #eaeef2;
        border-color: #8b949e;
    }
    html.skin-theme-clientpref-os .home-card__label a {
        color: #24292f !important;
    }
    html.skin-theme-clientpref-os .home-card__icon img {
        filter: invert(1);
    }
    html.skin-theme-clientpref-os .home-card--red .home-card__label a,
    html.skin-theme-clientpref-os .home-card--orange .home-card__label a,
    html.skin-theme-clientpref-os .home-card--yellow .home-card__label a,
    html.skin-theme-clientpref-os .home-card--green .home-card__label a,
    html.skin-theme-clientpref-os .home-card--blue .home-card__label a,
    html.skin-theme-clientpref-os .home-card--purple .home-card__label a {
        color: #24292f !important;
    }
    html.skin-theme-clientpref-os .home-card--red .home-card__icon img,
    html.skin-theme-clientpref-os .home-card--orange .home-card__icon img,
    html.skin-theme-clientpref-os .home-card--yellow .home-card__icon img,
    html.skin-theme-clientpref-os .home-card--green .home-card__icon img,
    html.skin-theme-clientpref-os .home-card--blue .home-card__icon img,
    html.skin-theme-clientpref-os .home-card--purple .home-card__icon img {
        filter: invert(1);
    }
    html.skin-theme-clientpref-os .home-card--red {
        background: #ffebe9;
        border-color: #cf222e;
    }
    html.skin-theme-clientpref-os .home-card--red:hover {
        background: #ffcecb;
        border-color: #cf222e;
    }
    html.skin-theme-clientpref-os .home-card--orange {
        background: #fff8c5;
        border-color: #9a6700;
    }
    html.skin-theme-clientpref-os .home-card--orange:hover {
        background: #fae17d;
        border-color: #9a6700;
    }
    html.skin-theme-clientpref-os .home-card--yellow {
        background: #fff8c5;
        border-color: #9a6700;
     }
    html.skin-theme-clientpref-os .home-card--yellow:hover {
        background: #fae17d;
        border-color: #9a6700;
    }
    html.skin-theme-clientpref-os .home-card--green {
        background: #dafbe1;
        border-color: #2da44e;
    }
    html.skin-theme-clientpref-os .home-card--green:hover {
        background: #aceebb;
        border-color: #2da44e;
    }
    html.skin-theme-clientpref-os .home-card--blue {
        background: #ddf4ff;
        border-color: #0969da;
    }
    html.skin-theme-clientpref-os .home-card--blue:hover {
        background: #b6e3ff;
        border-color: #0969da;
    }
    html.skin-theme-clientpref-os .home-card--purple {
        background: #fbefff;
        border-color: #8250df;
    }
    html.skin-theme-clientpref-os .home-card--purple:hover {
        background: #ecd8ff;
        border-color: #8250df;
    }
}
}

Latest revision as of 23:23, 3 February 2026

/* Container for the tile grid - flex wrap so cards fill each row and wrap to next line */
.resonite-home-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 1em 0 2em 0;
    align-items: stretch;
}

.resonite-home-grid > .home-card {
    flex: 1 1 170px;
    min-width: 170px;
}

/* 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 color modifier */
.home-card:not(.home-card--red):not(.home-card--orange):not(.home-card--yellow):not(.home-card--green):not(.home-card--blue):not(.home-card--purple):hover {
    background: #21262d;
    border-color: #8b949e;
}

/* Icon: ensure emoji or image displays (no code-block styling) */
.home-card__icon {
    font-size: 2.5em;
    margin-bottom: 12px;
    line-height: 1;
    position: relative;
    z-index: 0;
    font-family: inherit;
    white-space: normal;
}

.home-card__icon img {
    max-height: 2.5em;
    width: auto;
    vertical-align: middle;
}

/* Undo code-block appearance if parser wraps label in <pre> */
.home-card__label pre {
    display: inline;
    margin: 0;
    padding: 0;
    font-family: inherit;
    font-size: inherit;
    white-space: normal;
    background: none;
    border: none;
}

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

/* External link: show only label + small icon (no full URL) */
.home-card--external .home-card__label a {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.home-card--external .home-card__label a::after {
    content: " \29C9";
    font-size: 0.75em;
    opacity: 0.85;
    white-space: nowrap;
}

/* White text on all full-color cards */
.home-card--red .home-card__label a,
.home-card--orange .home-card__label a,
.home-card--yellow .home-card__label a,
.home-card--green .home-card__label a,
.home-card--blue .home-card__label a,
.home-card--purple .home-card__label a {
    color: #fff !important;
}
.home-card--red .home-card__icon,
.home-card--orange .home-card__icon,
.home-card--yellow .home-card__icon,
.home-card--green .home-card__icon,
.home-card--blue .home-card__icon,
.home-card--purple .home-card__icon {
    filter: none;
}

/* Color variants: full fill + brighter border (all sides) */
.home-card--red {
    background: #5c1a1a;
    border: 2px solid #e5534b;
}
.home-card--red:hover {
    background: #6e2222;
    border-color: #f85149;
}

.home-card--orange {
    background: #3b2e25;
    border: 2px solid #664c38;
}
.home-card--orange:hover {
    background: #4a3828;
    border-color: #f0883e;
}

.home-card--yellow {
    background: #3d3520;
    border: 2px solid #d4a72c;
}
.home-card--yellow:hover {
    background: #4a4020;
    border-color: #e5b82e;
}

.home-card--green {
    background: #1a2e1a;
    border: 2px solid #3fb950;
}
.home-card--green:hover {
    background: #1e3d1e;
    border-color: #56d364;
}

.home-card--blue {
    background: #1a2433;
    border: 2px solid #58a6ff;
}
.home-card--blue:hover {
    background: #1e2d44;
    border-color: #79c0ff;
}

.home-card--purple {
    background: #2a1a3d;
    border: 2px solid #bc8cff;
}
.home-card--purple:hover {
    background: #35204a;
    border-color: #d2a8ff;
}

/* Light theme support.
   Per MediaWiki recommendations: support explicit (skin-theme-clientpref-day)
   and automatic/OS mode (skin-theme-clientpref-os + prefers-color-scheme: light). */
@media screen {
    html.skin-theme-clientpref-day .home-card {
    background: #f6f8fa;
    border-color: #d0d7de;
}
html.skin-theme-clientpref-day .home-card:not(.home-card--red):not(.home-card--orange):not(.home-card--yellow):not(.home-card--green):not(.home-card--blue):not(.home-card--purple):hover {
    background: #eaeef2;
    border-color: #8b949e;
}
html.skin-theme-clientpref-day .home-card__label a {
    color: #24292f !important;
}
html.skin-theme-clientpref-day .home-card__icon img {
    filter: invert(1);
}
/* Light theme: dark text on light pastel backgrounds for readability */
html.skin-theme-clientpref-day .home-card--red .home-card__label a,
html.skin-theme-clientpref-day .home-card--orange .home-card__label a,
html.skin-theme-clientpref-day .home-card--yellow .home-card__label a,
html.skin-theme-clientpref-day .home-card--green .home-card__label a,
html.skin-theme-clientpref-day .home-card--blue .home-card__label a,
html.skin-theme-clientpref-day .home-card--purple .home-card__label a {
    color: #24292f !important;
}
/* Invert white icons so they're visible on light backgrounds */
html.skin-theme-clientpref-day .home-card--red .home-card__icon img,
html.skin-theme-clientpref-day .home-card--orange .home-card__icon img,
html.skin-theme-clientpref-day .home-card--yellow .home-card__icon img,
html.skin-theme-clientpref-day .home-card--green .home-card__icon img,
html.skin-theme-clientpref-day .home-card--blue .home-card__icon img,
html.skin-theme-clientpref-day .home-card--purple .home-card__icon img {
    filter: invert(1);
}
/* Light theme color variants */
html.skin-theme-clientpref-day .home-card--red {
    background: #ffebe9;
    border-color: #cf222e;
}
html.skin-theme-clientpref-day .home-card--red:hover {
    background: #ffcecb;
    border-color: #cf222e;
}
html.skin-theme-clientpref-day .home-card--orange {
    background: #fff8c5;
    border-color: #9a6700;
}
html.skin-theme-clientpref-day .home-card--orange:hover {
    background: #fae17d;
    border-color: #9a6700;
}
html.skin-theme-clientpref-day .home-card--yellow {
    background: #fff8c5;
    border-color: #9a6700;
}
html.skin-theme-clientpref-day .home-card--yellow:hover {
    background: #fae17d;
    border-color: #9a6700;
}
html.skin-theme-clientpref-day .home-card--green {
    background: #dafbe1;
    border-color: #2da44e;
}
html.skin-theme-clientpref-day .home-card--green:hover {
    background: #aceebb;
    border-color: #2da44e;
}
html.skin-theme-clientpref-day .home-card--blue {
    background: #ddf4ff;
    border-color: #0969da;
}
html.skin-theme-clientpref-day .home-card--blue:hover {
    background: #b6e3ff;
    border-color: #0969da;
}
html.skin-theme-clientpref-day .home-card--purple {
    background: #fbefff;
    border-color: #8250df;
}
html.skin-theme-clientpref-day .home-card--purple:hover {
    background: #ecd8ff;
    border-color: #8250df;
}
}
@media screen and (prefers-color-scheme: light) {
    html.skin-theme-clientpref-os .home-card {
        background: #f6f8fa;
        border-color: #d0d7de;
    }
    html.skin-theme-clientpref-os .home-card:not(.home-card--red):not(.home-card--orange):not(.home-card--yellow):not(.home-card--green):not(.home-card--blue):not(.home-card--purple):hover {
        background: #eaeef2;
        border-color: #8b949e;
    }
    html.skin-theme-clientpref-os .home-card__label a {
        color: #24292f !important;
    }
    html.skin-theme-clientpref-os .home-card__icon img {
        filter: invert(1);
    }
    html.skin-theme-clientpref-os .home-card--red .home-card__label a,
    html.skin-theme-clientpref-os .home-card--orange .home-card__label a,
    html.skin-theme-clientpref-os .home-card--yellow .home-card__label a,
    html.skin-theme-clientpref-os .home-card--green .home-card__label a,
    html.skin-theme-clientpref-os .home-card--blue .home-card__label a,
    html.skin-theme-clientpref-os .home-card--purple .home-card__label a {
        color: #24292f !important;
    }
    html.skin-theme-clientpref-os .home-card--red .home-card__icon img,
    html.skin-theme-clientpref-os .home-card--orange .home-card__icon img,
    html.skin-theme-clientpref-os .home-card--yellow .home-card__icon img,
    html.skin-theme-clientpref-os .home-card--green .home-card__icon img,
    html.skin-theme-clientpref-os .home-card--blue .home-card__icon img,
    html.skin-theme-clientpref-os .home-card--purple .home-card__icon img {
        filter: invert(1);
    }
    html.skin-theme-clientpref-os .home-card--red {
        background: #ffebe9;
        border-color: #cf222e;
    }
    html.skin-theme-clientpref-os .home-card--red:hover {
        background: #ffcecb;
        border-color: #cf222e;
    }
    html.skin-theme-clientpref-os .home-card--orange {
        background: #fff8c5;
        border-color: #9a6700;
    }
    html.skin-theme-clientpref-os .home-card--orange:hover {
        background: #fae17d;
        border-color: #9a6700;
    }
    html.skin-theme-clientpref-os .home-card--yellow {
        background: #fff8c5;
        border-color: #9a6700;
    }
    html.skin-theme-clientpref-os .home-card--yellow:hover {
        background: #fae17d;
        border-color: #9a6700;
    }
    html.skin-theme-clientpref-os .home-card--green {
        background: #dafbe1;
        border-color: #2da44e;
    }
    html.skin-theme-clientpref-os .home-card--green:hover {
        background: #aceebb;
        border-color: #2da44e;
    }
    html.skin-theme-clientpref-os .home-card--blue {
        background: #ddf4ff;
        border-color: #0969da;
    }
    html.skin-theme-clientpref-os .home-card--blue:hover {
        background: #b6e3ff;
        border-color: #0969da;
    }
    html.skin-theme-clientpref-os .home-card--purple {
        background: #fbefff;
        border-color: #8250df;
    }
    html.skin-theme-clientpref-os .home-card--purple:hover {
        background: #ecd8ff;
        border-color: #8250df;
    }
}