diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/guile/skribilo/engine/html.scm | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm index 991050b..a04fb52 100644 --- a/src/guile/skribilo/engine/html.scm +++ b/src/guile/skribilo/engine/html.scm @@ -609,6 +609,24 @@ unspecified or #f values are ignored." (newline)) ;*---------------------------------------------------------------------*/ +;* style-declaration ... */ +;*---------------------------------------------------------------------*/ +(define (style-declaration properties) + "Return a style declaration with PROPERTIES, an association list +mapping property names to their values. Property names may be symbols +or strings. Values may be strings or numbers. Properties with #f +values are ignored. If PROPERTIES is empty or all of its elements were +ignored, return #f." + (match (filter-map (match-lambda + ((name . value) + (and value + (format #f "~a: ~a;" name value)))) + properties) + (() #f) + (serialized-properties + (string-join serialized-properties)))) + +;*---------------------------------------------------------------------*/ ;* html-markup-class ... */ ;*---------------------------------------------------------------------*/ (define (html-markup-class m) |