emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Greg Minshall <minshall@umich.edu>
To: emacs-orgmode@gnu.org
Subject: Re: exporting css into a .html file
Date: Mon, 29 Mar 2021 20:39:46 +0300	[thread overview]
Message-ID: <245302.1617039586@apollo2.minshall.org> (raw)
In-Reply-To: Your message of "Sat, 27 Mar 2021 15:57:07 +0300." <35753.1616849827@apollo2.minshall.org>

[-- 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


      reply	other threads:[~2021-03-29 17:40 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-27 12:57 exporting css into a .html file Greg Minshall
2021-03-29 17:39 ` Greg Minshall [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.orgmode.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=245302.1617039586@apollo2.minshall.org \
    --to=minshall@umich.edu \
    --cc=emacs-orgmode@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).