Skip to content

Commit 78dc9da

Browse files
gpolitisclaude
andauthored
Make preview overlay's inset configurable via CSS variable (#95)
* Read --markedit-content-inset-left for preview overlay positioning In preview-only mode, the preview pane uses position:absolute + inset:0, which is sized against the viewport regardless of any padding on body. That makes it impossible for a third-party plugin (e.g. a left-edge sidebar) to coexist with preview mode without overriding this rule via class-name targeting. Replace inset:0 with explicit top/right/bottom values plus left: var(--markedit-content-inset-left, 0). The fallback keeps existing behaviour identical when no plugin sets the variable. Plugins that occupy a horizontal slice on the left can now declare their offset via the CSS variable and compose cleanly with preview overlay mode without reaching into preview's class names. * Use single --markedit-content-inset variable for overlay positioning Per review feedback: cover all four edges with one shorthand-valued custom property instead of a per-side variable for left only. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com> --------- Co-authored-by: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
1 parent b390edd commit 78dc9da

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

styles/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131

3232
.markdown-body.overlay {
3333
position: absolute;
34-
inset: 0;
34+
inset: var(--markedit-content-inset, 0);
3535
display: block;
3636
z-index: 10000;
3737
}

0 commit comments

Comments
 (0)