mirror of
https://github.com/logseq/logseq.git
synced 2026-05-29 15:09:41 +00:00
fix: code block bottom space
This commit is contained in:
@@ -3954,10 +3954,10 @@
|
||||
[:div.ui-fenced-code-editor.flex.w-full
|
||||
{:ref (fn [el]
|
||||
(set-inside-portal? (and el (whiteboard-handler/inside-portal? el))))
|
||||
:on-mouse-over #(dom/add-class! (hooks/deref *actions-ref) "opacity-100")
|
||||
:on-mouse-over #(dom/add-class! (hooks/deref *actions-ref) "!opacity-100")
|
||||
:on-mouse-leave (fn [e]
|
||||
(when (dom/has-class? (.-target e) "code-editor")
|
||||
(dom/remove-class! (hooks/deref *actions-ref) "opacity-100")))}
|
||||
(dom/remove-class! (hooks/deref *actions-ref) "!opacity-100")))}
|
||||
(cond
|
||||
(nil? inside-portal?) nil
|
||||
|
||||
@@ -3969,7 +3969,7 @@
|
||||
|
||||
:else
|
||||
[:div.ls-code-editor-wrap
|
||||
[:div.code-block-actions.flex.flex-row.gap-1.opacity-0.transition-opacity.ease-in.duration-300
|
||||
[:div.code-block-actions
|
||||
{:ref *actions-ref}
|
||||
(shui/button
|
||||
{:variant :text
|
||||
|
||||
@@ -1036,7 +1036,7 @@ html.is-mac {
|
||||
}
|
||||
|
||||
> .code-block-actions {
|
||||
@apply absolute right-1 top-1 select-none z-[1] text-xs bg-gray-01;
|
||||
@apply flex flex-row gap-1 opacity-0 transition-opacity ease-in duration-300 absolute right-1 top-1 select-none z-[1] text-xs bg-gray-01;
|
||||
|
||||
button {
|
||||
@apply !py-0 h-4 text-muted-foreground hover:text-foreground text-xs px-1;
|
||||
|
||||
@@ -549,7 +549,7 @@
|
||||
(fn [e]
|
||||
(.stopPropagation e)))
|
||||
(.save editor)
|
||||
(.setSize editor "100%" 600)
|
||||
(.setSize editor "100%" 1024)
|
||||
(.refresh editor)))
|
||||
editor))
|
||||
|
||||
|
||||
@@ -45,11 +45,6 @@
|
||||
border-radius: 2px;
|
||||
line-height: 1.45em;
|
||||
|
||||
&-scroll {
|
||||
padding-top: 14px;
|
||||
padding-bottom: 62px;
|
||||
}
|
||||
|
||||
&:not(.CodeMirror-focused) {
|
||||
.CodeMirror-activeline-background {
|
||||
background: unset !important;
|
||||
|
||||
Reference in New Issue
Block a user