aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorArun Isaac2023-08-28 14:16:25 +0100
committerArun Isaac2023-08-29 17:08:46 +0100
commite855bf0dde648a5361618eee6a0d02b236be60b2 (patch)
tree2b2509bf0c9455c2481bbda8a18df640d29f84b4 /src
parent69e107a3740e6b23de155404e67a9503309523d4 (diff)
downloadskribilo-e855bf0dde648a5361618eee6a0d02b236be60b2.tar.gz
skribilo-e855bf0dde648a5361618eee6a0d02b236be60b2.tar.lz
skribilo-e855bf0dde648a5361618eee6a0d02b236be60b2.zip
html: Implement frame without HTML tables.
* src/guile/skribilo/engine/html.scm (frame): Implement without HTML tables, using only CSS.
Diffstat (limited to 'src')
-rw-r--r--src/guile/skribilo/engine/html.scm28
1 files changed, 16 insertions, 12 deletions
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 "</td></tr>\n</tbody></table>")
+ (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 "</div>\n")
;*---------------------------------------------------------------------*/
;* font ... */