|
From: | Christian Moe |
Subject: | Re: [Orgmode] How to distinguish timestamps in CSS? |
Date: | Sun, 14 Nov 2010 21:40:25 +0100 |
User-agent: | Mozilla/5.0 (Macintosh; U; PPC Mac OS X 10.5; en-US; rv:1.9.2.12) Gecko/20101027 Thunderbird/3.1.6 |
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.
Yours, Christian
[Prev in Thread] | Current Thread | [Next in Thread] |