From 341c83e3a4e7ff35d2c03f12708dc06ce3e83ac7 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Tue, 12 Nov 2024 12:42:57 +0100 Subject: [PATCH] fix another edge-case + fix sidebar-resizer positioning --- core/wiki/macros/sidebar-resizer.tid | 2 ++ themes/tiddlywiki/vanilla/sidebar-resizer.tid | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/core/wiki/macros/sidebar-resizer.tid b/core/wiki/macros/sidebar-resizer.tid index 084f06701..5d3d19c09 100644 --- a/core/wiki/macros/sidebar-resizer.tid +++ b/core/wiki/macros/sidebar-resizer.tid @@ -277,6 +277,8 @@ title: $:/core/procedures/sidebar-resizer sidebarMaxWidth={{{ [subtractsubtractaddsubtractsubtract] }}} clampedDiff={{{ [addaddsubtractsubtractcompare:number:gt[0]] :else[[0]] }}} sidebarWidth={{{ [subtract] }}} + sidebarWidth={{{ [compare:number:gteq] :else[] }}} + sidebarMaxWidth={{{ [compare:number:gteq] :else[] }}} storyWidth={{{ [subtractsubtract] }}} innerStoryWidth={{{ [subtractsubtractsubtractsubtract] }}}> diff --git a/themes/tiddlywiki/vanilla/sidebar-resizer.tid b/themes/tiddlywiki/vanilla/sidebar-resizer.tid index b0ef2dd3a..e8c61596d 100644 --- a/themes/tiddlywiki/vanilla/sidebar-resizer.tid +++ b/themes/tiddlywiki/vanilla/sidebar-resizer.tid @@ -121,12 +121,12 @@ code-body: yes <%if [match[yes]] %> .tc-sidebar-resizer.tc-main-sidebar-resizer { - left: clamp(calc(<> + <> + <> + <> - <> + (<> / 3)),calc(100% - <> + (<> / 3)),calc(100% - <> + (<> / 3))); + left: min(clamp(calc(<> + <> + <> + <> - <> + (<> / 3)),calc(100% - <> + (<> / 3)),calc(100% - <> + (<> / 3))),calc(100% - <> + (<> / 3))); } .tc-sidebar-left .tc-sidebar-resizer.tc-main-sidebar-resizer { left: auto; - right: clamp(calc(<> + <> + <> + <> - <> + (<> / 3)),calc(100% - <> + (<> / 3)),calc(100% - <> + (<> / 3))); + right: min(clamp(calc(<> + <> + <> + <> - <> + (<> / 3)),calc(100% - <> + (<> / 3)),calc(100% - <> + (<> / 3))),calc(100% - <> + (<> / 3))); } <% endif %>