From 392a8d7c8c7130fd0dd2237d4f36ec94f1a8c86b Mon Sep 17 00:00:00 2001 From: Naiyuan Qing <145280634+NevilleQingNY@users.noreply.github.com> Date: Thu, 2 Apr 2026 20:10:45 +0800 Subject: [PATCH] refactor(editor): polish typography for better visual hierarchy MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Heading hierarchy: H1 bumped to 1.125rem with letter-spacing to distinguish from H2 (both were 1rem). Margins normalized to 0.5rem baseline rhythm. - List items: increased spacing from 0.125rem to 0.25rem for readability. Remove paragraph margins inside list items (Tiptap wraps li content in
tags which inherited 0.5rem margins).
- Nested lists: bullet style progression (disc → circle → square) and
numbering progression (decimal → lower-alpha → lower-roman).
- Blockquotes: tighter paragraph spacing inside, nested blockquotes get
lighter border for depth indication.
- Inline code: border-radius uses semantic --radius-sm token.
Co-Authored-By: Claude Opus 4.6 (1M context) ) */
+.rich-text-editor li > p {
+ margin: 0;
+}
+
+.rich-text-editor li > p + p {
+ margin-top: 0.25rem;
+}
+
+/* Nested lists — bullet style progression and tighter spacing */
+.rich-text-editor ul ul {
+ list-style-type: circle;
+ margin: 0.25rem 0;
+}
+
+.rich-text-editor ul ul ul {
+ list-style-type: square;
+}
+
+.rich-text-editor ol ol {
+ list-style-type: lower-alpha;
+ margin: 0.25rem 0;
+}
+
+.rich-text-editor ol ol ol {
+ list-style-type: lower-roman;
+}
+
/* Inline code */
.rich-text-editor code {
font-family: var(--font-mono, ui-monospace, monospace);
@@ -95,7 +124,7 @@
border: 1px solid color-mix(in srgb, var(--foreground) 5%, transparent);
color: color-mix(in srgb, var(--foreground) 75%, transparent);
padding: 0.125rem 0.375rem;
- border-radius: calc(var(--radius) * 0.6);
+ border-radius: var(--radius-sm);
}
/* Code blocks */
@@ -230,6 +259,25 @@
font-style: italic;
}
+.rich-text-editor blockquote p {
+ margin-top: 0.25rem;
+ margin-bottom: 0.25rem;
+}
+
+.rich-text-editor blockquote > *:first-child {
+ margin-top: 0;
+}
+
+.rich-text-editor blockquote > *:last-child {
+ margin-bottom: 0;
+}
+
+.rich-text-editor blockquote blockquote {
+ margin-top: 0.25rem;
+ margin-bottom: 0.25rem;
+ border-left-color: color-mix(in srgb, var(--muted-foreground) 15%, transparent);
+}
+
/* Horizontal rules */
.rich-text-editor hr {
border: none;