Files
school_compare/nextjs-app/components/SchoolRow.module.css
Tudor 8b193c830e
All checks were successful
Build and Push Docker Images / Build Backend (FastAPI) (push) Successful in 32s
Build and Push Docker Images / Build Frontend (Next.js) (push) Successful in 1m7s
Build and Push Docker Images / Trigger Portainer Update (push) Successful in 1s
fix(buttons): use inline-flex on all buttons so <a> and <button> render same height
<a> tags are display:inline by default and don't respect vertical padding,
while <button> is inline-block. Mixed anchor/button pairs (View/Add) rendered
at different heights despite identical padding. Apply display:inline-flex +
align-items:center to every button-styled element across SchoolRow, RankingsView,
and SchoolCard. Add border:1px solid transparent to borderless buttons so total
box size matches bordered siblings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 09:15:33 +00:00

292 lines
5.2 KiB
CSS

.row {
display: flex;
background: var(--bg-card, white);
border: 1px solid var(--border-color, #e5dfd5);
border-left: 3px solid transparent;
border-radius: 8px;
padding: 0.875rem 1rem;
transition: border-color 0.15s ease, box-shadow 0.15s ease;
animation: rowFadeIn 0.3s ease-out both;
}
.row:hover {
border-left-color: var(--accent-coral, #e07256);
box-shadow: 0 2px 8px rgba(26, 22, 18, 0.06);
}
.rowInCompare {
border-left-color: var(--accent-teal, #2d7d7d);
background: var(--bg-secondary, #f3ede4);
}
@keyframes rowFadeIn {
from {
opacity: 0;
transform: translateY(8px);
}
to {
opacity: 1;
transform: translateY(0);
}
}
.rowMain {
flex: 1;
min-width: 0;
display: flex;
flex-direction: column;
gap: 0.3rem;
}
/* Line 1: name+score on the left, actions pinned right */
.rowTop {
display: flex;
align-items: center;
gap: 1rem;
}
/* Name + score grouped together on the left */
.nameScore {
display: flex;
align-items: baseline;
gap: 0.75rem;
flex: 1;
min-width: 0;
}
.schoolName {
font-size: 0.9375rem;
font-weight: 600;
color: var(--text-primary, #1a1612);
text-decoration: none;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
min-width: 0;
flex-shrink: 1;
}
.schoolName:hover {
color: var(--accent-coral, #e07256);
}
/* Score block: value + label inline */
.scoreBlock {
display: flex;
align-items: baseline;
gap: 0.3rem;
flex-shrink: 0;
white-space: nowrap;
}
.scoreValue {
font-size: 1.0625rem;
font-weight: 700;
color: var(--text-primary, #1a1612);
font-family: var(--font-playfair), 'Playfair Display', serif;
line-height: 1.2;
display: flex;
align-items: center;
gap: 0.2rem;
}
.scoreNA {
font-size: 1rem;
color: var(--text-muted, #8a847a);
}
.scoreLabel {
font-size: 0.75rem;
color: var(--text-muted, #8a847a);
white-space: nowrap;
}
/* Trend arrow */
.trend {
display: inline-flex;
align-items: center;
margin-left: 2px;
}
.trendUp {
color: var(--accent-teal, #2d7d7d);
}
.trendDown {
color: var(--accent-coral, #e07256);
}
.trendStable {
color: var(--text-muted, #8a847a);
}
/* Action buttons — pinned right, slightly larger on desktop */
.rowActions {
display: flex;
align-items: center;
gap: 0.5rem;
flex-shrink: 0;
}
.btnView {
display: inline-flex;
align-items: center;
padding: 0.5rem 1rem;
font-size: 0.875rem;
font-weight: 500;
color: var(--text-secondary, #5c564d);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 6px;
text-decoration: none;
transition: all 0.15s ease;
white-space: nowrap;
box-sizing: border-box;
}
.btnView:hover {
background: var(--bg-secondary, #f3ede4);
color: var(--text-primary, #1a1612);
border-color: var(--text-muted, #8a847a);
}
.btnCompare {
display: inline-flex;
align-items: center;
padding: 0.5rem 1rem;
font-size: 0.875rem;
font-weight: 600;
color: white;
background: var(--accent-coral, #e07256);
border: 1px solid transparent;
border-radius: 6px;
cursor: pointer;
transition: background 0.15s ease;
white-space: nowrap;
box-sizing: border-box;
}
.btnCompare:hover {
background: var(--accent-coral-dark, #c45a3f);
}
.btnRemove {
display: inline-flex;
align-items: center;
padding: 0.5rem 1rem;
font-size: 0.875rem;
font-weight: 500;
color: var(--text-secondary, #5c564d);
background: var(--bg-secondary, #f3ede4);
border: 1px solid var(--border-color, #e5dfd5);
border-radius: 6px;
cursor: pointer;
transition: all 0.15s ease;
white-space: nowrap;
box-sizing: border-box;
}
.btnRemove:hover {
background: var(--border-color, #e5dfd5);
color: var(--text-primary, #1a1612);
}
/* Line 2: Meta tags */
.rowMeta {
display: flex;
flex-wrap: wrap;
align-items: center;
gap: 0.25rem 0;
font-size: 0.8rem;
color: var(--text-muted, #8a847a);
}
.rowMeta span:not(:last-child)::after {
content: '·';
margin: 0 0.4rem;
color: var(--border-color, #e5dfd5);
}
.distanceBadge {
display: inline-block;
padding: 0.0625rem 0.375rem;
font-size: 0.75rem;
font-weight: 600;
background: var(--accent-teal, #2d7d7d);
color: white;
border-radius: 3px;
margin-left: 0.25rem;
}
/* Line 3: Progress scores */
.rowProgress {
display: flex;
flex-wrap: wrap;
gap: 0.25rem 1rem;
margin-top: 0.125rem;
}
.progressItem {
font-size: 0.8rem;
color: var(--text-secondary, #5c564d);
}
.progressValue {
color: var(--text-primary, #1a1612);
margin: 0 0.25rem;
}
.progressBand {
font-style: normal;
font-size: 0.75rem;
color: var(--text-muted, #8a847a);
}
/* Mobile */
@media (max-width: 640px) {
.row {
padding: 0.75rem;
border-radius: 6px;
}
.rowTop {
flex-wrap: wrap;
gap: 0.5rem;
}
/* School name takes full width, score+actions wrap below */
.nameScore {
flex-basis: 100%;
min-width: 0;
}
.schoolName {
white-space: normal;
}
/* Score block stays inline with label visible */
.scoreBlock {
align-items: baseline;
}
.scoreLabel {
font-size: 0.7rem;
}
/* Actions move to end of the wrapped row */
.rowActions {
margin-left: auto;
gap: 0.375rem;
}
.btnView,
.btnCompare,
.btnRemove {
padding: 0.4375rem 0.875rem;
font-size: 0.875rem;
}
.rowProgress {
gap: 0.375rem 0.75rem;
}
}