From fc86891801b840e9f7a36b077ae74f8e42747274 Mon Sep 17 00:00:00 2001 From: gpolitis Date: Tue, 28 Apr 2026 20:31:41 +0200 Subject: [PATCH 1/2] 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. --- styles/main.css | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/styles/main.css b/styles/main.css index c8c3785..6c82cc1 100644 --- a/styles/main.css +++ b/styles/main.css @@ -31,7 +31,10 @@ .markdown-body.overlay { position: absolute; - inset: 0; + top: 0; + right: 0; + bottom: 0; + left: var(--markedit-content-inset-left, 0); display: block; z-index: 10000; } From 5beca15704a11dcd2bf39c21d8a3e6cb3fe60a68 Mon Sep 17 00:00:00 2001 From: gpolitis Date: Wed, 29 Apr 2026 10:11:31 +0200 Subject: [PATCH 2/2] 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) --- styles/main.css | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/styles/main.css b/styles/main.css index 6c82cc1..f3f6aaf 100644 --- a/styles/main.css +++ b/styles/main.css @@ -31,10 +31,7 @@ .markdown-body.overlay { position: absolute; - top: 0; - right: 0; - bottom: 0; - left: var(--markedit-content-inset-left, 0); + inset: var(--markedit-content-inset, 0); display: block; z-index: 10000; }