mirror of
https://github.com/penpot/penpot.git
synced 2025-01-06 14:50:20 -05:00
Merge pull request #5384 from penpot/alotor-fix-editor
🐛 Fix problem with editor line-height
This commit is contained in:
commit
ede8ee6a78
1 changed files with 8 additions and 5 deletions
|
@ -73,11 +73,14 @@
|
|||
;; it affects to the height calculation the browser does
|
||||
font-size (if (some #(not= "" (:text %)) (:children paragraph))
|
||||
"0"
|
||||
(:font-size styles (:font-size txt/default-text-attrs)))]
|
||||
(cond-> styles
|
||||
;; Every paragraph must have line-height to be correctly rendered
|
||||
(nil? (:line-height styles)) (assoc :line-height (:line-height txt/default-text-attrs))
|
||||
true (assoc :font-size font-size))))
|
||||
(:font-size styles (:font-size txt/default-text-attrs)))
|
||||
|
||||
line-height (:line-height styles)
|
||||
line-height (if (and (some? line-height) (not= "" line-height))
|
||||
line-height
|
||||
(:line-height txt/default-text-attrs))]
|
||||
(-> styles
|
||||
(assoc :font-size font-size :line-height line-height))))
|
||||
|
||||
(defn get-root-styles
|
||||
[root]
|
||||
|
|
Loading…
Reference in a new issue