From bb2973fc29508a0512c1dc17151606aff43b7bf4 Mon Sep 17 00:00:00 2001 From: Robin Munn Date: Sat, 30 Sep 2023 22:33:40 +0700 Subject: [PATCH] Make flexbox or grid layouts possible (#7690) Both flexbox and grid layouts need the container div to be the direct parent of the children it lays out. To enable that, we need a class that can select the direct parent of the list widget in PageTemplate.tid so that that class can have `display: flex` or `display: grid` applied to it. The `tc-page-container` div is not suitable, because it contains a `<$dropzone>` inside it, and the dropzone widget creates a div so tc-page-container is no longer the direct parent of the list. Instead, a tc-page-container-inner class is added to the dropzone widget in addition to its existing tc-dropzone class, so that grid or flexbox layouts can target tc-page-container-inner for setting the appropriate CSS `display` property. --- core/ui/PageTemplate.tid | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/core/ui/PageTemplate.tid b/core/ui/PageTemplate.tid index 38b4c915b..20891e35d 100644 --- a/core/ui/PageTemplate.tid +++ b/core/ui/PageTemplate.tid @@ -20,7 +20,7 @@ code-body: yes <$navigator story="$:/StoryList" history="$:/HistoryList" openLinkFromInsideRiver={{$:/config/Navigation/openLinkFromInsideRiver}} openLinkFromOutsideRiver={{$:/config/Navigation/openLinkFromOutsideRiver}} relinkOnRename={{$:/config/RelinkOnRename}}> -<$dropzone enable=<>> +<$dropzone enable=<> class="tc-dropzone tc-page-container-inner"> <$list filter="[all[shadows+tiddlers]tag[$:/tags/PageTemplate]!has[draft.of]]" variable="listItem">