bug-texinfo
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

HTML processing inside CSS stylesheets?


From: Simon Josefsson
Subject: HTML processing inside CSS stylesheets?
Date: Sat, 10 Jan 2004 02:28:58 +0100
User-agent: Gnus/5.110002 (No Gnus v0.2) Emacs/21.3.50 (gnu/linux)

I'm experimenting with CSS's for the HTML output, and I have this in a
file gss.css that I use with --css-include=gss.css:

body { 
        margin: 2%;
        padding: 0 5%;
        background: #f2f2f9;
        }

h1,h2,h3,h4,h5 {
    padding: 0.5em 0 0 5%;
    font-family: Tahoma, Verdana, sans-serif;
...

The blank line is the important part.  Here's the generated gss.html:

<style type="text/css"><!--
  pre.display { font-family:inherit }
  pre.format  { font-family:inherit }
  pre.smalldisplay { font-family:inherit; font-size:smaller }
  pre.smallformat  { font-family:inherit; font-size:smaller }
  pre.smallexample { font-size:smaller }
  pre.smalllisp    { font-size:smaller }
  span.sc { font-variant:small-caps }
body {
        margin: 2%;
        padding: 0 5%;
        background: #f2f2f9;
        }

   <p>h1,h2,h3,h4,h5 {
    padding: 0.5em 0 0 5%;
    font-family: Tahoma, Verdana, sans-serif;
...

The added '<p>' confuses at least Mozilla, and I suspect it shouldn't
be present.

Btw, IMHO, the default HTML output is rather dull.  I cut'n'pasted a
few statements I found on the net into a ~25 lines .css, and the
differences are quite noticeable.  Compare:

http://josefsson.org/gss/manual/gss.html

with

http://josefsson.org/gss/manual/gss-css.html

Unfortunately, I can't really design web pages, so there is little
hope of me writing a good CSS file, so I'm not proposing a specific
CSS.  But I believe a valuable contribution to Texinfo would be an
improved default HTML CSS.  IMHO, the best improvement in my CSS is
the 5% margin.  Having the text somewhat centered in the browser
window, and the large margins, give (to me) a more professional,
book-like, look.  The boxes around <pre> blocks aren't bad either.

I also guess CSS's is a highly subjective matter.  Perhaps having a
repository of different Texinfo HTML CSS's could be a first step
towards making a choice in what the defaults should be.

Thanks,
Simon





reply via email to

[Prev in Thread] Current Thread [Next in Thread]