@import 'tailwindcss'; @layer components { .node-editor { @apply w-full h-full bg-white; > div { @apply w-full h-full outline-none; } } .no-scrollbar::-webkit-scrollbar { display: none; } .scrollbar::-webkit-scrollbar { display: block; width: 2px; height: 2px; } .scrollbar::-webkit-scrollbar-thumb { background-color: #ccc; border-radius: 2px; } .scrollbar::-webkit-scrollbar-thumb:horizontal { background-color: #ccc; border-radius: 2px; } } :root { --purple-light: #e0e0ff; /* 默认浅紫色背景 */ --black: #000000; /* 默认黑色 */ --white: #ffffff; /* 默认白色 */ --gray-3: #d3d3d3; /* 默认灰色3 */ --gray-2: #e5e5e5; /* 默认灰色2 */ } .tiptap-preview { .tiptap { margin: 0; padding: 0.5rem; border: unset; } } .tiptap { margin: 0.5rem 1rem; padding: 0.5rem; border-radius: 5px; border: 1px solid #ccc; } /* Basic editor styles */ .tiptap:first-child { margin-top: 0; } /* List styles */ .tiptap ul, .tiptap ol { padding: 0 1rem; margin: 1.25rem 1rem 1.25rem 0.4rem; } .tiptap ul li p, .tiptap ol li p { margin-top: 0.25em; margin-bottom: 0.25em; } /* Heading styles */ .tiptap h1, .tiptap h2, .tiptap h3, .tiptap h4, .tiptap h5, .tiptap h6 { line-height: 1.1; margin-top: 2.5rem; text-wrap: pretty; } .tiptap h1, .tiptap h2 { /* margin-top: 3.5rem; */ margin-top: 1rem; margin-bottom: .5rem; } .tiptap h1 { font-size: 1.4rem; font-weight: 800; } .tiptap h2 { font-size: 1.2rem; font-weight: 600; } .tiptap h3 { font-size: 1.1rem; font-weight: 500; } .tiptap h4, .tiptap h5, .tiptap h6 { font-size: 1rem; } /* Code and preformatted text styles */ .tiptap code { background-color: var(--purple-light); border-radius: 0.4rem; color: var(--black); font-size: 0.85rem; padding: 0.25em 0.3em; } .tiptap pre { border: 1px solid #ccc; /* background: var(--black); */ border-radius: 0.5rem; /* color: var(--white); */ font-family: 'JetBrainsMono', monospace; margin: 1.5rem 0; padding: 0.75rem 1rem; } .tiptap pre code { background: none; color: inherit; font-size: 0.8rem; padding: 0; } .tiptap mark { background-color: #FAF594; border-radius: 0.4rem; box-decoration-break: clone; padding: 0.1rem 0.3rem; } .tiptap blockquote { border-left: 3px solid var(--gray-3); margin: 1.5rem 0; padding-left: 1rem; } .tiptap hr { border: none; border-top: 1px solid var(--gray-2); margin: 2rem 0; }