More actions
No edit summary |
No edit summary |
||
Line 3: | Line 3: | ||
display: grid; | display: grid; | ||
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); | ||
grid-auto-rows: 1fr; /* Makes all rows equal height */ | |||
gap: 1.5rem; | gap: 1.5rem; | ||
margin: 1.5rem 0; | margin: 1.5rem 0; | ||
} | } | ||
Line 15: | Line 15: | ||
transition: all 0.3s ease; | transition: all 0.3s ease; | ||
box-shadow: var(--box-shadow-card); | box-shadow: var(--box-shadow-card); | ||
display: flex; | display: flex; | ||
flex-direction: column; /* Stack header, content, footer vertically */ | flex-direction: column; /* Stack header, content, footer vertically */ | ||
min-height: 100%; /* Stretch to fill the full grid cell */ | |||
} | } | ||
Line 60: | Line 60: | ||
padding: 1rem; | padding: 1rem; | ||
color: var(--color-base); | color: var(--color-base); | ||
flex | flex: 1; /* This is equivalent to flex-grow: 1 and allows content to expand */ | ||
} | } | ||
Line 83: | Line 83: | ||
color: var(--color-subtle); | color: var(--color-subtle); | ||
flex-shrink: 0; /* Prevents footer from shrinking */ | flex-shrink: 0; /* Prevents footer from shrinking */ | ||
margin-top: auto; /* Pushes footer to bottom */ | |||
} | } | ||
Line 163: | Line 164: | ||
transition: all 0.3s ease; | transition: all 0.3s ease; | ||
cursor: pointer; | cursor: pointer; | ||
} | } | ||
Revision as of 07:27, 6 July 2025
/* Card System Styles */
.vh-card-group {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
grid-auto-rows: 1fr; /* Makes all rows equal height */
gap: 1.5rem;
margin: 1.5rem 0;
}
.vh-card {
background: var(--color-surface-1);
border: 1px solid var(--border-color-base);
border-radius: 8px;
overflow: hidden;
transition: all 0.3s ease;
box-shadow: var(--box-shadow-card);
display: flex;
flex-direction: column; /* Stack header, content, footer vertically */
min-height: 100%; /* Stretch to fill the full grid cell */
}
.vh-card:hover {
transform: translateY(-2px);
box-shadow: var(--box-shadow-dialog);
}
.vh-card-header {
background: var(--color-surface-2);
padding: 1rem;
border-bottom: 1px solid var(--border-color-base);
display: flex;
align-items: center;
gap: 0.5rem;
flex-shrink: 0; /* Prevents header from shrinking */
}
.vh-card-icon {
font-size: 1.5rem;
color: var(--color-progressive);
flex-shrink: 0; /* Prevents icon from shrinking */
}
.vh-card-title {
margin: 0;
font-size: 1.25rem;
color: var(--color-emphasized);
line-height: 1.3;
}
.vh-card-title a {
color: inherit;
text-decoration: none;
}
.vh-card-title a:hover {
color: var(--color-progressive);
}
.vh-card-content {
padding: 1rem;
color: var(--color-base);
flex: 1; /* This is equivalent to flex-grow: 1 and allows content to expand */
}
.vh-card-content ul {
margin: 0;
padding-left: 1.5rem;
}
.vh-card-content li {
margin-bottom: 0.5rem;
}
.vh-card-content li:last-child {
margin-bottom: 0;
}
.vh-card-footer {
background: var(--color-surface-2);
padding: 0.75rem 1rem;
border-top: 1px solid var(--border-color-base);
font-size: 0.9rem;
color: var(--color-subtle);
flex-shrink: 0; /* Prevents footer from shrinking */
margin-top: auto; /* Pushes footer to bottom */
}
/* Card Type Variants */
.vh-card--primary {
border-color: var(--color-progressive);
}
.vh-card--primary .vh-card-header {
background: var(--color-progressive);
color: white;
}
.vh-card--primary .vh-card-title {
color: white;
}
.vh-card--primary .vh-card-icon {
color: white;
}
.vh-card--success {
border-color: var(--color-success);
}
.vh-card--success .vh-card-header {
background: var(--color-success);
color: white;
}
.vh-card--success .vh-card-title {
color: white;
}
.vh-card--success .vh-card-icon {
color: white;
}
.vh-card--warning {
border-color: var(--color-warning);
}
.vh-card--warning .vh-card-header {
background: var(--color-warning);
color: #000;
}
.vh-card--warning .vh-card-title {
color: #000;
}
.vh-card--warning .vh-card-icon {
color: #000;
}
.vh-card--destructive {
border-color: var(--color-destructive);
}
.vh-card--destructive .vh-card-header {
background: var(--color-destructive);
color: white;
}
.vh-card--destructive .vh-card-title {
color: white;
}
.vh-card--destructive .vh-card-icon {
color: white;
}
/* Quick Link Cards */
.vh-quick-link-card {
background: var(--color-surface-1);
border: 1px solid var(--border-color-base);
border-radius: 8px;
padding: 1rem;
text-align: center;
transition: all 0.3s ease;
cursor: pointer;
}
.vh-quick-link-card:hover {
transform: translateY(-2px);
box-shadow: var(--box-shadow-card);
border-color: var(--color-progressive);
}
.vh-quick-link-icon {
font-size: 2rem;
color: var(--color-progressive);
margin-bottom: 0.5rem;
}
.vh-quick-link-title {
font-weight: bold;
font-size: 1.1rem;
margin-bottom: 0.25rem;
}
.vh-quick-link-title a {
color: var(--color-emphasized);
text-decoration: none;
}
.vh-quick-link-title a:hover {
color: var(--color-progressive);
}
.vh-quick-link-desc {
font-size: 0.9rem;
color: var(--color-subtle);
line-height: 1.4;
}
/* Responsive Design */
@media (max-width: 1024px) {
.vh-card-group {
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}
}
@media (max-width: 768px) {
.vh-card-group {
grid-template-columns: 1fr;
gap: 1rem;
}
.vh-card-header {
padding: 0.75rem;
}
.vh-card-content {
padding: 0.75rem;
}
}