Marging and Padding for a selected side

This commit is contained in:
David Botton 2021-11-16 20:08:21 -05:00
parent 9eef46f8d6
commit 5874b88dec
5 changed files with 32 additions and 7 deletions

View file

@ -1953,6 +1953,18 @@ line-width - size or medium|thin|thick|length|initial|inherit"))
(defmethod set-margin ((obj clog-element) top right bottom left)
(setf (style obj "margin") (format nil "~A ~A ~A ~A" top right bottom left)))
;;;;;;;;;;;;;;;;;;;;;
;; set-margin-side ;;
;;;;;;;;;;;;;;;;;;;;;
(defgeneric set-margin-side (clog-element side value)
(:documentation "Set margin SIDE (:top :right :bottom or :left),
VALUE can be - <length>|auto|initial|inherit"))
(defmethod set-margin-side ((obj clog-element) side value)
(setf (style obj (format nil "margin-~A" (string-downcase side))) value))
;;;;;;;;;;;;;
;; padding ;;
;;;;;;;;;;;;;
@ -1971,6 +1983,17 @@ line-width - size or medium|thin|thick|length|initial|inherit"))
top right bottom left)))
(defsetf padding set-padding)
;;;;;;;;;;;;;;;;;;;;;;
;; set-padding-side ;;
;;;;;;;;;;;;;;;;;;;;;;
(defgeneric set-padding-side (clog-element side value)
(:documentation "Set padding SIDE (:top :right :bottom or :left),
VALUE can be - <length>|auto|initial|inherit"))
(defmethod set-padding-side ((obj clog-element) side value)
(setf (style obj (format nil "padding-~A" (string-downcase side))) value))
;;;;;;;;;;;;
;; cursor ;;
;;;;;;;;;;;;