diff --git a/CHANGES.md b/CHANGES.md index 9809aa9b94..4c2bdcfbeb 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -55,6 +55,7 @@ on-premises instances** that want to keep up to date. - Fix comment icon fill [Taiga #11388](https://tree.taiga.io/project/penpot/issue/11388) - Fix gap on radio-buttons component [Taiga #11360](https://tree.taiga.io/project/penpot/issue/11360) - Fix button width [Taiga #11394](https://tree.taiga.io/project/penpot/issue/11394) +- Fix mixed letter spacing and line height [Taiga #11178](https://tree.taiga.io/project/penpot/issue/11178) ## 2.7.2 diff --git a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs index 083a7a6f26..f462aa9092 100644 --- a/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs +++ b/frontend/src/app/main/ui/workspace/sidebar/options/menus/typography.cljs @@ -360,11 +360,8 @@ [{:keys [values on-change on-blur]}] (let [{:keys [line-height letter-spacing]} values - line-height (or line-height "1.2") letter-spacing (or letter-spacing "0") - line-height-nillable (if (= (str line-height) "1.2") false true) - handle-change (fn [value attr] (on-change {attr (str value)}))] @@ -379,11 +376,11 @@ {:min -200 :max 200 :step 0.1 - :default "1.2" + :default-value "1.2" :class (stl/css :line-height-input) :value (attr->string line-height) - :placeholder (tr "settings.multiple") - :nillable line-height-nillable + :placeholder (if (= :multiple line-height) (tr "settings.multiple") "--") + :nillable (= :multiple line-height) :on-change #(handle-change % :line-height) :on-blur on-blur}]] @@ -397,10 +394,12 @@ {:min -200 :max 200 :step 0.1 + :default-value "0" :class (stl/css :letter-spacing-input) :value (attr->string letter-spacing) - :placeholder (tr "settings.multiple") + :placeholder (if (= :multiple letter-spacing) (tr "settings.multiple") "--") :on-change #(handle-change % :letter-spacing) + :nillable (= :multiple letter-spacing) :on-blur on-blur}]]])) (mf/defc text-transform-options