Simplify heading/outline CSS generation

This commit is contained in:
Ellis Kenyo 2024-04-21 16:18:29 +08:00 committed by TEC
parent 0d7fdfcdab
commit 9010e61dc7
Signed by: tec
SSH Key Fingerprint: SHA256:eobz41Mnm0/iYWBvWThftS0ElEs1ftBr6jamutnXc/A
1 changed files with 5 additions and 7 deletions

View File

@ -213,13 +213,11 @@ and the current theme otherwise."
(ox-chameleon--face-attr 'default :family))))
(defun ox-chameleon--generate-html-heading-style ()
(concat
(ox-chameleon--face-to-css 'outline-1 "h1")
(string-join
(cl-loop for i from 2 to 5
collect (ox-chameleon--face-to-css
(intern (format "outline-%s" (- i 1)))
(format "h%s" (- i 1)))))))
(string-join
(cl-loop for i from 1 to 5
collect (ox-chameleon--face-to-css
(intern (format "outline-%s" i))
(format "h%s" i)))))
(defun ox-chameleon--generate-html-rainbow-parens ()
(when (require 'rainbow-delimiters nil t)