- Enable task list checkbox toggling in preview mode with live content updates - Add task list and table insertion buttons to InsertToolbar - Implement smart block snippet insertion with automatic newline handling - Add horizontal scroll wrapper for wide tables in preview - Fix editor scroll position preservation during content updates - Use useLayoutEffect to prevent scroll jumps when textarea auto-resizes - Update task list styling
252 lines
3.8 KiB
CSS
252 lines
3.8 KiB
CSS
@tailwind base;
|
|
@tailwind components;
|
|
@tailwind utilities;
|
|
|
|
body {
|
|
margin: 0;
|
|
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
|
|
'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
|
|
sans-serif;
|
|
-webkit-font-smoothing: antialiased;
|
|
-moz-osx-font-smoothing: grayscale;
|
|
}
|
|
|
|
code {
|
|
font-family: source-code-pro, Menlo, Monaco, Consolas, 'Courier New',
|
|
monospace;
|
|
}
|
|
|
|
/* Override Tailwind prose inline code styling to prevent overlap */
|
|
.prose code {
|
|
padding-top: 0 !important;
|
|
padding-bottom: 0 !important;
|
|
vertical-align: baseline !important;
|
|
line-height: 1 !important;
|
|
}
|
|
|
|
.prose code::before,
|
|
.prose code::after {
|
|
content: none !important;
|
|
}
|
|
|
|
/* TipTap Editor Styles */
|
|
.ProseMirror {
|
|
min-height: 100%;
|
|
color: #111827;
|
|
}
|
|
|
|
.dark .ProseMirror {
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror:focus {
|
|
outline: none;
|
|
}
|
|
|
|
.ProseMirror h1 {
|
|
font-size: 2em;
|
|
font-weight: bold;
|
|
margin-top: 0.5em;
|
|
margin-bottom: 0.5em;
|
|
color: #111827;
|
|
}
|
|
|
|
.dark .ProseMirror h1 {
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror h2 {
|
|
font-size: 1.5em;
|
|
font-weight: bold;
|
|
margin-top: 0.5em;
|
|
margin-bottom: 0.5em;
|
|
color: #111827;
|
|
}
|
|
|
|
.dark .ProseMirror h2 {
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror h3 {
|
|
font-size: 1.25em;
|
|
font-weight: bold;
|
|
margin-top: 0.5em;
|
|
margin-bottom: 0.5em;
|
|
color: #111827;
|
|
}
|
|
|
|
.dark .ProseMirror h3 {
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror p {
|
|
margin-bottom: 0.5em;
|
|
color: #111827;
|
|
}
|
|
|
|
.dark .ProseMirror p {
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror strong {
|
|
font-weight: bold;
|
|
color: #111827;
|
|
}
|
|
|
|
.dark .ProseMirror strong {
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror em {
|
|
font-style: italic;
|
|
color: #111827;
|
|
}
|
|
|
|
.dark .ProseMirror em {
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror s {
|
|
text-decoration: line-through;
|
|
color: #111827;
|
|
}
|
|
|
|
.dark .ProseMirror s {
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror u {
|
|
text-decoration: underline;
|
|
color: #111827;
|
|
}
|
|
|
|
.dark .ProseMirror u {
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror code {
|
|
background-color: #f3f4f6;
|
|
padding: 0.05rem 0.25rem;
|
|
border-radius: 0.25rem;
|
|
font-family: 'Courier New', monospace;
|
|
font-size: 1.1em;
|
|
color: #1f2937;
|
|
vertical-align: baseline;
|
|
line-height: 1;
|
|
}
|
|
|
|
.dark .ProseMirror code {
|
|
background-color: #374151;
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror pre {
|
|
background-color: #1f2937;
|
|
color: #f3f4f6;
|
|
padding: 1rem;
|
|
border-radius: 0.5rem;
|
|
overflow-x: auto;
|
|
margin: 1em 0;
|
|
}
|
|
|
|
.dark .ProseMirror pre {
|
|
background-color: #111827;
|
|
}
|
|
|
|
.ProseMirror pre code {
|
|
background-color: transparent;
|
|
padding: 0;
|
|
color: inherit;
|
|
}
|
|
|
|
.ProseMirror ul,
|
|
.ProseMirror ol {
|
|
padding-left: 1.5rem;
|
|
margin: 0.5em 0;
|
|
color: #111827;
|
|
}
|
|
|
|
.dark .ProseMirror ul,
|
|
.dark .ProseMirror ol {
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror ul {
|
|
list-style-type: disc;
|
|
}
|
|
|
|
.ProseMirror ol {
|
|
list-style-type: decimal;
|
|
}
|
|
|
|
.ProseMirror li {
|
|
margin: 0.25em 0;
|
|
color: #111827;
|
|
}
|
|
|
|
.ProseMirror li p {
|
|
margin: 0;
|
|
}
|
|
|
|
.dark .ProseMirror li {
|
|
color: #f3f4f6;
|
|
}
|
|
|
|
.ProseMirror blockquote {
|
|
border-left: 3px solid #d1d5db;
|
|
padding-left: 1rem;
|
|
margin: 1em 0;
|
|
color: #6b7280;
|
|
}
|
|
|
|
.dark .ProseMirror blockquote {
|
|
border-left-color: #4b5563;
|
|
color: #9ca3af;
|
|
}
|
|
|
|
.ProseMirror hr {
|
|
border: none;
|
|
border-top: 2px solid #e5e7eb;
|
|
margin: 2em 0;
|
|
}
|
|
|
|
.dark .ProseMirror hr {
|
|
border-top-color: #374151;
|
|
}
|
|
|
|
/* Task list styling for preview mode */
|
|
.prose ul li:has(> input[type="checkbox"]) {
|
|
list-style: none;
|
|
margin-left: -1.5em;
|
|
display: flex;
|
|
align-items: flex-start;
|
|
}
|
|
|
|
.prose ul:has(li > input[type="checkbox"]) {
|
|
list-style: none;
|
|
padding-left: 1.5em;
|
|
}
|
|
|
|
.prose input[type="checkbox"] {
|
|
width: 1.25rem;
|
|
height: 1.25rem;
|
|
margin-right: 0.75rem;
|
|
margin-top: 0.32rem;
|
|
cursor: pointer;
|
|
flex-shrink: 0;
|
|
}
|
|
|
|
.prose input[type="checkbox"]:checked {
|
|
accent-color: #16a34a;
|
|
}
|
|
|
|
.prose .markdown-table-wrapper {
|
|
overflow-x: auto;
|
|
margin: 1.5em 0;
|
|
}
|
|
|
|
.prose .markdown-table-wrapper table {
|
|
margin: 0;
|
|
min-width: 100%;
|
|
}
|