示例工程 51-test-pyramid
51-test-pyramid/app/src/styles/app.css
.app {
min-height: 100vh;
}
.header {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
height: 60px;
padding: 0 20px;
border-bottom: 1px solid var(--border);
background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.brand {
display: flex;
align-items: center;
gap: 10px;
}
.logo {
display: grid;
place-items: center;
width: 30px;
height: 30px;
border-radius: 9px;
background: #0f172a;
color: #ffffff;
font-size: 13px;
font-weight: 700;
}
.brand h1 {
margin: 0;
font-size: 15px;
}
.header-side {
display: flex;
align-items: center;
gap: 7px;
}
.pill {
padding: 2px 8px;
border: 1px solid var(--border);
border-radius: 999px;
color: var(--muted);
font-size: 10px;
}
.ok-pill {
border-color: #86efac;
background: #f0fdf4;
color: #166534;
}
.bad-pill {
border-color: #fecaca;
background: #fef2f2;
color: #991b1b;
}
.banner {
margin: 12px 20px 0;
padding: 8px 11px;
border: 1px solid var(--border);
border-radius: 8px;
background: var(--panel);
color: var(--muted);
font-size: 11px;
}
.banner.ok {
border-color: #86efac;
background: #f0fdf4;
color: #166534;
}
.banner.warn {
border-color: #fcd34d;
background: #fffbeb;
color: #92400e;
}
.layout {
display: grid;
grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
gap: 12px;
padding: 12px 20px 20px;
}
.column {
display: flex;
flex-direction: column;
gap: 10px;
min-width: 0;
}
.card-head {
display: flex;
align-items: baseline;
justify-content: space-between;
gap: 8px;
margin-bottom: 7px;
}
.card h2 {
margin: 0;
font-size: 12.5px;
}
.small {
font-size: 10.5px;
}
.btn {
height: 28px;
padding: 0 9px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--surface);
color: var(--text);
font-size: 10.5px;
}
.btn.primary {
border-color: var(--primary);
background: var(--primary);
color: var(--primary-fg);
}
.btn.danger {
border-color: #fca5a5;
background: #fef2f2;
color: #991b1b;
}
.btn:hover {
border-color: var(--primary);
}
.actions {
display: flex;
align-items: center;
gap: 4px;
}
.pyramid {
display: flex;
flex-direction: column;
align-items: center;
gap: 5px;
padding: 4px 0 8px;
}
.tier {
display: flex;
align-items: center;
justify-content: space-between;
gap: 8px;
padding: 5px 8px;
border-radius: 6px;
color: #0f172a;
font-size: 10px;
}
.tier b {
font-family: var(--font-mono);
font-size: 9px;
font-weight: 500;
}
.tier.unit {
width: 100%;
background: #dbeafe;
}
.tier.integration {
width: 66%;
background: #fef3c7;
}
.tier.e2e {
width: 40%;
background: #fee2e2;
}
.stats {
display: grid;
grid-template-columns: repeat(4, minmax(0, 1fr));
gap: 6px;
margin: 0;
padding: 0;
list-style: none;
}
.stats li {
padding: 6px 8px;
border: 1px solid var(--border);
border-radius: 7px;
background: var(--panel);
}
.stats li span {
display: block;
color: var(--muted);
font-size: 9px;
}
.stats li b {
font-family: var(--font-mono);
font-size: 12px;
font-weight: 600;
}
.results,
.todos,
.commands,
.activity {
margin: 0;
padding: 0;
list-style: none;
}
.result-row {
display: grid;
grid-template-columns: 38px 38px minmax(0, 1fr) 44px 120px;
align-items: center;
gap: 6px;
padding: 4px 0;
border-bottom: 1px solid var(--border);
font-size: 9.4px;
}
.result-row:last-child {
border-bottom: none;
}
.result-name {
overflow-wrap: anywhere;
}
.result-ms {
color: var(--muted);
font-family: var(--font-mono);
font-size: 8.4px;
text-align: right;
}
.result-row code {
color: var(--muted);
font-size: 8.2px;
overflow-wrap: anywhere;
}
.tag {
padding: 1px 6px;
border-radius: 999px;
background: var(--panel);
color: var(--muted);
font-size: 8.8px;
font-weight: 600;
white-space: nowrap;
text-align: center;
}
.tag.ok {
background: #dcfce7;
color: #166534;
}
.tag.bad {
background: #fee2e2;
color: #991b1b;
}
.tag.layer-unit {
background: #dbeafe;
color: #1d4ed8;
}
.tag.layer-integration {
background: #fef3c7;
color: #92400e;
}
.tag.layer-e2e {
background: #fee2e2;
color: #991b1b;
}
.add-row {
display: flex;
gap: 5px;
margin-bottom: 7px;
}
.add-row input {
flex: 1;
height: 28px;
padding: 0 8px;
border: 1px solid var(--border);
border-radius: 6px;
font: inherit;
font-size: 10.5px;
}
.todo-row {
display: flex;
align-items: center;
gap: 7px;
padding: 4px 0;
border-bottom: 1px solid var(--border);
font-size: 10px;
}
.todo-row:last-child {
border-bottom: none;
}
.todo-row.done span {
color: var(--muted);
text-decoration: line-through;
}
.todo-row input {
accent-color: var(--primary);
}
.commands li {
display: flex;
flex-direction: column;
gap: 1px;
padding: 5px 0;
border-bottom: 1px solid var(--border);
}
.commands li:last-child {
border-bottom: none;
}
.commands code {
font-size: 8.6px;
overflow-wrap: anywhere;
}
.commands span {
color: var(--muted);
font-size: 8.8px;
}
.command-note {
margin: 7px 0 0;
line-height: 1.6;
}
.ok-text {
color: #166534;
}
.bad-text {
color: #991b1b;
}
.activity {
max-height: 120px;
overflow: auto;
}
.event-row {
display: grid;
grid-template-columns: 56px 62px minmax(0, 1fr);
gap: 6px;
padding: 3px 0;
border-bottom: 1px solid var(--border);
font-size: 9.5px;
}
.event-row:last-child {
border-bottom: none;
}
.event-row .kind {
color: var(--primary);
}
body[data-shot="overview"] .pyramid-card {
border-color: #bfdbfe;
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
body[data-shot="failure"] .results-card {
border-color: #fca5a5;
box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}
body[data-shot="e2e"] .results-card {
border-color: #86efac;
box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.08);
}
@media (max-width: 820px) {
.layout {
grid-template-columns: 1fr;
}
.stats {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
}