 (defn remove-all-styles! [elem]
   ;; remove-attr! doesn't always work
   (d/set-attr! elem :style "")
+  (d/remove-class! elem "condensed")
+  (d/remove-class! elem "arranged")
   (doseq [child (d/children elem)]
     (remove-all-styles! child)))
 

  (arrange-element! initial-arrange-state elem container))

(defn condense-collection! [elem container]
  (let [[opener contents closer] (d/children elem)
        w (- (max-inline-width elem container)
             (* 2 (+ (width opener) (width closer))))]

(def next-state rest)

(defn arrange-keyval! [state elem container]
  (d/add-class! elem "arranged")
  (let [[key separator val] (d/children elem)]
    (arrange-element! state key container)
    (arrange-element! state val container)
