Skip to content

Commit

Permalink
Update pulse table style to match app (#10989)
Browse files Browse the repository at this point in the history
  • Loading branch information
paulrosenzweig committed Oct 15, 2019
1 parent cc1ddc0 commit e40dc8b
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 9 deletions.
14 changes: 13 additions & 1 deletion src/metabase/pulse/render/style.clj
Original file line number Diff line number Diff line change
Expand Up @@ -47,10 +47,22 @@
"~25% gray."
"#394340")

(def ^:const color-row-border
(def ^:const color-text-medium
"Color for medium text."
"#74838f")

(def ^:const color-text-dark
"Color for dark text."
"#2E353B")

(def ^:const color-header-row-border
"Used as color for the bottom border of table headers for charts with `:table` vizualization."
"#EDF0F1")

(def ^:const color-body-row-border
"Used as color for the bottom border of table body rows for charts with `:table` vizualization."
"#F0F0F04D")

;; don't try to improve the code and make this a plain variable, in EE it's customizable which is why it's a function.
;; Too much of a hassle to have it be a fn in one version of the code an a constant in another
(defn primary-color
Expand Down
18 changes: 10 additions & 8 deletions src/metabase/pulse/render/table.clj
Original file line number Diff line number Diff line change
Expand Up @@ -15,23 +15,25 @@
(defn- bar-th-style []
(merge
(style/font-style)
{:font-size :14.22px
{:font-size :12.5px
:font-weight 700
:color style/color-gray-4
:border-bottom (str "1px solid " style/color-row-border)
:color style/color-text-medium
:border-bottom (str "1px solid " style/color-header-row-border)
:padding-top :20px
:padding-bottom :5px}))

(defn- bar-td-style []
(merge
(style/font-style)
{:font-size :14.22px
:font-weight 400
{:font-size :12.5px
:font-weight 700
:text-align :left
:color style/color-text-dark
:border-bottom (str "1px solid " style/color-body-row-border)
:height :36px
:width :106px
:padding-right :0.5em
:padding-left :0.5em
:padding-top :4px
:padding-bottom :4px}))
:padding-left :0.5em}))

(defn- bar-th-style-numeric []
(merge (style/font-style) (bar-th-style) {:text-align :right}))
Expand Down

0 comments on commit e40dc8b

Please sign in to comment.