sdetProfile/css/app.css
2026-05-10 23:57:19 +00:00

456 lines
21 KiB
CSS

/* app.css — Playwright runner UI */
body {
display: grid;
grid-template-rows: 36px 1fr 22px;
height: 100vh;
overflow: hidden;
}
/* ===================== TOP BAR ===================== */
.topbar {
display: grid;
grid-template-columns: 1fr auto 1fr;
align-items: center;
background: var(--topbar-bg);
border-bottom: 1px solid var(--line);
padding: 0 10px;
gap: 12px;
font-size: var(--text-xs);
}
.topbar__left, .topbar__right { display: flex; align-items: center; gap: 10px; }
.topbar__right { justify-content: flex-end; }
.brand { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; color: var(--text); }
.brand__logo { width: 22px; height: 22px; color: var(--text-2); }
.brand__name { font-family: var(--font-mono); letter-spacing: .2px; }
.crumb { color: var(--text-3); font-family: var(--font-mono); font-size: var(--text-xs); }
.crumb__sep { color: var(--text-4); padding: 0 6px; }
.crumb strong { color: var(--text); font-weight: 500; }
.status-pill {
display: inline-flex; align-items: center; gap: 10px;
height: 24px; padding: 0 12px;
background: var(--bg-3); border: 1px solid var(--line);
border-radius: 999px; font-family: var(--font-mono); font-size: var(--text-xs);
color: var(--text-2);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--text-4); display: inline-block; }
.dot--idle { background: var(--text-4); }
.dot--running { background: var(--accent); box-shadow: 0 0 0 0 rgba(78,201,176,.6); animation: pulse 1.2s infinite; }
.dot--pass { background: var(--pass); }
.dot--fail { background: var(--fail); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(78,201,176,.55);} 70%{box-shadow:0 0 0 8px rgba(78,201,176,0);} 100%{box-shadow:0 0 0 0 rgba(78,201,176,0);} }
.status-counts { display: inline-flex; gap: 10px; padding-left: 10px; border-left: 1px solid var(--line-2); }
.cnt em { font-style: normal; font-weight: 600; }
.cnt--pass { color: var(--pass); }
.cnt--fail { color: var(--fail); }
.cnt--skip { color: var(--skip); }
.btn {
display: inline-flex; align-items: center; gap: 6px;
height: 24px; padding: 0 10px;
background: var(--bg-3); color: var(--text);
border: 1px solid var(--line-2); border-radius: var(--radius-sm);
cursor: pointer; transition: background .15s var(--ease), border-color .15s;
}
.btn:hover { background: var(--hover); }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn--run {
background: var(--pass); color: #0b1f1a; border-color: transparent; font-weight: 600;
}
.btn--run:hover { background: var(--pass-2); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--text-2); }
.btn--ghost:hover { background: var(--hover); color: var(--text); }
.iconbtn { background: transparent; border: 0; color: var(--text-3); cursor: pointer; padding: 4px; border-radius: 3px; }
.iconbtn:hover { background: var(--hover); color: var(--text); }
.toggle { display: inline-flex; align-items: center; gap: 6px; font-family: var(--font-mono); color: var(--text-3); font-size: var(--text-xs); user-select: none; cursor: pointer; }
.toggle input { accent-color: var(--accent); }
/* ===================== LAYOUT ===================== */
.layout {
display: grid;
grid-template-columns: 320px 1fr;
min-height: 0;
overflow: hidden;
}
/* ===================== SIDEBAR ===================== */
.sidebar {
display: flex; flex-direction: column; min-height: 0;
background: var(--bg-2);
border-right: 1px solid var(--line);
}
.sidebar__head {
display: flex; align-items: center; justify-content: space-between;
padding: 10px 12px 6px;
}
.sidebar__title {
font-size: 10.5px; letter-spacing: .14em; color: var(--text-3); text-transform: uppercase; font-weight: 600;
}
.filter {
display: flex; align-items: center; gap: 6px;
margin: 4px 10px 8px;
background: var(--bg-3); border: 1px solid var(--line-2);
border-radius: 3px; padding: 4px 8px;
}
.filter:focus-within { border-color: var(--accent); }
.filter__icon { color: var(--text-4); font-size: 13px; }
.filter input {
flex: 1; background: transparent; border: 0; outline: 0;
color: var(--text); font-family: var(--font-mono); font-size: var(--text-xs);
}
.tags {
display: flex; flex-wrap: wrap; gap: 4px;
padding: 0 10px 8px;
}
.tag {
display: inline-flex; align-items: center;
font-family: var(--font-mono); font-size: 10.5px;
background: var(--tag-bg); color: var(--tag-fg);
padding: 2px 6px; border-radius: 3px; cursor: pointer; user-select: none;
border: 1px solid transparent;
transition: background .12s, border-color .12s;
}
.tag:hover { background: var(--hover); }
.tag.is-active { background: var(--accent); color: #0b1f1a; }
:root[data-theme='light'] .tag.is-active { color: #fff; }
.tree { flex: 1; overflow: auto; padding: 4px 0 16px; font-size: var(--text-sm); }
.suite { padding: 6px 10px 2px; }
.suite__head { display: flex; align-items: center; gap: 6px; color: var(--text-3); font-family: var(--font-mono); font-size: var(--text-xs); }
.suite__caret { width: 12px; display: inline-block; transition: transform .15s; }
.suite.collapsed .suite__caret { transform: rotate(-90deg); }
.suite.collapsed .test { display: none; }
.suite__name { color: var(--text-2); }
.suite__name em { color: var(--accent); font-style: normal; }
.test {
display: grid;
grid-template-columns: 22px 14px 1fr auto;
gap: 6px; align-items: center;
padding: 4px 10px 4px 22px;
cursor: pointer; border-left: 2px solid transparent;
transition: background .1s;
position: relative;
}
.test:hover { background: var(--hover); }
.test.is-selected { background: var(--active); border-left-color: var(--accent); }
.test.is-running { background: var(--hover); }
.test__run {
width: 18px; height: 18px; border-radius: 3px;
display: inline-flex; align-items: center; justify-content: center;
color: var(--green-arrow); background: transparent;
border: 0; cursor: pointer; opacity: .85;
}
.test__run:hover { background: var(--hover); opacity: 1; }
.test__run svg { width: 10px; height: 10px; }
.test.is-running .test__run, .test.is-passed .test__run { opacity: 1; }
.test__icon { width: 14px; height: 14px; display: inline-flex; align-items: center; justify-content: center; }
.test__icon svg { width: 12px; height: 12px; }
.icon--idle { color: var(--text-4); }
.icon--run { color: var(--accent); }
.icon--pass { color: var(--pass); }
.icon--fail { color: var(--fail); }
.spin { animation: spin 1s linear infinite; transform-origin: center; }
@keyframes spin { from{transform:rotate(0)} to{transform:rotate(360deg)} }
.test__title { color: var(--text); font-family: var(--font-mono); font-size: var(--text-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.test__title span.kw { color: var(--info); }
.test__title span.str { color: #ce9178; }
:root[data-theme='light'] .test__title span.str { color: #a31515; }
.test__dur { color: var(--text-4); font-family: var(--font-mono); font-size: 10.5px; }
.test__tags { grid-column: 3 / span 2; padding-top: 2px; display: flex; flex-wrap: wrap; gap: 3px; }
.test__tags .tag { font-size: 10px; padding: 1px 5px; }
.sidebar__foot {
padding: 8px 12px; border-top: 1px solid var(--line);
color: var(--text-4); font-family: var(--font-mono); font-size: 10.5px;
}
/* ===================== MAIN PANE ===================== */
.main { display: grid; grid-template-rows: 34px 1fr; min-height: 0; background: var(--bg); }
.tabs {
display: flex; align-items: stretch;
background: var(--bg-2);
border-bottom: 1px solid var(--line);
padding-left: 6px;
}
.tab {
background: transparent; border: 0; cursor: pointer;
padding: 0 14px; color: var(--text-3); font-size: var(--text-xs); font-family: var(--font-mono);
border-top: 2px solid transparent;
position: relative;
}
.tab:hover { color: var(--text); }
.tab.is-active { color: var(--text); background: var(--bg); border-top-color: var(--accent); }
.tabs__spacer { flex: 1; }
.tabs__meta { display: flex; align-items: center; padding: 0 14px; color: var(--text-4); font-family: var(--font-mono); font-size: 10.5px; }
.pane { display: none; height: 100%; overflow: auto; padding: 0; }
.pane.is-active { display: block; }
/* HERO */
.hero { padding: 36px 36px 18px; border-bottom: 1px solid var(--line); }
.hero__tag { display: inline-block; font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; color: var(--accent); background: rgba(78,201,176,.1); padding: 2px 8px; border-radius: 3px; text-transform: uppercase; margin-bottom: 12px; }
.hero__title { margin: 0; font-size: clamp(34px, 4vw, 52px); font-weight: 700; letter-spacing: -.02em; line-height: 1.05; }
.hero__sub { color: var(--text-3); font-family: var(--font-mono); font-size: var(--text-sm); margin: 8px 0 0; }
.hero__hint { color: var(--text-3); margin: 18px 0 0; font-size: var(--text-sm); }
.kbd { font-family: var(--font-mono); background: var(--kbd-bg); border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 3px; padding: 1px 6px; font-size: 11px; color: var(--text); }
/* RESULTS list */
.results { padding: 12px 0 80px; }
.result {
border-bottom: 1px solid var(--line);
padding: 0 36px;
}
.result__head {
display: grid;
grid-template-columns: 18px 18px 1fr auto auto;
gap: 10px; align-items: center;
padding: 12px 0;
cursor: pointer;
}
.result__caret { color: var(--text-4); transition: transform .2s; }
.result.is-open .result__caret { transform: rotate(90deg); }
.result__status { width: 18px; height: 18px; display: inline-flex; align-items: center; justify-content: center; }
.result__status svg { width: 14px; height: 14px; }
.result__title { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text); }
.result__title .kw { color: var(--info); }
.result__title .str { color: #ce9178; }
:root[data-theme='light'] .result__title .str { color: #a31515; }
.result__dur { color: var(--text-4); font-family: var(--font-mono); font-size: 11px; }
.result__rerun { color: var(--text-3); background: transparent; border: 0; cursor: pointer; padding: 4px; border-radius: 3px; }
.result__rerun:hover { background: var(--hover); color: var(--text); }
.result__body { display: none; padding: 4px 0 24px 46px; animation: slideDown .25s var(--ease); }
.result.is-open .result__body { display: block; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-4px);} to { opacity: 1; transform: none; } }
.progress {
height: 2px; width: 100%; background: transparent; overflow: hidden; position: relative;
margin: -2px 0 0;
}
.progress__bar {
position: absolute; left: 0; top: 0; height: 100%; width: 0; background: var(--accent);
transition: width .12s linear;
}
/* "Test step" rows inside a result */
.step {
display: grid;
grid-template-columns: 18px 1fr auto;
gap: 10px; align-items: center;
padding: 5px 0; font-family: var(--font-mono); font-size: var(--text-xs);
color: var(--text-2);
border-left: 1px dashed var(--line-2);
padding-left: 14px;
}
.step__icon { color: var(--pass); }
.step__icon.is-skip { color: var(--skip); }
.step__icon.is-info { color: var(--info); }
.step__dur { color: var(--text-4); }
.step__title em { color: var(--accent); font-style: normal; }
/* Generic content blocks for test bodies */
.block { padding: 6px 0; }
.block h4 { margin: 14px 0 6px; font-size: var(--text-sm); color: var(--text); font-family: var(--font-mono); }
.block h4::before { content: '// '; color: var(--text-4); }
.block p { margin: 4px 0; color: var(--text-2); max-width: 78ch; }
.block ul { margin: 4px 0; padding-left: 18px; color: var(--text-2); }
.block ul li { padding: 2px 0; }
.block strong { color: var(--text); }
.block a { color: var(--info); border-bottom: 1px dashed var(--info); }
.block a:hover { border-bottom-style: solid; }
.snippet {
font-family: var(--font-mono); font-size: var(--text-xs);
background: var(--bg-2); border: 1px solid var(--line);
border-radius: var(--radius); padding: 14px 16px;
white-space: pre; overflow: auto;
display: grid; grid-template-columns: auto 1fr; gap: 0 14px;
margin: 10px 0;
}
.snippet .ln { color: var(--text-4); user-select: none; text-align: right; }
.snippet .code .kw { color: var(--info); }
.snippet .code .fn { color: #dcdcaa; }
.snippet .code .str { color: #ce9178; }
.snippet .code .num { color: #b5cea8; }
.snippet .code .cm { color: #6a9955; font-style: italic; }
.snippet .code .tag { color: var(--accent); }
:root[data-theme='light'] .snippet .code .str { color: #a31515; }
:root[data-theme='light'] .snippet .code .fn { color: #795e26; }
:root[data-theme='light'] .snippet .code .cm { color: #008000; }
:root[data-theme='light'] .snippet .code .num { color: #098658; }
/* Cards (projects) */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px,1fr)); gap: 12px; margin: 8px 0; }
.card { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px; background: var(--panel-2); }
.card h5 { margin: 0 0 4px; font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text); }
.card p { margin: 4px 0 0; color: var(--text-2); font-size: var(--text-xs); }
.card__tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 8px; }
/* Skills bars */
.skills { display: grid; gap: 10px; margin: 8px 0; }
.skill {
display: grid; grid-template-columns: 1fr 80px; gap: 12px; align-items: center;
padding: 8px 0; border-top: 1px dashed var(--line);
}
.skill:first-child { border-top: 0; }
.skill__name { font-family: var(--font-mono); font-size: var(--text-xs); color: var(--text-2); }
.skill__name strong { color: var(--text); }
.skill__bar { position: relative; height: 6px; background: var(--bg-2); border-radius: 3px; overflow: hidden; }
.skill__fill { position: absolute; left: 0; top: 0; height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--info)); transition: width .8s var(--ease); }
.skill__pct { font-family: var(--font-mono); font-size: 11px; color: var(--text-3); text-align: right; }
/* Contact grid */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px,1fr)); gap: 12px; margin: 8px 0; }
.contact-cell {
border: 1px solid var(--line); border-radius: var(--radius);
padding: 12px 14px; background: var(--panel-2);
font-family: var(--font-mono); font-size: var(--text-xs);
}
.contact-cell label { color: var(--text-4); display: block; font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 4px; }
.contact-cell a { color: var(--info); }
.contact-cell a:hover { text-decoration: underline; }
/* CTA row */
.cta-row { display: flex; gap: 10px; flex-wrap: wrap; margin: 16px 0 6px; }
.cta {
display: inline-flex; align-items: center; gap: 8px;
padding: 9px 16px; border-radius: var(--radius);
background: var(--accent); color: #062018; font-weight: 700;
border: 0; cursor: pointer; font-family: var(--font-mono); font-size: var(--text-xs);
text-decoration: none; letter-spacing: .02em;
}
.cta:hover { filter: brightness(1.05); }
.cta--ghost { background: transparent; color: var(--text); border: 1px solid var(--line-2); }
:root[data-theme='light'] .cta { color: #ffffff; }
:root[data-theme='light'] .cta--ghost { color: var(--text); }
/* ===================== TRACE PANE ===================== */
.trace-head { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--line); }
.trace-head__title { font-family: var(--font-mono); font-size: var(--text-sm); color: var(--text); }
.trace-head__meta { display: flex; gap: 14px; font-family: var(--font-mono); font-size: 11px; color: var(--text-3); }
.legend { display: inline-flex; align-items: center; gap: 6px; }
.sw { width: 10px; height: 10px; border-radius: 2px; background: var(--text-4); display: inline-block; }
.sw--pass { background: var(--pass); }
.sw--info { background: var(--info); }
.trace { padding: 18px 24px; display: grid; gap: 6px; }
.trace-row { display: grid; grid-template-columns: 220px 1fr 90px; gap: 12px; align-items: center; font-family: var(--font-mono); font-size: 11.5px; }
.trace-row__label { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trace-row__label small { color: var(--text-4); }
.trace-row__track { position: relative; height: 16px; background: var(--bg-2); border-radius: 3px; }
.trace-row__bar { position: absolute; top: 2px; bottom: 2px; background: var(--pass); border-radius: 2px; opacity: .85; }
.trace-row__bar:hover { opacity: 1; }
.trace-row__dur { color: var(--text-4); text-align: right; }
.trace-rule { height: 1px; background: var(--line); margin: 8px 0 0; }
.trace-axis { display: grid; grid-template-columns: 220px 1fr 90px; gap: 12px; padding: 6px 24px 16px; font-family: var(--font-mono); font-size: 10.5px; color: var(--text-4); }
.trace-axis__ticks { display: flex; justify-content: space-between; }
/* ===================== SOURCE PANE ===================== */
.source { font-family: var(--font-mono); font-size: var(--text-xs); padding: 14px 0; line-height: 1.65; }
.source__line { display: grid; grid-template-columns: 50px 1fr; gap: 14px; padding: 0 24px 0 0; }
.source__line:hover { background: var(--hover); }
.source__ln { color: var(--text-4); text-align: right; user-select: none; padding-left: 12px; border-right: 1px solid var(--line); }
.source__code { color: var(--text); white-space: pre; }
.source .kw { color: var(--info); }
.source .fn { color: #dcdcaa; }
.source .str { color: #ce9178; }
.source .num { color: #b5cea8; }
.source .cm { color: #6a9955; font-style: italic; }
.source .tag { color: var(--accent); }
:root[data-theme='light'] .source .str { color: #a31515; }
:root[data-theme='light'] .source .fn { color: #795e26; }
:root[data-theme='light'] .source .cm { color: #008000; }
:root[data-theme='light'] .source .num { color: #098658; }
/* ===================== CONSOLE PANE ===================== */
.console { font-family: var(--font-mono); font-size: var(--text-xs); padding: 8px 0; }
.console__line {
display: grid; grid-template-columns: 80px 60px 1fr; gap: 12px;
padding: 3px 24px;
border-bottom: 1px dotted transparent;
}
.console__line:hover { background: var(--hover); }
.console__ts { color: var(--text-4); }
.console__lvl { font-weight: 600; }
.lvl--info { color: var(--info); }
.lvl--ok { color: var(--pass); }
.lvl--warn { color: var(--skip); }
.lvl--err { color: var(--fail); }
.console__msg { color: var(--text-2); white-space: pre-wrap; }
/* ===================== STATUSBAR ===================== */
.statusbar {
display: flex; align-items: center; gap: 14px;
background: var(--statusbar-bg); color: var(--statusbar-fg);
padding: 0 12px; font-family: var(--font-mono); font-size: 11px;
}
.sb__seg { display: inline-flex; align-items: center; gap: 6px; opacity: .95; }
.sb__seg--accent { background: rgba(255,255,255,.15); padding: 0 8px; height: 18px; border-radius: 2px; }
.sb__spacer { flex: 1; }
/* ===================== MOBILE SIDEBAR DRAWER ===================== */
.menu-btn { display: none; }
.sidebar-scrim { display: none; } /* hidden on desktop, escapes grid flow */
/* ===================== RESPONSIVE ===================== */
@media (max-width: 900px) {
body { grid-template-rows: 44px 1fr 22px; overflow: auto; }
.topbar { grid-template-columns: auto 1fr auto; padding: 0 8px; gap: 6px; }
.topbar__center { display: none; }
.topbar__left .crumb { display: none; }
.topbar__right .toggle { display: none; }
.topbar__right { gap: 4px; }
.btn--run span { display: none; }
.btn { padding: 0 8px; }
.menu-btn { display: inline-flex; }
.layout { grid-template-columns: 1fr; min-height: 0; }
.sidebar {
position: fixed; top: 44px; bottom: 22px; left: 0;
width: 86%; max-width: 320px; z-index: 50;
transform: translateX(-100%); transition: transform .25s var(--ease);
box-shadow: 4px 0 12px rgba(0,0,0,.4);
}
.sidebar.is-open { transform: translateX(0); }
.sidebar-scrim {
position: fixed; inset: 44px 0 22px 0; background: rgba(0,0,0,.45);
z-index: 49; display: none;
}
.sidebar-scrim.is-open { display: block; }
.tabs { overflow-x: auto; }
.tabs__meta { display: none; }
.hero { padding: 22px 18px 14px; }
.hero__title { font-size: 32px; }
.hero__sub { font-size: 12px; word-break: break-word; }
.hero__hint { font-size: 12.5px; }
.result { padding: 0 16px; }
.result__head { grid-template-columns: 16px 16px 1fr auto; gap: 8px; }
.result__rerun { display: none; }
.result__title { font-size: 12px; word-break: break-word; white-space: normal; }
.result__body { padding: 4px 0 18px 22px; }
.step { grid-template-columns: 16px 1fr auto; font-size: 11px; }
.step__title { word-break: break-word; white-space: normal; }
.trace-row, .trace-axis { grid-template-columns: 130px 1fr 56px; gap: 8px; font-size: 10.5px; }
.trace-row__label small { display: none; }
.source__line { grid-template-columns: 36px 1fr; }
.source { overflow-x: auto; }
.statusbar { font-size: 10.5px; gap: 8px; }
.statusbar .sb__seg:nth-child(n+6) { display: none; }
}