build: 引入tailwindcss并迁移原有样式到原子类
1. 新增postcss、autoprefixer、tailwindcss依赖并初始化配置 2. 移除全局及页面级CSS文件,将样式替换为tailwind原子类 3. 重构API调用逻辑,拆分接口请求函数 4. 统一项目样式规范,优化布局与组件样式
This commit is contained in:
@@ -1,42 +1,48 @@
|
||||
* {
|
||||
box-sizing: border-box;
|
||||
@tailwind base;
|
||||
@tailwind components;
|
||||
@tailwind utilities;
|
||||
|
||||
@layer base {
|
||||
* {
|
||||
@apply box-border;
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
@apply m-0 min-h-full w-full min-w-80;
|
||||
}
|
||||
|
||||
body {
|
||||
@apply bg-canvas font-sans text-ink;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
font: inherit;
|
||||
}
|
||||
}
|
||||
|
||||
html,
|
||||
body,
|
||||
#root {
|
||||
width: 100%;
|
||||
min-width: 320px;
|
||||
min-height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
@layer components {
|
||||
.section-card {
|
||||
@apply rounded-lg;
|
||||
}
|
||||
|
||||
body {
|
||||
color: #1d2129;
|
||||
background: #f2f3f5;
|
||||
font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
|
||||
}
|
||||
.page-stack {
|
||||
@apply flex flex-col gap-4;
|
||||
}
|
||||
|
||||
button,
|
||||
input,
|
||||
textarea,
|
||||
select {
|
||||
font: inherit;
|
||||
}
|
||||
.modal-actions {
|
||||
@apply mt-6 flex justify-end gap-3;
|
||||
}
|
||||
|
||||
.section-card {
|
||||
border-radius: 8px;
|
||||
}
|
||||
.form-label {
|
||||
@apply mb-2 text-sm font-medium text-[#4e5969];
|
||||
}
|
||||
|
||||
.page-stack {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 16px;
|
||||
}
|
||||
|
||||
.modal-actions {
|
||||
display: flex;
|
||||
justify-content: flex-end;
|
||||
gap: 12px;
|
||||
margin-top: 24px;
|
||||
.form-help {
|
||||
@apply -mt-3 mb-[18px] text-[13px] leading-[1.6] text-muted;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user