aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArun Isaac2023-08-28 14:26:24 +0100
committerArun Isaac2023-08-29 17:08:46 +0100
commit05fe77afa44799bb5b5a21946bdcf2ea2ba1091d (patch)
treec04851002d49fe5a6c28184f5440d5f4a8d62d25
parent71ecb3860c1a18df7bd46f8827cec55b9a53bae8 (diff)
downloadskribilo-05fe77afa44799bb5b5a21946bdcf2ea2ba1091d.tar.gz
skribilo-05fe77afa44799bb5b5a21946bdcf2ea2ba1091d.tar.lz
skribilo-05fe77afa44799bb5b5a21946bdcf2ea2ba1091d.zip
html: Implement center using CSS.
The <center> tag is deprecated in HTML5. * src/guile/skribilo/engine/html.scm (center): Implement using CSS only.
-rw-r--r--src/guile/skribilo/engine/html.scm7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/guile/skribilo/engine/html.scm b/src/guile/skribilo/engine/html.scm
index bb2f1d0..2c70ef8 100644
--- a/src/guile/skribilo/engine/html.scm
+++ b/src/guile/skribilo/engine/html.scm
@@ -1721,8 +1721,11 @@ ignored, return #f."
;* center ... */
;*---------------------------------------------------------------------*/
(markup-writer 'center
- :before (html-markup-class "center")
- :after "</center>\n")
+ :before (lambda (node engine)
+ (html-open 'span
+ `((class . ,(markup-class node))
+ (style . "text-align: center"))))
+ :after "</span>\n")
;*---------------------------------------------------------------------*/
;* pre ... */