bug-texinfo
[Top][All Lists]
Advanced

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

a suggestion for css


From: Dumas Patrice
Subject: a suggestion for css
Date: Tue, 22 Jul 2003 12:56:49 +0200
User-agent: Mutt/1.4.1i

Hi,

I think there are 2 issues with the way css is handled. I assume makeinfo
is called with --css-file file.css and file.css looks like:

@import "imported_file.css";
file.css css rules...

In that case file.css rules have priority over the makeinfo css rules which
have priority over imported_file.css rules.

The first issue comes from the fact that file.css is inlined. Thus is not 
possible to change dynamically the css rule which have priority over makeinfo 
css rules by changing file.css: the manual has to be regenerated. 
And file.css has to be local to the computer at the time the manual is 
generated. I think that those features aren't practical
when there is a site-wide css style file. I think that, in that case, it 
would be handy if it was possible to @import 
"http://my.site.org/site_widestyle.css"; instead of having it inlined.

The second issue is that it is not possible to take the rules overriding 
makeinfo css rules from 2 different files, only from one.


I have a proposal which addresses these issues. I think that it shouldn't
replace of the existing scheme but be additionnal to it as there are
some drawbacks I list at the end in my proposal.

This scheme would involve 2 new command line switch, which can be repeated.
For example, they could be called --css-prepend and --css-append. In this 
scheme, makeinfo would also create a file called for example makeinfo.css 
with the makeinfo css rules within.

The url specified with --css-prepend would be imported before the makeinfo.css
file and the url specified by --css-append would be imported after the 
makeinfo.css file. For example

makefino --css-prepend "style_pre.css" --css-prepend "style_pre2.css" \
 --css-append "style_post.css" --css-append "style_post2.css"

would lead to 

@import "style_pre.css";
@import "style_pre2.css";
@import "makeinfo.css";
@import "style_post.css";
@import "style_post2.css";


This scheme responds to the critisisms I made to the existing scheme, however
it has some drawbacks:

* makeinfo has to create a additionnal file for the css rules
* the command line is a bit cluttered
* it isn't possible to centralize most of the stuff related with css in a file
(with the prepended @import in the beginning of the file and the appended 
rules after), things has to be on the command line.

Thus I think the 2 schemes could coexist if you think having 2 schemes doesn't
add too much complexity. 

Those scheme can easily coexist in the code, however they cannot really be used
at the same time. In case --css-file, and --css-prepend/--css-append are 
present, maybe all the import from --css-prepend/--css-append could take 
place before the rules from makeinfo and the css file are inlined, as it is
now. Of course in that case the --css-append files wouldn't be appended, but
there is no way to have both schemes used together. 

Alternatively, another way to handle both schemes would be to import 
--css-prepend files, then the makeinfo.css file, the --css-file and then the 
--css-append files. In that case the files imported in the --css-file 
wouldn't be imported before the makeinfo css rules.

Pat




reply via email to

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