用户中心 CSS 整包重命名:按 shell/credits/settings/responsive 职责拆分
废除 part-1..5 机械切片,重组成可维护的领域文件并修复历史拼接断点,index 同步改写。
This commit is contained in:
1 parent
3ce5306efd
commit
e97654aab3
7 files changed
+131
-107
No files matched your search
@@ -0,0 +1,318 @@
|
||||
/**
|
||||
* User Center — mobile tabs, drawer breakpoints, a11y/loading, invite mobile
|
||||
*/
|
||||
|
||||
/* ==================== 移动端 Tab 栏 ==================== */
|
||||
.uc-mobile-tabs {
|
||||
display: none;
|
||||
}
|
||||
|
||||
@media (max-width: 767px) {
|
||||
.uc-mobile-tabs {
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: auto;
|
||||
overflow-y: hidden;
|
||||
gap: 4px;
|
||||
padding-bottom: 12px;
|
||||
margin-bottom: 16px;
|
||||
border-bottom: 1px solid var(--color-line-soft, rgba(0,0,0,0.06));
|
||||
scrollbar-width: none;
|
||||
-ms-overflow-style: none;
|
||||
}
|
||||
|
||||
.uc-mobile-tabs::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.uc-mobile-tabs button {
|
||||
flex-shrink: 0;
|
||||
white-space: nowrap;
|
||||
padding: 8px 14px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
background: transparent;
|
||||
color: var(--color-ink-3);
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
}
|
||||
|
||||
.uc-mobile-tabs button:hover {
|
||||
background: var(--surface-2);
|
||||
color: var(--color-ink);
|
||||
}
|
||||
|
||||
.uc-mobile-tabs button.is-active {
|
||||
background: var(--color-primary-soft);
|
||||
color: var(--color-primary);
|
||||
font-weight: 600;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==================== 响应式 ==================== */
|
||||
@media (max-width: 767px) {
|
||||
.uc-sidebar {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: -280px;
|
||||
bottom: 0;
|
||||
width: 270px;
|
||||
z-index: 300;
|
||||
background: var(--surface-1);
|
||||
padding: 0;
|
||||
overflow-y: auto;
|
||||
overflow-x: hidden;
|
||||
transition: left 0.3s cubic-bezier(0.22, 1, 0.36, 1);
|
||||
box-shadow: 4px 0 24px rgba(0,0,0,0.12);
|
||||
gap: 0;
|
||||
}
|
||||
|
||||
.uc-sidebar.is-open {
|
||||
left: 0;
|
||||
}
|
||||
|
||||
/* 抽屉头部 */
|
||||
.uc-sidebar::before {
|
||||
content: '';
|
||||
display: block;
|
||||
height: 100px;
|
||||
background: linear-gradient(135deg, var(--color-primary), #667eea);
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.uc-sidebar__section {
|
||||
border-radius: 0;
|
||||
border-left: none;
|
||||
border-right: none;
|
||||
box-shadow: none;
|
||||
}
|
||||
|
||||
.uc-sidebar__section:first-of-type {
|
||||
margin-top: -20px;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
border-radius: 12px 12px 0 0;
|
||||
}
|
||||
|
||||
.uc-sidebar__drawer-trigger {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.uc-content .dashboard-panel {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.uc-content .credits-card {
|
||||
flex-direction: column;
|
||||
text-align: center;
|
||||
gap: 12px;
|
||||
}
|
||||
}
|
||||
|
||||
/* ==================== 焦点状态(无障碍)==================== */
|
||||
.uc-sidebar__btn:focus-visible,
|
||||
.uc-sidebar__drawer-trigger:focus-visible,
|
||||
.uc-content .btn-primary:focus-visible,
|
||||
.uc-content .btn-ghost:focus-visible {
|
||||
outline: 2px solid var(--color-primary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
/* ==================== 加载状态 ==================== */
|
||||
.uc-content .btn-primary.is-loading,
|
||||
.uc-content .btn-ghost.is-loading {
|
||||
position: relative;
|
||||
color: transparent;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.uc-content .btn-primary.is-loading::after,
|
||||
.uc-content .btn-ghost.is-loading::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
border: 2px solid rgba(255,255,255,0.3);
|
||||
border-top-color: #fff;
|
||||
border-radius: 50%;
|
||||
animation: btn-spin 0.6s linear infinite;
|
||||
}
|
||||
|
||||
@keyframes btn-spin {
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
/* ==================== 空状态增强 ==================== */
|
||||
.uc-content .profile-empty {
|
||||
padding: 48px 20px;
|
||||
}
|
||||
|
||||
.uc-content .profile-empty__icon {
|
||||
width: 56px;
|
||||
height: 56px;
|
||||
margin-bottom: 14px;
|
||||
}
|
||||
|
||||
.uc-content .profile-empty__icon svg {
|
||||
width: 26px;
|
||||
height: 26px;
|
||||
}
|
||||
|
||||
/* ==================== 移动端底部安全区 ==================== */
|
||||
.uc-sidebar__drawer-trigger {
|
||||
bottom: calc(72px + env(safe-area-inset-bottom, 0px));
|
||||
}
|
||||
|
||||
@media (max-width: 480px) {
|
||||
.user-center,
|
||||
.aksrt-profile.content-shell {
|
||||
padding: 0 12px 32px;
|
||||
}
|
||||
|
||||
.uc-stats {
|
||||
grid-template-columns: repeat(4, 1fr);
|
||||
}
|
||||
|
||||
.uc-stats__item {
|
||||
padding: 8px 4px;
|
||||
}
|
||||
|
||||
.uc-stats__value {
|
||||
font-size: 1rem;
|
||||
}
|
||||
|
||||
.uc-content .dashboard-panel {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.uc-content .widget-card {
|
||||
padding: 14px;
|
||||
}
|
||||
|
||||
.uc-balance-card__content {
|
||||
padding: 18px;
|
||||
}
|
||||
|
||||
.uc-balance-card__value {
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
.uc-balance-card__actions {
|
||||
flex-direction: column;
|
||||
gap: 10px;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.uc-balance-card__sign-btn {
|
||||
width: 100%;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.uc-transactions__item {
|
||||
padding: 12px 14px;
|
||||
}
|
||||
|
||||
.uc-transactions__icon {
|
||||
width: 32px;
|
||||
height: 32px;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.uc-content .credits-card {
|
||||
padding: 16px;
|
||||
}
|
||||
|
||||
.uc-content .credits-card__value {
|
||||
font-size: 1.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 640px) {
|
||||
.uc-content .aksrt-invite-hero {
|
||||
flex-direction: column;
|
||||
padding: 0 0 14px;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-code-card {
|
||||
width: 100%;
|
||||
padding: 12px 0 0;
|
||||
border-left: 0;
|
||||
border-top: 1px solid var(--color-line-soft, rgba(0,0,0,0.06));
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-link-row {
|
||||
flex-direction: column;
|
||||
padding: 14px 0;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-link-row input {
|
||||
flex: none;
|
||||
width: 100%;
|
||||
height: 40px;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-copy {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-stats {
|
||||
grid-template-columns: repeat(3, 1fr);
|
||||
padding: 12px 0;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-stat {
|
||||
align-items: center;
|
||||
text-align: center;
|
||||
padding: 0 8px;
|
||||
border-right: 1px solid var(--color-line-soft, rgba(0,0,0,0.06));
|
||||
border-bottom: 0;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-stat:last-child {
|
||||
border-right: 0;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-stat strong {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-stat span,
|
||||
.uc-content .aksrt-invite-stat strong {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-stat small {
|
||||
font-size: 11px;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-records {
|
||||
padding: 14px 0 0;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-record {
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-record__status {
|
||||
min-width: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 520px) {
|
||||
.uc-content .aksrt-invite-record {
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-record__main {
|
||||
flex: 1 1 calc(100% - 54px);
|
||||
}
|
||||
|
||||
.uc-content .aksrt-invite-record__status {
|
||||
flex: 1 1 100%;
|
||||
align-items: flex-start;
|
||||
padding-left: 54px;
|
||||
text-align: left;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user