refactor: normalize components in Phase 2

- Unify button styles (padding, gap, border-radius, hover states) in _base.css
- Fix .secondary-btn syntax error (extra space in var())
- Remove duplicated .card-actions in card.css
- Replace hardcoded #f0f0f0 with --surface-hover token
- Replace #ffc107 with accessible #d4a017 for favorite stars
- Replace hardcoded rgba shadows with semantic --shadow-* tokens in layout.css
- Replace hardcoded rgba(0,0,0,0.03)/rgba(255,255,255,0.03) with --surface-hover
- Remove redundant [data-theme=dark] overrides by using theme-aware tokens
- Replace .dropdown-main hardcoded border with --border-color token
This commit is contained in:
Will Miao
2026-05-21 21:11:25 +08:00
parent f51f125cf1
commit 08afb05ece
3 changed files with 45 additions and 84 deletions

View File

@@ -353,9 +353,11 @@
}
.card-actions {
flex-shrink: 0;
display: flex;
gap: var(--space-1); /* Use gap instead of margin for spacing between icons */
align-items: center;
gap: var(--space-1);
align-items: flex-end;
align-self: flex-end;
}
.card-actions i:hover {
@@ -364,10 +366,9 @@
background-color: rgba(255, 255, 255, 0.1);
}
/* Style for active favorites */
.favorite-active {
color: #ffc107 !important; /* Gold color for favorites */
text-shadow: 0 0 5px rgba(255, 193, 7, 0.5);
color: #d4a017 !important;
text-shadow: 0 0 5px rgba(212, 160, 23, 0.5);
}
@media (max-width: 1200px) {
@@ -391,14 +392,6 @@
}
}
.card-actions {
flex-shrink: 0; /* Prevent actions from shrinking */
display: flex;
gap: var(--space-1);
align-items: flex-end; /* 将图标靠下对齐 */
align-self: flex-end; /* 将整个actions容器靠下对齐 */
}
.model-link {
margin-top: var(--space-1);
}
@@ -438,7 +431,7 @@
.base-model {
display: inline-block;
background: #f0f0f0;
background: var(--surface-hover, oklch(95% 0 0));
padding: 2px 6px;
border-radius: var(--border-radius-xs);
margin-right: 6px;