Commit6f26824fRecorded6 Jan 2026Repositorysigil-css

Fix theme->css-vars: can't apply a macro

Message

The theme->css-vars function was using (apply css-vars ...) but css-vars is a macro, not a procedure. Macros can only be called directly, not through apply. Fixed by building the vars structure directly using %make-vars.

Changed
 src/sigil/css.sgl | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
Diff
src/sigil/css.sglmodified
@@ -477,10 +477,11 @@
477
;;; ; Creates :root { --bg: #0a0a0a; --fg: #e0e0e0; ... }
478
;;; ```
479
(define (theme->css-vars theme)
480
(apply css-vars
+480
;; Build vars structure directly (can't apply a macro)
+481
(%make-vars
482
(map (lambda (pair)
482
(list (string->symbol (string-append "--" (symbol->string (car pair))))
483
(cdr pair)))
+483
(cons (string-append "--" (symbol->string (car pair)))
+484
(%value->string (cdr pair))))
485
theme)))
486
487