The org-mime page describes how to use org-mime-html-hook
to style HTML email by inserting inline CSS. I used this method to successfully change the styling of my body paragraphs by targeting <p>
tags:
(add-hook 'org-mime-html-hook
(lambda ()
(org-mime-change-element-style
"p" "font-family: Georgia,serif;")))
But when I tried the same method to target ordered lists, unordered lists, and DONE headings, it had no effect:
(add-hook 'org-mime-html-hook
(lambda ()
(org-mime-change-element-style
"ul.org-ul li"
"font-family: Georgia,serif;")))
(add-hook 'org-mime-html-hook
(lambda ()
(org-mime-change-element-style
"ol.org-ol li"
"font-family: Georgia,serif;")))
(add-hook 'org-mime-html-hook
(lambda ()
(org-mime-change-element-style
".done"
"color:#00bb00")))
The CSS styles were not reflected in the org-mime
HTMLized buffer at all.
Eventually I was able to address the ordered and unordered lists by targeting the <li>
tag directly...
(add-hook 'org-mime-html-hook
(lambda ()
(org-mime-change-element-style
"li"
"font-family: Georgia,serif;")))
...but doing so also stripped the formatting from my <p>
tags!
What's going on here! And how can I style these other elements using org-mime
?