Implement CSS functions
Some basic boilerplate has been added to do this. Because there are hundreds of CSS flags, and many more if you count the stupid webkit ones, there is no practical way to implement every single CSS parameter in weblisp. However, a lazily-evaluated function that takes an arbitrary list of expressions may do the trick. For example,
(def-style "h4"
(margin-top (px 10))
(color "red")
(padding-left 0.5))
in this example, def-style
is designated as a built-in lazy function, and margin-top
, color
, and padding-left
are undefined. Since def-style is lazy, none of the undefined functions will be evaluated, and def-style can work with them directly to generate the desired CSS string.