emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* exporting css into a .html file
@ 2021-03-27 12:57 Greg Minshall
  2021-03-29 17:39 ` Greg Minshall
  0 siblings, 1 reply; 2+ messages in thread
From: Greg Minshall @ 2021-03-27 12:57 UTC (permalink / raw)
  To: emacs-orgmode

hi.  i'm wondering what the reference to "style blocks" means in the
"CSS Support" section of the manual:
----
For longer style definitions, either use several ‘HTML_HEAD’ and
‘HTML_HEAD_EXTRA’ keywords, or use ‘<style> ... </style>’ blocks around
them.  Both of these approaches can avoid referring to an external file.
----

can anyone provide enlightenment?  thanks!


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: exporting css into a .html file
  2021-03-27 12:57 exporting css into a .html file Greg Minshall
@ 2021-03-29 17:39 ` Greg Minshall
  0 siblings, 0 replies; 2+ messages in thread
From: Greg Minshall @ 2021-03-29 17:39 UTC (permalink / raw)
  To: emacs-orgmode

[-- Attachment #1: Type: text/plain, Size: 719 bytes --]

to answer my own question:

> hi.  i'm wondering what the reference to "style blocks" means in the
> "CSS Support" section of the manual:
> ----
> For longer style definitions, either use several ‘HTML_HEAD’ and
> ‘HTML_HEAD_EXTRA’ keywords, or use ‘<style> ... </style>’ blocks around
> them.  Both of these approaches can avoid referring to an external file.
> ----
> 
> can anyone provide enlightenment?  thanks!

i can't say what the original author meant.  but, one can do this to get
CSS into a file:
----
#+begin_export html
<style> p { margin: 10px; }</style>
#+end_export
----

below is a small patch with clarification in the manual, if deemed
appropriate.

cheers, Greg


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Clarify-use-of-style-.-style-for-CSS-in-HTML-export.patch --]
[-- Type: text/x-diff, Size: 1026 bytes --]

From 46306f25fa1171fad94b7e70690c40f7db35a018 Mon Sep 17 00:00:00 2001
From: Greg Minshall <minshall@umich.edu>
Date: Mon, 29 Mar 2021 20:20:05 +0300
Subject: [PATCH] Clarify use of <style>...</style> for CSS in HTML export

---
 doc/org-manual.org | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index efe956877..10eefc978 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -13138,9 +13138,9 @@ line in the Org file.
 : #+OPTIONS: html-style:nil
 
 For longer style definitions, either use several =HTML_HEAD= and
-=HTML_HEAD_EXTRA= keywords, or use ~<style> ... </style>~ blocks
-around them.  Both of these approaches can avoid referring to an
-external file.
+=HTML_HEAD_EXTRA= keywords, or embed them between ~<style>
+... </style>~ in a =#+BEGIN_EXPORT html= block.  Both of these
+approaches can avoid referring to an external file.
 
 #+cindex: @samp{HTML_CONTAINER_CLASS}, property
 #+cindex: @samp{HTML_HEADLINE_CLASS}, property
-- 
2.31.0


^ permalink raw reply related	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2021-03-29 17:40 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-03-27 12:57 exporting css into a .html file Greg Minshall
2021-03-29 17:39 ` Greg Minshall

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).