mirror of
https://github.com/rabbibotton/clog.git
synced 2025-12-06 02:30:42 -08:00
Marging and Padding for a selected side
This commit is contained in:
parent
9eef46f8d6
commit
5874b88dec
5 changed files with 32 additions and 7 deletions
|
|
@ -1953,6 +1953,18 @@ line-width - size or medium|thin|thick|length|initial|inherit"))
|
||||||
(defmethod set-margin ((obj clog-element) top right bottom left)
|
(defmethod set-margin ((obj clog-element) top right bottom left)
|
||||||
(setf (style obj "margin") (format nil "~A ~A ~A ~A" 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 ;;
|
;; padding ;;
|
||||||
;;;;;;;;;;;;;
|
;;;;;;;;;;;;;
|
||||||
|
|
@ -1971,6 +1983,17 @@ line-width - size or medium|thin|thick|length|initial|inherit"))
|
||||||
top right bottom left)))
|
top right bottom left)))
|
||||||
(defsetf padding set-padding)
|
(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 ;;
|
;; cursor ;;
|
||||||
;;;;;;;;;;;;
|
;;;;;;;;;;;;
|
||||||
|
|
|
||||||
|
|
@ -616,10 +616,10 @@ to nil on creation."))
|
||||||
(:documentation "Main for web content"))
|
(:documentation "Main for web content"))
|
||||||
|
|
||||||
(defgeneric create-web-main (clog-obj &key content hidden class html-id)
|
(defgeneric create-web-main (clog-obj &key content hidden class html-id)
|
||||||
(:documentation "Create a clog-web-main. Container for main content when
|
(:documentation "Create a clog-web-main. Container for main content
|
||||||
using a collapsable sidebar or other whole page shifting technique.
|
when using a collapsable sidebar or other whole page shifting
|
||||||
If hidden is t then then the visiblep propetery will be set to nil on
|
technique. If hidden is t then then the visiblep propetery will be set
|
||||||
creation."))
|
to nil on creation."))
|
||||||
|
|
||||||
(defmethod create-web-main ((obj clog-obj) &key (content "")
|
(defmethod create-web-main ((obj clog-obj) &key (content "")
|
||||||
(hidden nil)
|
(hidden nil)
|
||||||
|
|
@ -644,7 +644,7 @@ creation."))
|
||||||
sidebars are create with the display property set to :none if hidden it t
|
sidebars are create with the display property set to :none if hidden it t
|
||||||
and :block if nil. In general the visiblep property is used in clog, however
|
and :block if nil. In general the visiblep property is used in clog, however
|
||||||
in clog-web-sidebar the block property is needed to activate its animations
|
in clog-web-sidebar the block property is needed to activate its animations
|
||||||
if used. If using a sidebar that will take space on not collapse, make sure
|
if used. If using a sidebar that will take space and not collapse, make sure
|
||||||
to set the sidebar's size and set a margin equal to the size on the main
|
to set the sidebar's size and set a margin equal to the size on the main
|
||||||
container."))
|
container."))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -302,8 +302,10 @@ embedded in a native template application.)"
|
||||||
(set-outline generic-function)
|
(set-outline generic-function)
|
||||||
(margin generic-function)
|
(margin generic-function)
|
||||||
(set-margin generic-function)
|
(set-margin generic-function)
|
||||||
|
(set-margin-side generic-function)
|
||||||
(padding generic-function)
|
(padding generic-function)
|
||||||
(set-padding generic-function)
|
(set-padding generic-function)
|
||||||
|
(set-padding-side generic-function)
|
||||||
(cursor generic-function)
|
(cursor generic-function)
|
||||||
(font-style-type type)
|
(font-style-type type)
|
||||||
(font-variant-type type)
|
(font-variant-type type)
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<meta http-equiv="Pragma" content="no-cache" />
|
<meta http-equiv="Pragma" content="no-cache" />
|
||||||
<meta http-equiv="Expires" content="0" />
|
<meta http-equiv="Expires" content="0" />
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta namei="viewport" content="width=device-width, initial-scale=1">
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||||
|
|
||||||
<!-- The CLOG boot file are jQuery are loaded at bottom of this HTML File. -->
|
<!-- The CLOG boot file are jQuery are loaded at bottom of this HTML File. -->
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -56,6 +56,6 @@ Tutorial Summary
|
||||||
- 21-tutorial.lisp - New CLOG plugin in Common-Lisp
|
- 21-tutorial.lisp - New CLOG plugin in Common-Lisp
|
||||||
- 22-tutorial.lisp - CLOG GUI Menus and Desktop Look and Feel
|
- 22-tutorial.lisp - CLOG GUI Menus and Desktop Look and Feel
|
||||||
- 23-tutorial.lisp - Using semaphores to wait for input
|
- 23-tutorial.lisp - Using semaphores to wait for input
|
||||||
- 24-tutorial.lisp - CLOG WEB containers (in progress)
|
- 24-tutorial.lisp - CLOG WEB containers
|
||||||
- 25-tutorial.lisp - A "local" web app using CLOG WEB
|
- 25-tutorial.lisp - A "local" web app using CLOG WEB
|
||||||
- 26-tutorial.lisp - A web page and form with CLOG WEB
|
- 26-tutorial.lisp - A web page and form with CLOG WEB
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue