Files
EmailBill/Web/src/styles/common.css
孙诚 1b011309d2
Some checks failed
Docker Build & Deploy / Build Docker Image (push) Failing after 19s
Docker Build & Deploy / Deploy to Production (push) Has been skipped
样式调整
2025-12-28 10:23:57 +08:00

237 lines
4.3 KiB
CSS
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
/* 通用页面容器样式 - 统一风格(灰色背景) */
.page-container {
min-height: 100vh;
background: #f7f8fa;
padding-bottom: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: dark) {
.page-container {
background: #141414;
}
}
/* 页面内容区域 */
.page-content {
padding: 16px 0 0 0;
}
/* 下拉刷新包装器 */
.refresh-wrapper {
min-height: calc(var(--vh, 100vh) - 46px - 50px - env(safe-area-inset-bottom, 0px));
}
/* 统一卡片样式 */
.common-card {
background: #ffffff;
margin: 0 12px 16px;
padding: 16px;
border-radius: 16px;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
border: 1px solid #ebedf0;
}
@media (prefers-color-scheme: dark) {
.common-card {
background: #1f1f1f;
border-color: #2c2c2c;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
}
/* 卡片头部 */
.card-header {
display: flex;
justify-content: space-between;
align-items: center;
margin-bottom: 16px;
}
.card-title {
font-size: 16px;
font-weight: 600;
color: var(--van-text-color);
margin: 0;
}
/* 增加卡片组的对比度 */
:deep(.van-cell-group--inset) {
margin: 10px 16px;
background: #ffffff;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
border: 1px solid #ebedf0;
border-radius: 16px;
}
@media (prefers-color-scheme: dark) {
:deep(.van-cell-group--inset) {
background: #1f1f1f;
border-color: #2c2c2c;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
}
/* 单元格样式 */
:deep(.van-cell) {
background: #ffffff;
border-bottom: 1px solid #ebedf0;
}
@media (prefers-color-scheme: dark) {
:deep(.van-cell) {
background: #1f1f1f;
border-bottom: 1px solid #2c2c2c;
}
}
:deep(.van-cell:last-child) {
border-bottom: none;
}
/* 详情弹出层样式 */
.detail-popup {
padding: 16px;
height: 100%;
overflow-y: auto;
background: #f7f8fa;
}
@media (prefers-color-scheme: dark) {
.detail-popup {
background: #141414;
}
}
/* 弹出层内的卡片组样式 */
.detail-popup :deep(.van-cell-group--inset) {
background: #ffffff;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
border: 1px solid #ebedf0;
border-radius: 16px;
}
@media (prefers-color-scheme: dark) {
.detail-popup :deep(.van-cell-group--inset) {
background: #1f1f1f;
border-color: #2c2c2c;
box-shadow: 0 2px 12px rgba(0, 0, 0, 0.3);
}
}
/* 详情头部样式 */
.detail-header {
margin-bottom: 16px;
}
.detail-header h3 {
margin: 0;
font-size: 18px;
font-weight: bold;
word-break: break-word;
}
.detail-header p {
margin: 0;
font-size: 14px;
color: #969799;
font-weight: normal;
}
/* 导航栏透明背景 */
:deep(.van-nav-bar) {
background-color: transparent;
}
/* 禁止在导航栏上进行拖动操作 */
.page-container-flex :deep(.van-nav-bar) {
touch-action: none;
}
/* 修复表单字段过长时的换行显示 */
:deep(.van-field__control) {
word-break: break-all;
white-space: normal;
}
:deep(.van-field__value) {
word-break: break-all;
white-space: normal;
}
/* 账单列表滚动容器 */
.bills-scroll-container {
flex: 1;
overflow-y: auto;
overflow-x: hidden;
-webkit-overflow-scrolling: touch;
}
/* ===== 页面容器布局Flex布局 ===== */
.page-container-flex {
display: flex;
flex-direction: column;
height: 100vh;
overflow: hidden;
}
.page-container-flex :deep(.van-nav-bar) {
flex-shrink: 0;
}
.page-container-flex > .van-pull-refresh {
flex: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
}
/* ===== 可滚动内容区域 ===== */
.scroll-content {
flex: 1;
overflow-y: auto;
-webkit-overflow-scrolling: touch;
padding: 0 0 0 0;
}
/* ===== 粘性顶部元素样式 ===== */
.sticky-header {
position: sticky;
top: 0;
z-index: 10;
display: flex;
align-items: center;
justify-content: space-between;
padding: 12px 16px;
margin: 0 12px;
margin-top: 12px;
background: #ffffff;
border-radius: 12px;
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}
@media (prefers-color-scheme: dark) {
.sticky-header {
background: #1f1f1f;
}
}
.sticky-header-text {
font-size: 16px;
font-weight: 600;
color: var(--van-text-color);
display: flex;
align-items: center;
gap: 4px;
cursor: pointer;
user-select: none;
}
/* ===== 颜色工具类 ===== */
.text-expense {
color: #ff6b6b;
}
.text-income {
color: #51cf66;
}