use those new css variables in our cljs files

This commit is contained in:
eva 2021-11-25 17:23:25 +01:00 committed by Alonso Torres
parent 039b03249b
commit 14b23b491f
22 changed files with 59 additions and 56 deletions

View file

@ -11,7 +11,7 @@
(defn generate*
[{:keys [name color size]
:or {color "#000000" size 128}}]
:or {color "var(--color-black)" size 128}}]
(let [parts (str/words (str/upper name))
letters (if (= 1 (count parts))
(ffirst parts)
@ -27,7 +27,7 @@
(obj/set! context "font" (str (/ size 2) "px Arial"))
(obj/set! context "textAlign" "center")
(obj/set! context "fillStyle" "#FFFFFF")
(obj/set! context "fillStyle" "var(--color-white)")
(.fillText context letters (/ size 2) (/ size 1.5))
(.toDataURL canvas)))