From cf465d93f9415224faf9a86d5608459fe7422118 Mon Sep 17 00:00:00 2001 From: "alonso.torres" Date: Thu, 11 Feb 2021 17:26:02 +0100 Subject: [PATCH] :bug: Fixes problem when shrinking text --- frontend/src/app/main/ui/shapes/text/styles.cljs | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/frontend/src/app/main/ui/shapes/text/styles.cljs b/frontend/src/app/main/ui/shapes/text/styles.cljs index 46839ae4f4..509647beb7 100644 --- a/frontend/src/app/main/ui/shapes/text/styles.cljs +++ b/frontend/src/app/main/ui/shapes/text/styles.cljs @@ -39,11 +39,16 @@ ;; the property it's known. ;; `inline-flex` is similar to flex but `overflows` outside the bounds of the ;; parent - (let [base #js {:display "inline-flex" + (let [shape (obj/get props "shape") + grow-type (:grow-type shape) + auto-width? (= grow-type :auto-width) + auto-height? (= grow-type :auto-height) + + base #js {:display "inline-flex" :flex-direction "column" :justify-content "inherit" - :min-height "100%" - :min-width "100%" + :min-height (when-not (or auto-width? auto-height?) "100%") + :min-width (when-not auto-width? "100%") :vertical-align "top"}] base)))