0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-16 08:51:32 -05:00

🐛 Allows remove fill in text shapes

This commit is contained in:
alonso.torres 2020-12-07 16:17:44 +01:00 committed by Hirunatan
parent 2f1b72e105
commit 621545cc74
3 changed files with 10 additions and 2 deletions

View file

@ -83,7 +83,13 @@
fill-color-ref-id (obj/get data "fill-color-ref-id")
fill-color-ref-file (obj/get data "fill-color-ref-file")
;; Uncomment this to allow to remove text colors. This could break the texts that already exist
;;[r g b a] (if (nil? fill-color)
;; [0 0 0 0] ;; Transparent color
;; (uc/hex->rgba fill-color fill-opacity))
[r g b a] (uc/hex->rgba fill-color fill-opacity)
text-color (if fill-color-gradient
(uc/gradient->css (js->clj fill-color-gradient))
(str/format "rgba(%s, %s, %s, %s)" r g b a))

View file

@ -37,7 +37,9 @@
[{:type "root"
:children [{:type "paragraph-set"
:children [{:type "paragraph"
:children [{:text (or text "")}]}]}]}]))
:children [{:fill-color "#000000"
:fill-opacity 1
:text (or text "")}]}]}]}]))
(defn- parse-content
[content]
(cond

View file

@ -16,7 +16,7 @@
:text-transform "none"
:text-align "left"
:text-decoration "none"
:fill-color "#000000"
:fill-color nil
:fill-opacity 1})
(def typography-fields