From 910cffb4e2cc83f35e4857c0edebdaff343f8d77 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Tue, 8 Oct 2024 19:45:26 +0200 Subject: [PATCH] further adjustments --- themes/tiddlywiki/centralised/styles.tid | 4 ++-- themes/tiddlywiki/vanilla/sidebar-resizer.tid | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/tiddlywiki/centralised/styles.tid b/themes/tiddlywiki/centralised/styles.tid index ebf32f54b..8efa9ed97 100644 --- a/themes/tiddlywiki/centralised/styles.tid +++ b/themes/tiddlywiki/centralised/styles.tid @@ -11,7 +11,7 @@ tags: [[$:/tags/Stylesheet]] html .tc-story-river { position: relative; - width: {{$:/themes/tiddlywiki/centralised/metrics/storywidth}}; + width: min({{$:/themes/tiddlywiki/centralised/metrics/storywidth}},calc(100% - (2 * {{$:/themes/tiddlywiki/centralised/metrics/sidebarminwidth}}))); padding: 42px; margin: 0 auto; text-align: left; @@ -21,7 +21,7 @@ tags: [[$:/tags/Stylesheet]] text-align: left; left: 50%; right: 0; - margin-left: calc({{$:/themes/tiddlywiki/centralised/metrics/storywidth}} / 2 - 42px); + margin-left: min(calc((100% - (2 * {{$:/themes/tiddlywiki/centralised/metrics/sidebarminwidth}})) / 2 - 42px),calc({{$:/themes/tiddlywiki/centralised/metrics/storywidth}} / 2 - 42px)); width: auto; } diff --git a/themes/tiddlywiki/vanilla/sidebar-resizer.tid b/themes/tiddlywiki/vanilla/sidebar-resizer.tid index a28f1a313..74ad3c9c3 100644 --- a/themes/tiddlywiki/vanilla/sidebar-resizer.tid +++ b/themes/tiddlywiki/vanilla/sidebar-resizer.tid @@ -95,7 +95,7 @@ code-body: yes <%elseif [{$:/theme}match[$:/themes/tiddlywiki/centralised]] %> .tc-sidebar-resizer { - left: calc(50% + ({{$:/themes/tiddlywiki/centralised/metrics/storywidth}} / 2) - 28px); + left: min(calc(50% + ({{$:/themes/tiddlywiki/centralised/metrics/storywidth}} / 2) - 28px),calc(100% - {{$:/themes/tiddlywiki/centralised/metrics/sidebarminwidth}} - 28px)); } <% endif %>