diff --git a/src/main/frontend/components/block.cljs b/src/main/frontend/components/block.cljs index c6ca7203a..db33e04f3 100644 --- a/src/main/frontend/components/block.cljs +++ b/src/main/frontend/components/block.cljs @@ -1677,23 +1677,22 @@ (when (and (coll? children) (seq children) (not collapsed?)) - (let [doc-mode? (state/sub :document/mode?)] - [:div.block-children-container.flex {:style {:margin-left (if doc-mode? 18 29)}} - [:div.block-children-left-border - {:on-click (fn [_] - (editor-handler/toggle-open-block-children! (:block/uuid block)))}] - [:div.block-children.w-full {:style {:display (if collapsed? "none" "")}} - (for [child children] - (when (map? child) - (let [child (dissoc child :block/meta) - config (cond-> - (-> config - (assoc :block/uuid (:block/uuid child)) - (dissoc :breadcrumb-show? :embed-parent)) - (or ref? query?) - (assoc :ref-query-child? true))] - (rum/with-key (block-container config child) - (:block/uuid child)))))]])))) + [:div.block-children-container.flex + [:div.block-children-left-border + {:on-click (fn [_] + (editor-handler/toggle-open-block-children! (:block/uuid block)))}] + [:div.block-children.w-full {:style {:display (if collapsed? "none" "")}} + (for [child children] + (when (map? child) + (let [child (dissoc child :block/meta) + config (cond-> + (-> config + (assoc :block/uuid (:block/uuid child)) + (dissoc :breadcrumb-show? :embed-parent)) + (or ref? query?) + (assoc :ref-query-child? true))] + (rum/with-key (block-container config child) + (:block/uuid child)))))]]))) (defn- block-content-empty? [{:block/keys [properties title body]}] diff --git a/src/main/frontend/components/block.css b/src/main/frontend/components/block.css index f811620a4..d7a5ae3a6 100644 --- a/src/main/frontend/components/block.css +++ b/src/main/frontend/components/block.css @@ -137,6 +137,7 @@ .block-children-container { position: relative; + margin-left: 29px; } .block-children-left-border { @@ -323,8 +324,6 @@ } .ls-block { - @apply border border-dashed border-green-600; - position: relative; min-height: 24px; padding: 2px 0; @@ -517,7 +516,7 @@ a:hover > .bullet-container { background-color: var(--ls-block-bullet-border-color, #ced9e0); } -.doc-mode { +.content.doc-mode { margin-left: -16px; .block-children-left-border { @@ -527,6 +526,10 @@ a:hover > .bullet-container { .hide-inner-bullet .bullet { display: none; } + + .block-children-container { + margin-left: 18px; + } } /* copied from https://github.com/drdogbot7/tailwindcss-responsive-embed */ diff --git a/src/main/frontend/components/theme.css b/src/main/frontend/components/theme.css index 640b8caae..3de3fee7b 100644 --- a/src/main/frontend/components/theme.css +++ b/src/main/frontend/components/theme.css @@ -151,4 +151,12 @@ main.ls-fold-button-on-right { width: 100%; } } + + .block-children-container { + margin-left: 7px; + + .block-children { + padding-left: 10px; + } + } } \ No newline at end of file