fix: add --surface-subtle token, restore info grouping, and apply theme-aware favorite color

- Add --surface-subtle (oklch 3% opacity) to replace rgba(0,0,0,0.03)
- Fix info items, creator-info, civitai-view, modal-send-btn, header-actions
  to use --surface-subtle instead of --surface-hover
- Keep true hover states on --surface-hover
- Use light #d4a017 / dark #ffc107 for --favorite-color based on theme
- Replace hardcoded #ffc107 and #d4a017 with var(--favorite-color)
This commit is contained in:
Will Miao
2026-05-21 21:14:07 +08:00
parent 08afb05ece
commit eb22054580
25 changed files with 191 additions and 121 deletions

View File

@@ -15,18 +15,18 @@
/* Toast Notifications */
.toast {
position: fixed;
top: 20px; /* 改为从顶部显示 */
right: 20px; /* 改为右对齐 */
left: auto; /* 移除左对齐 */
transform: translateX(120%); /* 初始位置在屏幕右侧外 */
min-width: 300px; /* 设置最小宽度 */
max-width: 400px; /* 设置最大宽度 */
top: 20px;
right: 20px;
left: auto;
transform: translateX(120%);
min-width: 300px;
max-width: 400px;
background: var(--lora-surface);
color: var(--text-color);
padding: 12px 16px;
border-radius: var(--border-radius-sm);
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
z-index: calc(var(--z-overlay) + 10); /* 让toast显示在最上层 */
z-index: calc(var(--z-overlay) + 10);
opacity: 0;
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1),
opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
@@ -36,11 +36,10 @@
}
.toast.show {
transform: translateX(0); /* 显示时滑入到正确位置 */
transform: translateX(0);
opacity: 1;
}
/* 添加图标容器 */
.toast::before {
content: '';
width: 20px;
@@ -51,7 +50,7 @@
background-size: contain;
}
/* 不同类型的toast样式 */
/* Toast type variants */
.toast-success {
border-left: 4px solid oklch(65% 0.2 142);
}
@@ -76,15 +75,15 @@
background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%232196f3'%3E%3Cpath d='M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2zm1 15h-2v-6h2v6zm0-8h-2V7h2v2z'/%3E%3C/svg%3E");
}
/* 多个toast堆叠显示 */
/* Stacked toast spacing */
.toast + .toast {
margin-top: 10px;
}
/* 响应式调整 */
/* Responsive adjustments */
@media (max-width: 768px) {
.toast {
width: calc(100% - 40px); /* 左右各留20px间距 */
width: calc(100% - 40px);
max-width: none;
right: 20px;
}