64 lines
2.2 KiB
CSS
64 lines
2.2 KiB
CSS
@tailwind base;
|
|
@tailwind components;
|
|
@tailwind utilities;
|
|
|
|
@layer base {
|
|
body {
|
|
@apply bg-surface text-gray-900 antialiased;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
|
|
font-size: 16px;
|
|
line-height: 1.5;
|
|
-webkit-tap-highlight-color: transparent;
|
|
-webkit-touch-callout: none;
|
|
overscroll-behavior-y: none;
|
|
}
|
|
|
|
* {
|
|
@apply box-border;
|
|
}
|
|
|
|
/* 移动端安全区工具类 */
|
|
.pt-safe { padding-top: env(safe-area-inset-top); }
|
|
.pb-safe { padding-bottom: env(safe-area-inset-bottom); }
|
|
.pl-safe { padding-left: env(safe-area-inset-left); }
|
|
.pr-safe { padding-right: env(safe-area-inset-right); }
|
|
}
|
|
|
|
@layer components {
|
|
.btn {
|
|
@apply inline-flex items-center justify-center px-3 py-1.5 rounded font-medium text-sm transition-colors disabled:opacity-50 disabled:cursor-not-allowed;
|
|
}
|
|
.btn-primary {
|
|
@apply btn bg-primary text-white hover:bg-primary-dark;
|
|
}
|
|
.btn-secondary {
|
|
@apply btn bg-gray-100 text-gray-700 hover:bg-gray-200;
|
|
}
|
|
.btn-danger {
|
|
@apply btn bg-danger text-white hover:bg-red-700;
|
|
}
|
|
.card {
|
|
@apply bg-white rounded-lg shadow-sm border border-gray-200 p-4;
|
|
}
|
|
.input {
|
|
@apply w-full px-2.5 py-1.5 rounded-md border border-gray-300 focus:outline-none focus:ring-2 focus:ring-primary focus:border-transparent text-sm;
|
|
}
|
|
.label {
|
|
@apply block text-sm font-medium text-gray-700 mb-1;
|
|
}
|
|
}
|
|
|
|
@media print {
|
|
header, nav, .no-print { display: none !important; }
|
|
main { padding: 0 !important; max-width: 100% !important; }
|
|
.card { box-shadow: none !important; border: 1px solid #ccc !important; break-inside: avoid; }
|
|
body { background: white !important; }
|
|
a { color: inherit !important; text-decoration: none !important; }
|
|
}
|
|
|
|
/* Markdown 渲染美化增强(在 prose 基础上补充表格斑马纹和代码高亮) */
|
|
.prose tbody tr:nth-child(even) { background-color: rgb(249 250 251); }
|
|
.prose pre { @apply bg-gray-900 text-gray-100 rounded-md p-3 my-3 overflow-x-auto text-xs; }
|
|
.prose pre code { @apply bg-transparent text-gray-100 p-0; }
|
|
.prose code { @apply bg-gray-100 text-primary px-1 py-0.5 rounded text-xs font-mono; }
|