From 0339579c1c132e197b553279c2c0f3d0a5873386 Mon Sep 17 00:00:00 2001 From: "chris (daiyi)" Date: Thu, 31 Aug 2017 16:55:18 +0200 Subject: [PATCH] Equalise table padding --- resources/day8/re_frame/trace/main.css | 3 ++- resources/day8/re_frame/trace/main.less | 3 ++- src/day8/re_frame/trace.cljs | 6 ++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/resources/day8/re_frame/trace/main.css b/resources/day8/re_frame/trace/main.css index 8dc7316..96ae3d9 100644 --- a/resources/day8/re_frame/trace/main.css +++ b/resources/day8/re_frame/trace/main.css @@ -158,6 +158,7 @@ #--re-frame-trace-- th, #--re-frame-trace-- td { display: table-cell; + padding: 0 5px; } #--re-frame-trace-- tr { display: table-row; @@ -263,7 +264,7 @@ flex: 1; } #--re-frame-trace-- .panel-content-scrollable { - margin: 10px 0 0 10px; + margin: 0 10px; flex: 1 0 auto; height: 100%; overflow: auto; diff --git a/resources/day8/re_frame/trace/main.less b/resources/day8/re_frame/trace/main.less index ba56c29..7d1332b 100644 --- a/resources/day8/re_frame/trace/main.less +++ b/resources/day8/re_frame/trace/main.less @@ -189,6 +189,7 @@ } th, td { display: table-cell; + padding: 0 5px; } tr { display: table-row; @@ -310,7 +311,7 @@ flex: 1; } .panel-content-scrollable { - margin: 10px 0 0 10px; + margin: 0 10px; flex: 1 0 auto; height: 100%; overflow: auto; diff --git a/src/day8/re_frame/trace.cljs b/src/day8/re_frame/trace.cljs index 8b0000a..5550ca1 100644 --- a/src/day8/re_frame/trace.cljs +++ b/src/day8/re_frame/trace.cljs @@ -164,8 +164,7 @@ (defn render-traces [showing-traces filter-items filter-input trace-detail-expansions] (doall (for [{:keys [op-type id operation tags duration] :as trace} showing-traces] - (let [padding {:padding "0px 5px 0px 5px"} - row-style (merge padding {:border-top (case op-type :event "1px solid lightgrey" nil)}) + (let [row-style {:border-top (case op-type :event "1px solid lightgrey" nil)} show-row? (get-in @trace-detail-expansions [:overrides id] (:show-all? @trace-detail-expansions)) op-name (if (vector? operation) @@ -207,14 +206,13 @@ (.toFixed duration 1) " ms"]] (when show-row? [:tr {:key (str id "-details")} - [:td.trace-details {:col-span 3 + [:td.trace-details {:col-span 4 :on-click #(.log js/console tags)} (let [tag-str (with-out-str (pprint/pprint tags)) string-size-limit 400] (if (< string-size-limit (count tag-str)) (str (subs tag-str 0 string-size-limit) " ...") tag-str))]])))))) - (defn render-trace-panel [] (let [filter-input (r/atom "") filter-items (r/atom (localstorage/get "filter-items" []))