better handling of multile styles

This commit is contained in:
David Botton 2021-12-24 01:08:45 -05:00
parent 80af6cc5d2
commit a3b9f73fba

View file

@ -126,15 +126,14 @@ must be in DOM, ie placed or auto-placed."))
(:documentation "Set css styles using a list of list of name value pairs."))
(defmethod set-styles ((obj clog-element) style-list)
(jquery-execute obj (format nil "css({~{~A~}})"
(mapcar
(jquery-execute obj (format nil "css({~{~A~^,~}})"
(remove nil (mapcar
(lambda (n)
(if n
(format nil "'~A':'~A',"
(when n
(format nil "'~A':'~A'"
(first n)
(second n))
""))
style-list))))
(second n))))
style-list)))))
;;;;;;;;;;;;;;;
;; attribute ;;