From 77c251fff00a0660bc4f38cadb3cf33fca8334e8 Mon Sep 17 00:00:00 2001 From: Steffen Becker Date: Sun, 24 May 2026 13:48:26 +0200 Subject: [PATCH] feat: add global styles and CSS variables --- src/styles/editor.css | 57 +++++++++++++++++++++++++++++++++++++++++++ src/styles/global.css | 36 +++++++++++++++++++++++++++ 2 files changed, 93 insertions(+) create mode 100644 src/styles/editor.css create mode 100644 src/styles/global.css diff --git a/src/styles/editor.css b/src/styles/editor.css new file mode 100644 index 0000000..bd69562 --- /dev/null +++ b/src/styles/editor.css @@ -0,0 +1,57 @@ +.editor { + flex: 1; + display: flex; + justify-content: center; + padding: 2rem 1rem; + overflow-y: auto; +} + +.editor .tiptap { + width: 100%; + max-width: 720px; + min-height: 60vh; + padding: 2rem; + background: var(--color-surface); + border-radius: var(--radius); + box-shadow: var(--shadow); + border: 1px solid var(--color-border); + outline: none; + font-family: var(--font-serif); + font-size: 1.05rem; + line-height: 1.7; + color: var(--color-text); +} + +.editor .tiptap p { + margin-bottom: 0.75em; +} + +.editor .tiptap h1, +.editor .tiptap h2, +.editor .tiptap h3 { + font-family: var(--font-sans); + font-weight: 700; + line-height: 1.3; + margin-top: 1.5em; + margin-bottom: 0.5em; +} + +.editor .tiptap h1 { + font-size: 1.75rem; +} + +.editor .tiptap h2 { + font-size: 1.4rem; +} + +.editor .tiptap h3 { + font-size: 1.15rem; +} + +.editor .tiptap p.is-editor-empty:first-child::before { + content: attr(data-placeholder); + float: left; + color: var(--color-text-muted); + pointer-events: none; + height: 0; +} diff --git a/src/styles/global.css b/src/styles/global.css new file mode 100644 index 0000000..e98e365 --- /dev/null +++ b/src/styles/global.css @@ -0,0 +1,36 @@ +*, +*::before, +*::after { + box-sizing: border-box; + margin: 0; + padding: 0; +} + +:root { + --color-bg: #f1f5f9; + --color-surface: #ffffff; + --color-border: #e2e8f0; + --color-text: #1e293b; + --color-text-muted: #94a3b8; + --color-primary: #3b82f6; + --color-primary-hover: #2563eb; + --color-toolbar-bg: #ffffff; + --radius: 6px; + --shadow: 0 1px 3px rgba(0, 0, 0, 0.08); + --font-sans: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; + --font-serif: Georgia, 'Times New Roman', serif; +} + +html, body { + height: 100%; + font-family: var(--font-sans); + background: var(--color-bg); + color: var(--color-text); + -webkit-font-smoothing: antialiased; +} + +#app { + height: 100%; + display: flex; + flex-direction: column; +}