From e855bf0dde648a5361618eee6a0d02b236be60b2 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Mon, 28 Aug 2023 14:16:25 +0100 Subject: html: Implement frame without HTML tables. * src/guile/skribilo/engine/html.scm (frame): Implement without HTML tables, using only CSS. --- src/guile/skribilo/engine/html.scm | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) (limited to 'src') diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm index a04fb52..549bcfd 100644 --- a/src/guile/skribilo/engine/html.scm +++ b/src/guile/skribilo/engine/html.scm @@ -1633,19 +1633,23 @@ ignored, return #f." (markup-writer 'frame :options '(:width :margin :border) :before (lambda (node engine) - (let ((m (markup-option node :margin)) - (b (markup-option node :border)) - (w (markup-option node :width))) - (html-open 'table + (let ((margin (markup-option node :margin)) + (border (markup-option node :border)) + (width (markup-option node :width))) + (html-open 'div `((class . ,(markup-class node)) - (cellspacing . "0") - (cellpadding . ,(or m 0)) - (border . ,(or b 0)) - (width . ,(and w (html-width w))))) - (html-open 'tbody) - (html-open 'tr) - (html-open 'td))) - :after "\n") + (style . ,(style-declaration + `((border-style . "solid") + (border-width . ,(and border + (string-append (number->string border) + "px"))) + (padding . ,(and margin + (string-append (number->string margin) + "px"))) + (width . ,(and width + (string-append (html-width width) + "px")))))))))) + :after "\n") ;*---------------------------------------------------------------------*/ ;* font ... */ -- cgit v1.2.3