emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
From: Nick Dokos <nicholas.dokos@hp.com>
To: mail@christianmoe.com
Cc: =?UTF-8?B?U8OpYmFzdGllbiBWYXViYW4=?= <wxhgmqzgwmuf@spammotel.com>,
	nicholas.dokos@hp.com, emacs-orgmode@gnu.org
Subject: Re: How to distinguish timestamps in CSS?
Date: Sun, 14 Nov 2010 15:56:20 -0500	[thread overview]
Message-ID: <19521.1289768180@gamaville.dokosmarshall.org> (raw)
In-Reply-To: Message from Christian Moe <mail@christianmoe.com> of "Sun\, 14 Nov 2010 21\:40\:25 +0100." <4CE04939.2090802@christianmoe.com>

Christian Moe <mail@christianmoe.com> wrote:

> Hi,
> 
> Only partly.
> 
> On 11/14/10 12:24 AM, Sébastien Vauban wrote:
> > Hello,
> >
> > A quick (but not easy?) question about the Org publish to HTML and CSS: I
> > would like to make the 3 different timestamps stand out with different
> > backgrounds.
> >
> > Is it possible with CSS?  I have the impression that it currently is not,
> > but...
> >
> > This is some sample output in HTML:
> >
> > #+begin_src html
> > <p><span class="timestamp-wrapper">  <span class="timestamp">2010-11-13 Sat</span></span><br/>
> > <span class="timestamp-wrapper"><span class="timestamp-kwd">SCHEDULED:</span>  <span class="timestamp">2010-11-15 Mon</span></span><br/>
> > <span class="timestamp-wrapper"><span class="timestamp-kwd">DEADLINE:</span>  <span class="timestamp">2010-11-20 Sat</span></span><br/>
> > </p>
> > #+end_src
> >
> > Best regards,
> >    Seb
> >
> 
> You can distinguish between timestamps with and without a keyword. The
> following will set a red background on SCHEDULED and DEADLINE
> timestamps (sorry for the noise if this was clear to you already).
> 
> #+STYLE: <style>.timestamp-kwd + .timestamp {background-color:
> red}</style>
> 
> But you cannot distinguish between different keywords -- no CSS
> selector works on text content. You could use Javascript.
> 

Perhaps it'd be possible to (optionally) add an "id" selector to the timestamp
<span> elements and use that for CSS manipulation, tied to an org-mode ID or
some other unique id? Or perhaps just postprocess the HTML output to add such
ids.

Nick

  reply	other threads:[~2010-11-14 20:56 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-11-13 23:24 How to distinguish timestamps in CSS? Sébastien Vauban
2010-11-14 20:40 ` Christian Moe
2010-11-14 20:56   ` Nick Dokos [this message]
2010-11-14 21:47     ` David Maus
2010-11-15 10:08       ` Sébastien Vauban

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=19521.1289768180@gamaville.dokosmarshall.org \
    --to=nicholas.dokos@hp.com \
    --cc=emacs-orgmode@gnu.org \
    --cc=mail@christianmoe.com \
    --cc=wxhgmqzgwmuf@spammotel.com \
    /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).