So I took a stab at writing a function, following, that would handle all the possible formats, but discovered the variances too ugly in coding without being able to
handle the "inside optional arguments" for a function:
(def genstyle-old (overflow position top right bottom left width width-uom height height-uom border-width border-color)
(or= overflow 'auto)
(or= position 'absolute)
(or= top 0)
(or= right 0)
(or= bottom 0)
(or= left 0)
(or= width 100)
(or= width-uom "%")
(or= height 100)
(or= height-uom "%")
(or= border-width 1)
(= border-line-style 'solid)
(or= border-color "#ff9000")
(string "overflow: " overflow ";" " position: " position ";"
" top: " top "px;" " right: " right "px;" " bottom: " bottom "px;" " left: " left "px;"
" width: " width width-uom ";" " height: " height height-uom ";"
" border: " border-width "px" " solid " border-color ";")
)
Anyway that turned out too ugly and Kenny's dsb function was too complicated for me to figure out, so I went back and looked into how pg was doing these type of things... and came up with the following:
* note the significance for me is that I can pull the style arguments from a table and then autogenerate the list to be passed into the genfn function based upon which attributes exist in the table; then all I would need to do is pass in the table name. The end result will be 1 function that generates all of my divs, table driven.
I figured there might be some people out there (like myself) trying to do the same thing. I don't know how to put things on "git", nor do I want to throw my "hacks"
into a repository that's probably intended for better code. :)