From 843f04370bf74b1d323d761bdd49a50c0d6b0a57 Mon Sep 17 00:00:00 2001 From: BurningTreeC Date: Fri, 1 Nov 2024 08:06:39 +0100 Subject: [PATCH] updates --- core/wiki/macros/sidebar-resizer.tid | 4 ++-- themes/tiddlywiki/vanilla/base.tid | 16 ++++++++++------ themes/tiddlywiki/vanilla/sidebar-resizer.tid | 8 ++++---- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/core/wiki/macros/sidebar-resizer.tid b/core/wiki/macros/sidebar-resizer.tid index 007b5a630..9b3a9b2e9 100644 --- a/core/wiki/macros/sidebar-resizer.tid +++ b/core/wiki/macros/sidebar-resizer.tid @@ -206,13 +206,13 @@ title: $:/core/procedures/sidebar-resizer clampedDiff={{{ [addaddsubtractcompare:number:gt[0]] ~0 }}} sliderWidth={{{ [convert.to.pixels.locally] }}} sidebarWidth={{{ [subtractsubtract] }}}> - + <$let sidebarWidthConverted={{{ [function[convert.to.result],,] }}} sidebarMaxWidthConverted={{{ [function[convert.to.result],,] }}} sidebarMinWidthConverted={{{ [function[convert.to.result],,] }}} sidebarWidthSetTiddler={{{ [!is[blank]] :else[] }}}> - + <$action-setfield $tiddler=<> text=<>/> diff --git a/themes/tiddlywiki/vanilla/base.tid b/themes/tiddlywiki/vanilla/base.tid index 7bc192b1f..500a8f16a 100644 --- a/themes/tiddlywiki/vanilla/base.tid +++ b/themes/tiddlywiki/vanilla/base.tid @@ -1019,7 +1019,7 @@ button.tc-btn-invisible.tc-remove-tag-button { .tc-sidebar-scrollable { position: fixed; top: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}}; - left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),<>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}})); + left: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),calc(<> + <>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + <>)); bottom: 0; right: 0; overflow-y: auto; @@ -1031,7 +1031,7 @@ button.tc-btn-invisible.tc-remove-tag-button { .tc-sidebar-left .tc-sidebar-scrollable { left: 0; - right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),<>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}})); + right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}}),calc(<> + <>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + <>)); margin: 0 0 0 0; } @@ -1046,14 +1046,14 @@ button.tc-btn-invisible.tc-remove-tag-button { .tc-story-river { left: max(0px,{{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}); - right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}),calc(100% - <> - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}})); + right: clamp(calc({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}),calc(100% - <> - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + <>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + <>)); top: {{$:/themes/tiddlywiki/vanilla/metrics/storytop}}; - width: clamp({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}},<>,calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}})); + width: clamp({{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}},calc(<> + <>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}} + <>)); padding: 42px {{$:/themes/tiddlywiki/vanilla/metrics/storypaddingright}} 42px {{$:/themes/tiddlywiki/vanilla/metrics/storypaddingleft}}; } .tc-sidebar-left .tc-story-river { - left: clamp({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}},calc(100% - <> - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}})); + left: clamp({{$:/themes/tiddlywiki/vanilla/metrics/sidebarminwidth}},calc(100% - <> - {{$:/themes/tiddlywiki/vanilla/metrics/storyleft}} + <>),calc(100% - {{$:/themes/tiddlywiki/vanilla/metrics/storyminwidth}} + <>)); right: max(0px,{{$:/themes/tiddlywiki/vanilla/metrics/storyleft}}); } @@ -1178,10 +1178,14 @@ button.tc-btn-invisible.tc-remove-tag-button { @media (min-width: <>) { .tc-tiddler-frame { padding: 28px 42px 42px 42px; - width: clamp(0px,<>,100%); + width: clamp(0px,calc(<> + <>),100%); border-radius: 2px; } + .tc-sidebar-left .tc-tiddler-frame { + width: clamp(0px,calc(<> + <>),100%); + } + .tc-sidebar-left .tc-tiddler-frame { left: auto; right: 0; diff --git a/themes/tiddlywiki/vanilla/sidebar-resizer.tid b/themes/tiddlywiki/vanilla/sidebar-resizer.tid index 4c62864fd..c9446f430 100644 --- a/themes/tiddlywiki/vanilla/sidebar-resizer.tid +++ b/themes/tiddlywiki/vanilla/sidebar-resizer.tid @@ -108,12 +108,12 @@ code-body: yes <%if [match[yes]] %> .tc-sidebar-resizer.tc-main-sidebar-resizer { - left: clamp(calc(<> + <> - (2 * <> / 3)),clamp(calc(<> - (2 * <> / 3)),max(calc(<> + <> - (2 * <> / 3)),calc(<> - (2 * <> / 3))),max(calc(100% - <> - (2 * <> / 3) + (<> + <> - <>)),calc(100% - <> - (2 * <> / 3)))),calc(100% - <> - (2 * <> / 3))); + left: clamp(calc(<> + <> + <> - (2 * <> / 3)),clamp(calc(<> + <> - (2 * <> / 3)),max(calc(<> + <> + <> - (2 * <> / 3)),calc(<> + <> - (2 * <> / 3))),max(calc(100% - <> + <> - (2 * <> / 3) + (<> + <> - <>)),calc(100% - <> + <> - (2 * <> / 3)))),calc(100% - <> + <> - (2 * <> / 3))); } .tc-sidebar-left .tc-sidebar-resizer.tc-main-sidebar-resizer { left: auto; - right: clamp(calc(<> + <> - (2 * <> / 3)),clamp(calc(<> - (2 * <> / 3)),max(calc(<> + <> - (2 * <> / 3)),calc(<> - (2 * <> / 3))),max(calc(100% - <> - (2 * <> / 3) + (<> + <> - <>)),calc(100% - <> - (2 * <> / 3)))),calc(100% - <> - (2 * <> / 3))); + right: clamp(calc(<> + <> + <> - (2 * <> / 3)),clamp(calc(<> + <> - (2 * <> / 3)),max(calc(<> + <> + <> - (2 * <> / 3)),calc(<> + <> - (2 * <> / 3))),max(calc(100% - <> + <> - (2 * <> / 3) + (<> + <> - <>)),calc(100% - <> + <> - (2 * <> / 3)))),calc(100% - <> + <> - (2 * <> / 3))); } <% endif %> @@ -126,7 +126,7 @@ code-body: yes .tc-sidebar-left .tc-sidebar-resizer.tc-main-sidebar-resizer { left: auto; - right: clamp(calc(<> + <> + (<> / 3)),calc(100% - <> + (<> / 3)),calc(100% - <> + (<> / 3))); + right: clamp(calc(<> + <> + (<> / 3)),calc(100% - <> + (<> / 3)),calc(100% - <> + (<> / 3))); } <% endif %> @@ -139,7 +139,7 @@ code-body: yes .tc-sidebar-left .tc-sidebar-resizer.tc-main-sidebar-resizer { left: auto; - right: min(calc(50% + (<> / 2) - (2 * <> / 3)),calc(100% - <> - (2 * <> / 3))); + right: min(calc(50% + (<> / 2) - (2 * <> / 3)),calc(100% - <> - (2 * <> / 3))); } <% endif %>