Browse Source

fix: code block width shouldn't exceeds block container

Tienson Qin 6 months ago
parent
commit
7280428178
2 changed files with 3 additions and 3 deletions
  1. 2 2
      src/main/frontend/components/page.cljs
  2. 1 1
      src/main/frontend/components/page.css

+ 2 - 2
src/main/frontend/components/page.cljs

@@ -97,8 +97,7 @@
   [page-e blocks config sidebar? whiteboard? _block-uuid]
   (when page-e
     (let [hiccup (component-block/->hiccup blocks config {})]
-      [:div.page-blocks-inner {:style {:margin-left (if whiteboard? 0 -20)
-                                       :min-height 29}}
+      [:div.page-blocks-inner {:style {:min-height 29}}
        (rum/with-key
          (content/content (str (:block/uuid page-e))
                           {:hiccup   hiccup
@@ -702,6 +701,7 @@
 
               (when (or (not show-tabs?) tabs-rendered?)
                 [:div.ls-page-blocks
+                 {:style {:margin-left (if whiteboard? 0 -20)}}
                  (page-blocks-cp page (merge option {:sidebar? sidebar?
                                                      :container-id (:container-id state)
                                                      :whiteboard? whiteboard?}))])])

+ 1 - 1
src/main/frontend/components/page.css

@@ -262,5 +262,5 @@ html.is-native-ios {
 }
 
 .ls-page-blocks {
-  @apply min-h-[60px];
+  @apply min-h-[60px] overflow-hidden;
 }