Files
WAI_Project_UNIX/static/index.scss
2026-01-21 01:37:34 +08:00

347 lines
5.7 KiB
SCSS

/* @tailwind base; */
@tailwind components;
@tailwind utilities;
/* 全局自适应样式 */
/* 安全区域适配 */
.safe-area-inset-top {
padding-top: constant(safe-area-inset-top);
padding-top: env(safe-area-inset-top);
}
.safe-area-inset-bottom {
padding-bottom: constant(safe-area-inset-bottom);
padding-bottom: env(safe-area-inset-bottom);
}
/* 响应式容器 */
.container {
width: 100%;
max-width: 750rpx;
margin: 0 auto;
padding: 0 30rpx;
box-sizing: border-box;
}
/* 弹性布局工具类 */
.flex {
display: flex;
}
.flex-row {
display: flex;
flex-direction: row;
}
.flex-col {
display: flex;
flex-direction: column;
}
.flex-wrap {
flex-wrap: wrap;
}
.flex-1 {
flex: 1;
}
.items-center {
align-items: center;
}
.items-start {
align-items: flex-start;
}
.items-end {
align-items: flex-end;
}
.justify-center {
justify-content: center;
}
.justify-between {
justify-content: space-between;
}
.justify-around {
justify-content: space-around;
}
.justify-start {
justify-content: flex-start;
}
.justify-end {
justify-content: flex-end;
}
/* 文字大小自适应 */
.text-xs {
font-size: 20rpx;
}
.text-sm {
font-size: 24rpx;
}
.text-base {
font-size: 28rpx;
}
.text-lg {
font-size: 32rpx;
}
.text-xl {
font-size: 36rpx;
}
.text-2xl {
font-size: 40rpx;
}
.text-3xl {
font-size: 48rpx;
}
/* 文字颜色 */
.text-primary {
color: #52c41a;
}
.text-secondary {
color: #666666;
}
.text-muted {
color: #999999;
}
.text-white {
color: #ffffff;
}
.text-dark {
color: #333333;
}
/* 背景颜色 */
.bg-primary {
background-color: #52c41a;
}
.bg-white {
background-color: #ffffff;
}
.bg-gray {
background-color: #f8f9fa;
}
/* 间距工具类 */
.p-0 { padding: 0; }
.p-1 { padding: 8rpx; }
.p-2 { padding: 16rpx; }
.p-3 { padding: 24rpx; }
.p-4 { padding: 32rpx; }
.p-5 { padding: 40rpx; }
.px-1 { padding-left: 8rpx; padding-right: 8rpx; }
.px-2 { padding-left: 16rpx; padding-right: 16rpx; }
.px-3 { padding-left: 24rpx; padding-right: 24rpx; }
.px-4 { padding-left: 32rpx; padding-right: 32rpx; }
.py-1 { padding-top: 8rpx; padding-bottom: 8rpx; }
.py-2 { padding-top: 16rpx; padding-bottom: 16rpx; }
.py-3 { padding-top: 24rpx; padding-bottom: 24rpx; }
.py-4 { padding-top: 32rpx; padding-bottom: 32rpx; }
.m-0 { margin: 0; }
.m-1 { margin: 8rpx; }
.m-2 { margin: 16rpx; }
.m-3 { margin: 24rpx; }
.m-4 { margin: 32rpx; }
.mx-auto { margin-left: auto; margin-right: auto; }
.mt-1 { margin-top: 8rpx; }
.mt-2 { margin-top: 16rpx; }
.mt-3 { margin-top: 24rpx; }
.mt-4 { margin-top: 32rpx; }
.mb-1 { margin-bottom: 8rpx; }
.mb-2 { margin-bottom: 16rpx; }
.mb-3 { margin-bottom: 24rpx; }
.mb-4 { margin-bottom: 32rpx; }
/* 圆角 */
.rounded-none { border-radius: 0; }
.rounded-sm { border-radius: 8rpx; }
.rounded { border-radius: 12rpx; }
.rounded-lg { border-radius: 16rpx; }
.rounded-xl { border-radius: 24rpx; }
.rounded-full { border-radius: 9999rpx; }
/* 阴影 */
.shadow-sm {
box-shadow: 0 2rpx 8rpx rgba(0, 0, 0, 0.05);
}
.shadow {
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.08);
}
.shadow-lg {
box-shadow: 0 8rpx 24rpx rgba(0, 0, 0, 0.12);
}
/* 宽度 */
.w-full { width: 100%; }
.w-half { width: 50%; }
.w-auto { width: auto; }
/* 高度 */
.h-full { height: 100%; }
.h-auto { height: auto; }
/* 溢出处理 */
.overflow-hidden { overflow: hidden; }
.overflow-auto { overflow: auto; }
.overflow-scroll { overflow: scroll; }
/* 文字截断 */
.truncate {
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.line-clamp-2 {
display: -webkit-box;
-webkit-line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
}
.line-clamp-3 {
display: -webkit-box;
-webkit-line-clamp: 3;
-webkit-box-orient: vertical;
overflow: hidden;
}
/* 卡片样式 */
.card {
background-color: #ffffff;
border-radius: 16rpx;
padding: 24rpx;
box-shadow: 0 4rpx 16rpx rgba(0, 0, 0, 0.05);
}
/* 按钮基础样式 */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
padding: 16rpx 32rpx;
border-radius: 12rpx;
font-size: 28rpx;
font-weight: 500;
transition: all 0.2s;
}
.btn-primary {
background-color: #52c41a;
color: #ffffff;
}
.btn-primary:active {
background-color: #389e0d;
}
.btn-outline {
background-color: transparent;
border: 2rpx solid #52c41a;
color: #52c41a;
}
.btn-outline:active {
background-color: rgba(82, 196, 26, 0.1);
}
/* 输入框样式 */
.input {
width: 100%;
height: 88rpx;
padding: 0 24rpx;
background-color: #f5f5f5;
border-radius: 12rpx;
font-size: 28rpx;
box-sizing: border-box;
}
.input:focus {
background-color: #ffffff;
border: 2rpx solid #52c41a;
}
/* 分割线 */
.divider {
height: 1rpx;
background-color: #f0f0f0;
margin: 24rpx 0;
}
/* 加载状态 */
.loading {
display: flex;
align-items: center;
justify-content: center;
padding: 40rpx;
color: #999999;
font-size: 24rpx;
}
/* 空状态 */
.empty {
display: flex;
flex-direction: column;
align-items: center;
justify-content: center;
padding: 80rpx 40rpx;
color: #999999;
}
.empty-icon {
width: 160rpx;
height: 160rpx;
margin-bottom: 24rpx;
opacity: 0.5;
}
.empty-text {
font-size: 28rpx;
color: #999999;
}
/* 主题色变量 */
:root {
--primary-color: #52c41a;
--primary-light: #95de64;
--primary-dark: #389e0d;
--success-color: #52c41a;
--warning-color: #faad14;
--error-color: #ff4d4f;
--text-color: #333333;
--text-secondary: #666666;
--text-muted: #999999;
--border-color: #f0f0f0;
--bg-color: #f8f9fa;
--card-bg: #ffffff;
}