From mboxrd@z Thu Jan 1 00:00:00 1970 From: "Sebastien Vauban" Subject: Re: [patch] Don't output preamble DIV if its contents is empty Date: Sun, 09 Oct 2011 20:34:25 +0200 Message-ID: <80k48ej9ou.fsf@somewhere.org> References: <80lit75df7.fsf@somewhere.org> Mime-Version: 1.0 Content-Type: text/plain Return-path: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org-mXXj517/zsQ@public.gmane.org To: emacs-orgmode-mXXj517/zsQ@public.gmane.org Hi Carsten, Carsten Dominik wrote: >> To be sure that CSS rules don't apply to missing contents, there's no need >> to output DIV preamble opening and closing tags if there is nothing in >> between. > > are there adverse effects when an empty div is in the file? Yes, there are, reason for such patch. In some style I'm working on for the site I'm publishing, I'm using a quite large banner in black background as site's preamble. That works OK. But, even for exporting a single page (no publish, I mean, just `C-x C-e b'), I got this black background coming into play, while I had *no preamble set* for those orphan pages. Hence, the patch to remove such a preamble when it is essentially empty. Best regards, Seb -- Sebastien Vauban