2aa9d73325
集中保留原版权声明,移除文件头检查和全局测试忽略规则。验证:全量单测、受影响用例复测及静态检查通过。
941 lines
17 KiB
CSS
941 lines
17 KiB
CSS
/*
|
||
* 作品流(WP B-6,方案 §4.1 / §4.4 / §4.5)。
|
||
* 配色全部从 --studio-*(creation.css)与语义 token 派生;不画整页背景。
|
||
*/
|
||
.wf {
|
||
--wf-radius: 12px;
|
||
--wf-media-bg: color-mix(in srgb, var(--text-primary) 5%, transparent);
|
||
--wf-overlay: color-mix(in srgb, var(--surface-card) 82%, transparent);
|
||
--wf-scrim: color-mix(in srgb, var(--text-primary) 55%, transparent);
|
||
--wf-on-scrim: var(--surface-card);
|
||
--wf-success: var(--ui-color-success);
|
||
--wf-warning: var(--ui-color-warning);
|
||
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
padding-top: 4px;
|
||
}
|
||
|
||
.wf-sr-only {
|
||
position: absolute;
|
||
width: 1px;
|
||
height: 1px;
|
||
overflow: hidden;
|
||
clip: rect(0 0 0 0);
|
||
white-space: nowrap;
|
||
}
|
||
|
||
/* ---------- 分组 ---------- */
|
||
.wf-group-title {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
margin: 0 0 8px;
|
||
color: var(--studio-muted);
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
letter-spacing: 0.04em;
|
||
}
|
||
|
||
.wf-group-count {
|
||
font-variant-numeric: tabular-nums;
|
||
font-weight: 500;
|
||
opacity: 0.8;
|
||
}
|
||
|
||
.wf-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
|
||
align-items: start;
|
||
gap: 12px;
|
||
}
|
||
|
||
/* ---------- 卡片 ---------- */
|
||
.wf-card {
|
||
position: relative;
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
border: 1px solid var(--studio-line);
|
||
border-radius: var(--wf-radius);
|
||
background: var(--studio-card);
|
||
transition:
|
||
transform var(--studio-dur),
|
||
box-shadow var(--studio-dur),
|
||
border-color var(--studio-dur);
|
||
}
|
||
|
||
.wf-card:hover {
|
||
border-color: color-mix(in srgb, var(--ui-color-primary) 30%, transparent);
|
||
box-shadow: 0 6px 20px color-mix(in srgb, var(--text-primary) 8%, transparent);
|
||
transform: translateY(-1px);
|
||
}
|
||
|
||
.wf-card.is-selected {
|
||
border-color: var(--studio-accent);
|
||
box-shadow: 0 0 0 2px var(--studio-tint);
|
||
}
|
||
|
||
.wf-media {
|
||
position: relative;
|
||
display: block;
|
||
width: 100%;
|
||
overflow: hidden;
|
||
padding: 0;
|
||
border: 0;
|
||
background: var(--wf-media-bg);
|
||
color: inherit;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.wf-media img,
|
||
.wf-media video {
|
||
display: block;
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.wf-media:focus-visible {
|
||
outline: 2px solid var(--studio-ring);
|
||
outline-offset: -2px;
|
||
}
|
||
|
||
.wf-grid4 {
|
||
display: grid;
|
||
grid-template-columns: 1fr 1fr;
|
||
grid-template-rows: 1fr 1fr;
|
||
gap: 2px;
|
||
width: 100%;
|
||
height: 100%;
|
||
}
|
||
|
||
.wf-grid4 > * {
|
||
min-width: 0;
|
||
min-height: 0;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.wf-placeholder {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 6px;
|
||
width: 100%;
|
||
height: 100%;
|
||
padding: 12px;
|
||
color: var(--studio-muted);
|
||
font-size: 12px;
|
||
text-align: center;
|
||
}
|
||
|
||
.wf-badge {
|
||
position: absolute;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
padding: 2px 8px;
|
||
border-radius: 999px;
|
||
background: var(--wf-scrim);
|
||
color: var(--wf-on-scrim);
|
||
font-size: 11px;
|
||
font-variant-numeric: tabular-nums;
|
||
pointer-events: none;
|
||
}
|
||
|
||
.wf-badge--br {
|
||
right: 8px;
|
||
bottom: 8px;
|
||
}
|
||
|
||
.wf-badge--bl {
|
||
left: 8px;
|
||
bottom: 8px;
|
||
}
|
||
|
||
/* 悬停操作:收藏 + 更多(触屏常显) */
|
||
.wf-tools {
|
||
position: absolute;
|
||
top: 8px;
|
||
right: 8px;
|
||
display: flex;
|
||
gap: 6px;
|
||
opacity: 0;
|
||
transition: opacity var(--studio-dur);
|
||
}
|
||
|
||
.wf-card:hover .wf-tools,
|
||
.wf-card:focus-within .wf-tools,
|
||
.wf-tools.is-pinned {
|
||
opacity: 1;
|
||
}
|
||
|
||
@media (hover: none) {
|
||
.wf-tools {
|
||
opacity: 1;
|
||
}
|
||
}
|
||
|
||
.wf-icon-btn {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 30px;
|
||
height: 30px;
|
||
padding: 0;
|
||
border: 1px solid var(--studio-line);
|
||
border-radius: 8px;
|
||
background: var(--wf-overlay);
|
||
color: var(--studio-ink);
|
||
cursor: pointer;
|
||
backdrop-filter: blur(8px);
|
||
}
|
||
|
||
.wf-icon-btn:hover {
|
||
border-color: color-mix(in srgb, var(--ui-color-primary) 45%, transparent);
|
||
color: var(--studio-accent);
|
||
}
|
||
|
||
.wf-icon-btn.is-on {
|
||
color: var(--wf-warning);
|
||
}
|
||
|
||
.wf-check {
|
||
position: absolute;
|
||
top: 8px;
|
||
left: 8px;
|
||
display: inline-flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 22px;
|
||
height: 22px;
|
||
border: 2px solid var(--wf-on-scrim);
|
||
border-radius: 6px;
|
||
background: var(--wf-scrim);
|
||
color: var(--wf-on-scrim);
|
||
pointer-events: none;
|
||
}
|
||
|
||
.wf-card.is-selected .wf-check {
|
||
border-color: var(--studio-accent);
|
||
background: var(--studio-accent);
|
||
}
|
||
|
||
.wf-body {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 2px;
|
||
padding: 8px 10px 10px;
|
||
min-width: 0;
|
||
}
|
||
|
||
.wf-prompt {
|
||
overflow: hidden;
|
||
margin: 0;
|
||
color: var(--studio-ink);
|
||
font-size: 12px;
|
||
line-height: 1.5;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.wf-meta {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 6px;
|
||
min-width: 0;
|
||
color: var(--studio-muted);
|
||
font-size: 11px;
|
||
}
|
||
|
||
.wf-meta > span {
|
||
overflow: hidden;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.wf-num {
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
|
||
/* ---------- 进行中 ---------- */
|
||
.wf-active {
|
||
position: absolute;
|
||
inset: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 8px;
|
||
padding: 12px;
|
||
background: linear-gradient(
|
||
110deg,
|
||
var(--wf-media-bg) 30%,
|
||
color-mix(in srgb, var(--ui-color-primary) 10%, transparent) 50%,
|
||
var(--wf-media-bg) 70%
|
||
);
|
||
background-size: 200% 100%;
|
||
animation: wf-shimmer 1.8s linear infinite;
|
||
color: var(--studio-muted);
|
||
font-size: 12px;
|
||
text-align: center;
|
||
}
|
||
|
||
.wf-active-label {
|
||
color: var(--studio-ink);
|
||
font-weight: 600;
|
||
}
|
||
|
||
.wf-progress {
|
||
width: 70%;
|
||
height: 4px;
|
||
overflow: hidden;
|
||
border-radius: 999px;
|
||
background: color-mix(in srgb, var(--ui-color-primary) 15%, transparent);
|
||
}
|
||
|
||
.wf-progress > span {
|
||
display: block;
|
||
height: 100%;
|
||
background: var(--studio-accent);
|
||
transition: width 0.2s;
|
||
}
|
||
|
||
@keyframes wf-shimmer {
|
||
to {
|
||
background-position: -200% 0;
|
||
}
|
||
}
|
||
|
||
/* ---------- 失败 ---------- */
|
||
.wf-failed {
|
||
position: absolute;
|
||
inset: 0;
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 6px;
|
||
padding: 12px;
|
||
color: var(--studio-muted);
|
||
font-size: 12px;
|
||
text-align: center;
|
||
}
|
||
|
||
.wf-failed-title {
|
||
display: inline-flex;
|
||
align-items: center;
|
||
gap: 4px;
|
||
color: var(--studio-danger);
|
||
font-weight: 600;
|
||
}
|
||
|
||
.wf-failed-reason {
|
||
display: -webkit-box;
|
||
overflow: hidden;
|
||
-webkit-box-orient: vertical;
|
||
-webkit-line-clamp: 3;
|
||
word-break: break-word;
|
||
}
|
||
|
||
.wf-refund {
|
||
color: var(--wf-success);
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
|
||
/* ---------- 状态区 ---------- */
|
||
.wf-state {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: center;
|
||
justify-content: center;
|
||
gap: 10px;
|
||
min-height: 240px;
|
||
padding: 24px 16px;
|
||
color: var(--studio-muted);
|
||
font-size: 13px;
|
||
text-align: center;
|
||
}
|
||
|
||
.wf-state-title {
|
||
margin: 0;
|
||
color: var(--studio-ink);
|
||
font-size: 15px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.wf-skeleton {
|
||
border-radius: var(--wf-radius);
|
||
background: linear-gradient(
|
||
110deg,
|
||
var(--wf-media-bg) 30%,
|
||
color-mix(in srgb, var(--text-primary) 9%, transparent) 50%,
|
||
var(--wf-media-bg) 70%
|
||
);
|
||
background-size: 200% 100%;
|
||
animation: wf-shimmer 1.8s linear infinite;
|
||
aspect-ratio: 1;
|
||
}
|
||
|
||
.wf-more {
|
||
display: flex;
|
||
justify-content: center;
|
||
min-height: 40px;
|
||
padding: 8px 0 4px;
|
||
color: var(--studio-muted);
|
||
font-size: 12px;
|
||
}
|
||
|
||
/* 多选对比操作条 */
|
||
.wf-selectbar {
|
||
position: sticky;
|
||
top: 0;
|
||
z-index: 2;
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: center;
|
||
gap: 8px;
|
||
padding: 8px 12px;
|
||
border: 1px solid color-mix(in srgb, var(--ui-color-primary) 25%, transparent);
|
||
border-radius: var(--wf-radius);
|
||
background: color-mix(
|
||
in srgb,
|
||
var(--ui-color-primary) 6%,
|
||
var(--surface-card)
|
||
);
|
||
font-size: 13px;
|
||
}
|
||
|
||
.wf-selectbar-text {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
/* ---------- 筛选栏 ---------- */
|
||
.wf-filters {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: center;
|
||
justify-content: flex-end;
|
||
gap: 8px;
|
||
min-width: 0;
|
||
}
|
||
|
||
.wf-filters .ant-select {
|
||
min-width: 112px;
|
||
max-width: 180px;
|
||
}
|
||
|
||
.wf-filters-search {
|
||
width: 200px;
|
||
max-width: 100%;
|
||
}
|
||
|
||
.wf-filter-panel {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 12px;
|
||
width: 280px;
|
||
max-width: 100%;
|
||
padding: 4px;
|
||
}
|
||
|
||
.wf-filter-panel .ant-select,
|
||
.wf-filter-panel .ant-input-affix-wrapper {
|
||
width: 100%;
|
||
}
|
||
|
||
.wf-filter-panel-label {
|
||
margin-bottom: 4px;
|
||
color: var(--text-secondary);
|
||
font-size: 12px;
|
||
}
|
||
|
||
.wf-filter-panel-actions {
|
||
display: flex;
|
||
justify-content: space-between;
|
||
gap: 8px;
|
||
}
|
||
|
||
.wf-filter-sheet .wf-filter-panel {
|
||
width: 100%;
|
||
padding: 0 0 calc(8px + env(safe-area-inset-bottom, 0px));
|
||
}
|
||
|
||
/* ---------- 详情抽屉 ---------- */
|
||
.wf-detail {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
color: var(--studio-ink, var(--text-primary));
|
||
}
|
||
|
||
.wf-detail-media {
|
||
display: flex;
|
||
align-items: center;
|
||
justify-content: center;
|
||
overflow: hidden;
|
||
border-radius: var(--wf-radius);
|
||
background: color-mix(in srgb, var(--text-primary) 5%, transparent);
|
||
min-height: 200px;
|
||
}
|
||
|
||
.wf-detail-media img,
|
||
.wf-detail-media video {
|
||
display: block;
|
||
max-width: 100%;
|
||
max-height: 62vh;
|
||
object-fit: contain;
|
||
}
|
||
|
||
.wf-thumbs {
|
||
display: flex;
|
||
gap: 8px;
|
||
overflow-x: auto;
|
||
}
|
||
|
||
.wf-thumb {
|
||
flex-shrink: 0;
|
||
width: 64px;
|
||
height: 64px;
|
||
overflow: hidden;
|
||
padding: 0;
|
||
border: 2px solid transparent;
|
||
border-radius: 8px;
|
||
background: color-mix(in srgb, var(--text-primary) 5%, transparent);
|
||
cursor: pointer;
|
||
}
|
||
|
||
.wf-thumb img {
|
||
width: 100%;
|
||
height: 100%;
|
||
object-fit: cover;
|
||
}
|
||
|
||
.wf-thumb.is-active {
|
||
border-color: var(--ui-color-primary);
|
||
}
|
||
|
||
.wf-detail-section-title {
|
||
margin: 0 0 6px;
|
||
color: var(--text-secondary);
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
letter-spacing: 0.04em;
|
||
}
|
||
|
||
.wf-detail-prompt {
|
||
margin: 0;
|
||
max-height: 180px;
|
||
overflow-y: auto;
|
||
padding: 10px 12px;
|
||
border: 1px solid var(--border-subtle);
|
||
border-radius: 10px;
|
||
font-size: 13px;
|
||
line-height: 1.6;
|
||
white-space: pre-wrap;
|
||
word-break: break-word;
|
||
}
|
||
|
||
.wf-params {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
|
||
gap: 8px 16px;
|
||
margin: 0;
|
||
}
|
||
|
||
.wf-params dt {
|
||
color: var(--text-secondary);
|
||
font-size: 12px;
|
||
}
|
||
|
||
.wf-params dd {
|
||
margin: 2px 0 0;
|
||
overflow: hidden;
|
||
font-size: 13px;
|
||
font-variant-numeric: tabular-nums;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.wf-detail-actions {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
gap: 8px;
|
||
}
|
||
|
||
.wf-detail-alert {
|
||
padding: 10px 12px;
|
||
border: 1px solid color-mix(in srgb, var(--ui-color-danger) 30%, transparent);
|
||
border-radius: 10px;
|
||
background: color-mix(in srgb, var(--ui-color-danger) 6%, transparent);
|
||
font-size: 13px;
|
||
word-break: break-word;
|
||
}
|
||
|
||
.wf button:focus-visible,
|
||
.wf-detail button:focus-visible,
|
||
.wf-filters button:focus-visible {
|
||
outline: 2px solid
|
||
color-mix(in srgb, var(--ui-color-primary) 55%, transparent);
|
||
outline-offset: 2px;
|
||
}
|
||
|
||
@media (max-width: 767px) {
|
||
.wf-grid {
|
||
grid-template-columns: repeat(2, minmax(0, 1fr));
|
||
gap: 8px;
|
||
}
|
||
|
||
.wf-body {
|
||
padding: 6px 8px 8px;
|
||
}
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.wf-card,
|
||
.wf-tools,
|
||
.wf-progress > span {
|
||
transition: none;
|
||
}
|
||
|
||
.wf-card:hover {
|
||
transform: none;
|
||
}
|
||
|
||
.wf-active,
|
||
.wf-skeleton {
|
||
animation: none;
|
||
}
|
||
}
|
||
|
||
/* ---------- 空状态:灵感模板墙(WP B-7) ---------- */
|
||
.wf-wall {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 16px;
|
||
max-width: 1080px;
|
||
margin: 0 auto;
|
||
padding: 8px 0 16px;
|
||
width: 100%;
|
||
}
|
||
|
||
.wf-wall-eyebrow {
|
||
margin: 0 0 4px;
|
||
color: var(--studio-accent, var(--ui-color-primary));
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
letter-spacing: 0.08em;
|
||
text-transform: uppercase;
|
||
}
|
||
|
||
.wf-wall-title {
|
||
margin: 0;
|
||
color: var(--studio-ink, var(--text-primary));
|
||
font-size: 18px;
|
||
font-weight: 700;
|
||
letter-spacing: -0.01em;
|
||
}
|
||
|
||
.wf-wall-desc {
|
||
margin: 4px 0 0;
|
||
color: var(--studio-muted, var(--text-secondary));
|
||
font-size: 13px;
|
||
}
|
||
|
||
.wf-wall-grid {
|
||
display: grid;
|
||
grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
|
||
gap: 10px;
|
||
}
|
||
|
||
.wf-tpl {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 6px;
|
||
min-width: 0;
|
||
padding: 12px;
|
||
border: 1px solid var(--studio-line, var(--border-subtle));
|
||
border-radius: var(--wf-radius);
|
||
background: var(--studio-card, var(--surface-card));
|
||
color: var(--studio-ink, var(--text-primary));
|
||
text-align: left;
|
||
cursor: pointer;
|
||
transition:
|
||
border-color var(--studio-dur, 150ms),
|
||
transform var(--studio-dur, 150ms),
|
||
background-color var(--studio-dur, 150ms);
|
||
}
|
||
|
||
.wf-tpl:hover {
|
||
border-color: color-mix(in srgb, var(--ui-color-primary) 45%, transparent);
|
||
background: color-mix(
|
||
in srgb,
|
||
var(--ui-color-primary) 4%,
|
||
var(--surface-card)
|
||
);
|
||
transform: translateY(-1px);
|
||
}
|
||
|
||
.wf-tpl-head {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
min-width: 0;
|
||
}
|
||
|
||
.wf-tpl-icon {
|
||
display: inline-flex;
|
||
flex-shrink: 0;
|
||
align-items: center;
|
||
justify-content: center;
|
||
width: 28px;
|
||
height: 28px;
|
||
border-radius: 8px;
|
||
background: color-mix(in srgb, var(--ui-color-primary) 10%, transparent);
|
||
color: var(--ui-color-primary);
|
||
}
|
||
|
||
.wf-tpl-title {
|
||
flex: 1;
|
||
min-width: 0;
|
||
overflow: hidden;
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
text-overflow: ellipsis;
|
||
white-space: nowrap;
|
||
}
|
||
|
||
.wf-tpl-meta {
|
||
flex-shrink: 0;
|
||
color: var(--studio-muted, var(--text-secondary));
|
||
font-size: 11px;
|
||
font-variant-numeric: tabular-nums;
|
||
}
|
||
|
||
.wf-tpl-prompt {
|
||
display: -webkit-box;
|
||
overflow: hidden;
|
||
color: var(--studio-muted, var(--text-secondary));
|
||
font-size: 12px;
|
||
line-height: 1.5;
|
||
-webkit-box-orient: vertical;
|
||
-webkit-line-clamp: 2;
|
||
overflow-wrap: anywhere;
|
||
}
|
||
|
||
.wf-tpl:focus-visible {
|
||
outline: 2px solid
|
||
color-mix(in srgb, var(--ui-color-primary) 55%, transparent);
|
||
outline-offset: 2px;
|
||
}
|
||
|
||
.wf-wall-foot {
|
||
display: flex;
|
||
justify-content: center;
|
||
}
|
||
|
||
.wf-state-actions {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
justify-content: center;
|
||
gap: 8px;
|
||
}
|
||
|
||
.wf-detail-alert {
|
||
display: flex;
|
||
flex-direction: column;
|
||
align-items: flex-start;
|
||
gap: 4px;
|
||
}
|
||
|
||
.wf-detail-raw {
|
||
color: var(--text-secondary);
|
||
font-size: 12px;
|
||
}
|
||
|
||
@media (max-width: 767px) {
|
||
.wf-wall-grid {
|
||
grid-template-columns: minmax(0, 1fr);
|
||
}
|
||
|
||
.wf-wall-title {
|
||
font-size: 16px;
|
||
}
|
||
}
|
||
|
||
@media (prefers-reduced-motion: reduce) {
|
||
.wf-tpl {
|
||
transition: none;
|
||
}
|
||
|
||
.wf-tpl:hover {
|
||
transform: none;
|
||
}
|
||
}
|
||
|
||
/* ---------- 获取 API 代码(WP C-1):详情抽屉在 portal 中,直接用语义 token ---------- */
|
||
.wf-api {
|
||
border: 1px solid var(--border-subtle);
|
||
border-radius: 12px;
|
||
overflow: hidden;
|
||
}
|
||
|
||
.wf-api-toggle {
|
||
display: flex;
|
||
align-items: center;
|
||
gap: 8px;
|
||
width: 100%;
|
||
padding: 10px 12px;
|
||
border: 0;
|
||
background: transparent;
|
||
color: var(--text-primary);
|
||
font-size: 13px;
|
||
font-weight: 600;
|
||
text-align: left;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.wf-api-toggle:hover {
|
||
background: color-mix(in srgb, var(--ui-color-primary) 5%, transparent);
|
||
}
|
||
|
||
.wf-api-toggle:focus-visible,
|
||
.wf-api-tab:focus-visible,
|
||
.wf-api-code:focus-visible {
|
||
outline: 2px solid
|
||
color-mix(in srgb, var(--ui-color-primary) 55%, transparent);
|
||
outline-offset: 2px;
|
||
}
|
||
|
||
.wf-api-title {
|
||
flex: 1;
|
||
min-width: 0;
|
||
}
|
||
|
||
.wf-api-badge {
|
||
padding: 1px 8px;
|
||
border-radius: 999px;
|
||
background: color-mix(in srgb, var(--ui-color-success) 12%, transparent);
|
||
color: var(--ui-color-success);
|
||
font-size: 11px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.wf-api-caret {
|
||
color: var(--text-secondary);
|
||
transition: transform 150ms ease;
|
||
}
|
||
|
||
.wf-api-caret.is-open {
|
||
transform: rotate(180deg);
|
||
}
|
||
|
||
.wf-api-body {
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
padding: 0 12px 12px;
|
||
}
|
||
|
||
.wf-api-desc,
|
||
.wf-api-hint {
|
||
margin: 0;
|
||
color: var(--text-secondary);
|
||
font-size: 12px;
|
||
}
|
||
|
||
.wf-api-bar,
|
||
.wf-api-foot {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: center;
|
||
justify-content: space-between;
|
||
gap: 8px;
|
||
}
|
||
|
||
.wf-api-tabs {
|
||
display: inline-flex;
|
||
padding: 2px;
|
||
border-radius: 8px;
|
||
background: color-mix(in srgb, var(--text-primary) 6%, transparent);
|
||
}
|
||
|
||
.wf-api-tab {
|
||
padding: 3px 10px;
|
||
border: 0;
|
||
border-radius: 6px;
|
||
background: transparent;
|
||
color: var(--text-secondary);
|
||
font-size: 12px;
|
||
cursor: pointer;
|
||
}
|
||
|
||
.wf-api-tab.is-active {
|
||
background: var(--surface-card);
|
||
color: var(--text-primary);
|
||
font-weight: 600;
|
||
}
|
||
|
||
.wf-api-code {
|
||
max-height: 320px;
|
||
margin: 0;
|
||
overflow: auto;
|
||
padding: 10px 12px;
|
||
border: 1px solid var(--border-subtle);
|
||
border-radius: 8px;
|
||
background: color-mix(in srgb, var(--text-primary) 4%, var(--surface-card));
|
||
color: var(--text-primary);
|
||
font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
|
||
font-size: 12px;
|
||
line-height: 1.55;
|
||
white-space: pre;
|
||
}
|
||
|
||
.wf-api-notes {
|
||
margin: 0;
|
||
padding-left: 18px;
|
||
color: var(--text-secondary);
|
||
font-size: 12px;
|
||
line-height: 1.6;
|
||
word-break: break-word;
|
||
}
|
||
|
||
/* ---------- 对比生成成组(WP C-2) ---------- */
|
||
.wf-batch {
|
||
grid-column: 1 / -1;
|
||
display: flex;
|
||
flex-direction: column;
|
||
gap: 8px;
|
||
padding: 10px;
|
||
border: 1px solid color-mix(in srgb, var(--ui-color-primary) 25%, transparent);
|
||
border-radius: 14px;
|
||
background: color-mix(in srgb, var(--ui-color-primary) 4%, transparent);
|
||
}
|
||
|
||
.wf-batch-head {
|
||
display: flex;
|
||
flex-wrap: wrap;
|
||
align-items: center;
|
||
gap: 8px;
|
||
color: var(--text-secondary);
|
||
font-size: 12px;
|
||
font-weight: 600;
|
||
}
|
||
|
||
.wf-batch-title {
|
||
flex: 1;
|
||
min-width: 0;
|
||
color: var(--text-primary);
|
||
}
|
||
|
||
/* ---------- 慢任务提示(WP C-4) ---------- */
|
||
.wf-slow {
|
||
max-width: 92%;
|
||
color: var(--wf-warning, var(--ui-color-warning));
|
||
font-size: 11px;
|
||
line-height: 1.4;
|
||
text-align: center;
|
||
}
|