packages/shared/src/server/cards/cards.module.scss
.cards {
display: flex;
justify-content: space-evenly;
flex-wrap: wrap;
gap: 25px;
width: var(--max-width);
max-width: 95vw;
margin: auto;
}
.card {
all: unset;
display: flex;
flex-direction: column;
padding: 1rem 1.2rem;
border-radius: var(--border-radius);
background: rgba(var(--card-rgb), 0);
border: 1px solid rgba(var(--card-border-rgb), 0.1);
cursor: pointer;
max-width: 300px;
transition:
background 200ms,
border 200ms;
}
.card span {
display: inline-block;
transition: transform 200ms;
}
.card h2 {
font-weight: 600;
margin-top: 0;
text-align: start;
}
.card p {
margin: 0;
opacity: 0.6;
font-size: 0.9rem;
line-height: 1.5;
width: 34ch;
text-align: justify;
}
.card nav {
display: flex;
gap: 15px;
padding-top: 10px;
}
.card nav select {
flex-grow: 1;
}
/* Enable hover only on non-touch devices */
@media (hover: hover) and (pointer: fine) {
.card:hover {
background: rgba(var(--card-rgb), 0.1);
border: 1px solid rgba(var(--card-border-rgb), 0.15);
}
.card:hover span {
transform: translateX(4px);
}
}
/* Mobile and Tablet */
@media (max-width: 1023px) {
.card {
padding: 1rem 2.5rem;
}
.card h2 {
margin-bottom: 0.5rem;
}
}