示例工程 37-local-persistence
37-local-persistence/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: var(--primary);
color: #ffffff;
font-size: 10px;
font-weight: 700;
}
.brand h1 {
margin: 0;
font-size: 15px;
}
.header-side {
display: flex;
align-items: center;
gap: 8px;
}
.pill {
padding: 2px 8px;
border: 1px solid var(--border);
border-radius: 999px;
color: var(--muted);
font-size: 10px;
}
.layout {
display: grid;
grid-template-columns: minmax(0, 1.02fr) minmax(0, 0.98fr);
gap: 12px;
padding: 14px 20px 20px;
}
.column {
display: flex;
flex-direction: column;
gap: 10px;
min-width: 0;
}
.card {
border: 1px solid var(--border);
border-radius: 10px;
background: var(--surface);
}
.pad {
padding: 11px 13px;
}
.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;
}
.muted {
color: var(--muted);
}
.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: #fecaca;
background: #fef2f2;
color: #b91c1c;
}
.btn:hover {
border-color: var(--primary);
}
.actions {
display: flex;
gap: 5px;
}
.actions.wrap {
flex-wrap: wrap;
margin-top: 8px;
}
.path {
display: block;
padding: 5px 7px;
border: 1px solid var(--border);
border-radius: 6px;
background: var(--panel);
color: var(--muted);
font-size: 9.5px;
overflow-wrap: anywhere;
}
.metrics {
display: grid;
grid-template-columns: repeat(3, minmax(0, 1fr));
gap: 5px 8px;
margin-top: 8px;
padding: 8px;
border: 1px solid var(--border);
border-radius: 7px;
background: var(--panel);
}
.metrics div {
display: flex;
flex-direction: column;
gap: 1px;
}
.metrics span {
color: var(--muted);
font-size: 9px;
}
.metrics b {
font-family: var(--font-mono);
font-size: 11px;
font-weight: 500;
}
.tag {
padding: 1px 7px;
border-radius: 999px;
background: var(--panel);
color: var(--muted);
font-size: 9px;
font-weight: 600;
}
.tag.ok {
background: #dcfce7;
color: #166534;
}
.tag.warn {
background: #fef3c7;
color: #92400e;
}
.tag.bad {
background: #fee2e2;
color: #991b1b;
}
.error-line {
min-height: 13px;
margin-top: 4px;
color: var(--danger);
font-size: 9.5px;
overflow-wrap: anywhere;
}
.notes {
max-height: 142px;
margin: 4px 0 0;
overflow: auto;
padding: 0;
list-style: none;
}
.note {
display: flex;
flex-direction: column;
gap: 1px;
padding: 4px 0;
border-bottom: 1px solid var(--border);
}
.note:last-child {
border-bottom: none;
}
.note-title {
font-size: 10.5px;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.paths {
margin: 0;
padding: 0;
list-style: none;
}
.paths li {
display: grid;
grid-template-columns: 74px minmax(0, 1fr);
gap: 8px;
padding: 3px 0;
border-bottom: 1px solid var(--border);
font-size: 9.5px;
}
.paths li:last-child {
border-bottom: none;
}
.paths span {
color: var(--muted);
}
.paths code {
overflow-wrap: anywhere;
font-size: 9px;
}
.activity {
margin: 0;
padding: 0;
list-style: none;
max-height: 140px;
overflow: auto;
}
.event-row {
display: grid;
grid-template-columns: 56px 60px 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);
}
.bench table {
width: 100%;
margin-top: 8px;
border-collapse: collapse;
font-size: 10px;
}
.bench th,
.bench td {
padding: 4px 6px;
border-bottom: 1px solid var(--border);
text-align: right;
}
.bench th:first-child,
.bench td:first-child {
text-align: left;
color: var(--muted);
}
.bench th {
color: var(--muted);
font-weight: 600;
}
.bench-meta {
margin-top: 5px;
}
.decision {
background: #f8fbff;
}
.bullets {
margin: 0;
padding-left: 16px;
font-size: 10px;
line-height: 1.7;
}
.bullets strong {
font-weight: 600;
}
body[data-shot="bench"] .bench-card {
outline: 3px dashed var(--primary);
outline-offset: -3px;
}
body[data-shot="json"] .card:first-child {
border-color: #bfdbfe;
}
body[data-shot="sqlite"] .column:last-child .card:first-child {
border-color: #bfdbfe;
}
@media (max-width: 820px) {
.layout {
grid-template-columns: 1fr;
}
}