Replaces Monaco editor with CodeMirror in the frontend, removing related dependencies and configuration. Refactors font management to support multiple formats (woff, woff2, ttf, otf) and dynamic font switching, including backend API and frontend theme config UI. Adds gzip compression middleware to backend. Updates theme config to allow font selection and custom font upload, and improves theme preview and color customization UI. Cleans up unused code and improves sidebar and terminal font sizing responsiveness.
145 lines
2.9 KiB
CSS
145 lines
2.9 KiB
CSS
@import url('./fonts.css');
|
|
@import url('./text.css');
|
|
@tailwind base;
|
|
@tailwind components;
|
|
@tailwind utilities;
|
|
|
|
body {
|
|
font-family: var(--font-family-base, 'Quicksand', 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif) !important;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
text-rendering: optimizeLegibility;
|
|
font-smooth: always;
|
|
letter-spacing: 0.02em;
|
|
}
|
|
|
|
:root {
|
|
/* 字体变量:可被 JS 动态覆盖 */
|
|
--font-family-fallbacks: 'Quicksand', 'Nunito', 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, 'PingFang SC', 'Microsoft YaHei', sans-serif;
|
|
--font-family-base: var(--font-family-fallbacks);
|
|
--heroui-primary: 217.2 91.2% 59.8%;
|
|
/* 自然的现代蓝 */
|
|
--heroui-primary-foreground: 210 40% 98%;
|
|
--heroui-radius: 0.75rem;
|
|
--text-primary: 222.2 47.4% 11.2%;
|
|
--text-secondary: 215.4 16.3% 46.9%;
|
|
}
|
|
|
|
h1,
|
|
h2,
|
|
h3,
|
|
h4,
|
|
h5,
|
|
h6 {
|
|
color: hsl(var(--text-primary));
|
|
letter-spacing: -0.02em;
|
|
}
|
|
|
|
.dark h1,
|
|
.dark h2,
|
|
.dark h3,
|
|
.dark h4,
|
|
.dark h5,
|
|
.dark h6 {
|
|
color: hsl(210 40% 98%);
|
|
}
|
|
|
|
.dark {
|
|
--heroui-primary: 217.2 91.2% 59.8%;
|
|
--heroui-primary-foreground: 210 40% 98%;
|
|
}
|
|
|
|
@layer components {
|
|
.hide-scrollbar::-webkit-scrollbar {
|
|
width: 0 !important;
|
|
height: 0 !important;
|
|
}
|
|
|
|
.hide-scrollbar::-webkit-scrollbar-thumb {
|
|
width: 0 !important;
|
|
height: 0 !important;
|
|
background-color: transparent !important;
|
|
}
|
|
|
|
.hide-scrollbar::-webkit-scrollbar-track {
|
|
width: 0 !important;
|
|
height: 0 !important;
|
|
background-color: transparent !important;
|
|
}
|
|
}
|
|
|
|
::selection {
|
|
background-color: #ffcdba;
|
|
color: #fff;
|
|
}
|
|
|
|
::-webkit-scrollbar {
|
|
width: 6px;
|
|
height: 6px;
|
|
}
|
|
|
|
::-webkit-scrollbar-track {
|
|
background-color: transparent;
|
|
border-radius: 3px;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb {
|
|
background-color: rgba(255, 182, 193, 0.4);
|
|
/* 浅粉色滚动条 */
|
|
border-radius: 3px;
|
|
transition: all 0.3s;
|
|
}
|
|
|
|
::-webkit-scrollbar-thumb:hover {
|
|
background-color: rgba(255, 127, 172, 0.6);
|
|
}
|
|
|
|
.monaco-editor {
|
|
outline: none !important;
|
|
border-radius: 5px !important;
|
|
overflow: hidden !important;
|
|
}
|
|
|
|
.monaco-editor,
|
|
.monaco-editor-background {
|
|
background-color: transparent !important;
|
|
}
|
|
|
|
.monaco-editor .margin {
|
|
background-color: transparent !important;
|
|
}
|
|
|
|
.minimap canvas:nth-child(2) {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.monaco-editor .scroll-decoration {
|
|
--vscode-scrollbar-shadow: rgba(0, 0, 0, 0.2);
|
|
}
|
|
|
|
.monaco-editor .decorationsOverviewRuler {
|
|
opacity: 0.5;
|
|
}
|
|
|
|
.monaco-editor .view-overlays .current-line-exact {
|
|
border-color: rgba(0, 0, 0, 0.2) !important;
|
|
border-radius: 5px !important;
|
|
}
|
|
|
|
.context-view.monaco-menu-container * {
|
|
font-family:
|
|
-apple-system,
|
|
BlinkMacSystemFont,
|
|
'Segoe UI',
|
|
'PingFang SC',
|
|
'Microsoft YaHei',
|
|
sans-serif !important;
|
|
}
|
|
|
|
.ql-hidden {
|
|
@apply hidden;
|
|
}
|
|
|
|
.ql-editor img {
|
|
@apply inline-block;
|
|
} |