From e4b4752da4ed3cd96d803c8f2628e0f6a747a2a8 Mon Sep 17 00:00:00 2001 From: Ray McDermott Date: Mon, 5 Aug 2019 22:46:30 +0200 Subject: [PATCH] :art: more consistent eval box (#54) --- src/replete/editor.cljs | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/src/replete/editor.cljs b/src/replete/editor.cljs index ec3a3ff..512944a 100644 --- a/src/replete/editor.cljs +++ b/src/replete/editor.cljs @@ -64,16 +64,21 @@ (def ^:private main-style {:position "absolute" - :padding "5px" + :padding "0px" + :left "0px" + :right "0px" :top "0px" :bottom "0px" :width "100%"}) -(def ^:private box-style +(def ^:private editor-style (merge (flex-child-style "1") {:border "1px solid lightgrey" :border-radius "4px"})) +(def ^:private eval-style + (flex-child-style "1")) + (defn- key-binding [key-map [button event]] (assoc {} (get key-map button) #(re-frame/dispatch [event]))) @@ -99,7 +104,7 @@ eval-cm-opts {:theme "replete-eval-light"} eval-box-opts {:opts eval-opts :cm-opts eval-cm-opts - :style box-style} + :style eval-style} extra-keys (extra-key-bindings @key-bindings event-bindings) edit-cm-opts {:theme "replete-edit-light" @@ -107,7 +112,7 @@ edit-box-opts {:opts {:node-id "replete-input"} :cm-opts edit-cm-opts :key-bindings @key-bindings - :style box-style}] + :style editor-style}] [box :style main-style :child