Template:Main Page/Sandbox/card/styles.css
Template page
More actions
/* 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;
}