feat(editor): 66ch measure + heading spacing (#77 follow-up)
- editor text centers at reading.css --measure 66ch (zero-advance × 66 + 2×24pt padding), scroll view still fills the column - headings get paragraphSpacingBefore 75 / after 30 (CSS 90/30 minus the visible blank separator's ~15pt)
This commit is contained in:
1 parent
3934b10ec5
commit
46441438a2
3 files changed
+21
-2
No files matched your search
@@ -396,8 +396,13 @@ nonisolated enum ProsePresenter {
|
||||
style.firstLineHeadIndent = 20 // CSS: blockquote padding-left 20px
|
||||
style.headIndent = 20 // wrapped quote lines align under the text
|
||||
}
|
||||
style.paragraphSpacing = 0
|
||||
style.paragraphSpacingBefore = 0
|
||||
if kind == .heading1 || kind == .heading2 || kind == .heading3 || kind == .heading4Plus {
|
||||
// Reading parity: head-space-before 90 / after 30 MINUS the blank
|
||||
// separator line's own height (~15pt), which the editor shows and
|
||||
// reading collapses. Alexander ruled blank-only "a bit tight".
|
||||
style.paragraphSpacingBefore = 75
|
||||
style.paragraphSpacing = 30
|
||||
}
|
||||
return style
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user