Skip to content

Commit 4a18114

Browse files
committed
fix(editor): widen vertical margin around fenced code blocks
1 parent c73435f commit 4a18114

2 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/components/molecules/MarkdownEditor/MarkdownEditor.tsx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -68,9 +68,10 @@ const theme: EditorThemeClasses = {
6868
// Sunken dark well (not the lighter `cork-elevated` used by inputs) so a code
6969
// block reads as code, not an editable field. `cork-code-block` is the inner
7070
// `<code>` of the wrapper `CorkCodeNode` renders — the wrapper itself owns
71-
// `my-2` (so the chip + code together count as one block visually) while the
72-
// inner `<code>` carries the dark well styling. See `CorkCodeNode.ts` and
73-
// `.cork-code-block-wrapper` / `.cork-code-block-language` in style.css.
71+
// the outer vertical margin (so the chip + code together count as one block
72+
// visually) while the inner `<code>` carries the dark well styling. See
73+
// `CorkCodeNode.ts` and `.cork-code-block-wrapper` / `.cork-code-block-language`
74+
// in style.css.
7475
code: "cork-code-block block overflow-x-auto whitespace-pre rounded-md border border-cork-border/65 bg-cork-bg p-3 font-mono text-xs leading-relaxed",
7576
// Prism token → Tailwind class. `CodeHighlightNode.createDOM` reads
7677
// `theme.codeHighlight[token.type]` and applies the class to each

src/style.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@
274274
Lives in @layer utilities so its selectors land in the same layer
275275
cascade as the Tailwind utilities they share elements with. */
276276
.cork-code-block-wrapper {
277-
margin: 0.5rem 0;
277+
margin: 0.75rem 0;
278278
}
279279

280280
/* `display: flex` (block-level, not `inline-flex`) is load-bearing, not a

0 commit comments

Comments
 (0)