[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: makeinfo and CSS
From: |
bronger |
Subject: |
Re: makeinfo and CSS |
Date: |
Mon, 12 May 2003 19:45:37 +0200 |
User-agent: |
Gnus/5.090015 (Oort Gnus v0.15) Emacs/21.2 |
Halloechen!
address@hidden (Karl Berry) writes:
> [...]
>
> I just implemented --css-include in this way. Thanks for all the
> information. The patch probably won't apply as-is to the 4.5 sources,
> so I won't bother including it here. I plan to make another pretest
> shortly. Torsten, if you'd like to be on texinfo-pretest list where
> pretests are announced/discussed, just let me know.
>
> Meanwhile, here is the new section I wrote in the manual about it.
> Please tell me if I said anything wrong or stupid :).
>
> [...]
>
> As far as @command{makeinfo} is concerned, the crucial character is
> the semicolon terminating the declaration. When reading the CSS file,
> it considers everything between an @samp{@@} and a @samp{;} to be an
> @samp{@@import}, [...]
I didn't see the source, but this can also be a @page, @media, etc
rule.
I forgot to tell you something (because I didn't know this myself
until today): There is also a @charset rule. And while the CSS spec
says that @import must be the very first rule set, @charset must be
the very very first rule, if present. (Strange spec if you ask me.)
Just so first that it is "not preceded by any characters".
The clean solution would be rather tricky: In the general case the
document and the CSS file don't use the same coding. Then the
coding of the CSS file must be translated to the document encoding
before inserting the CSS fragment. utf-8, utf-16, iso-8859-x, etc
are possible. You may leave it as a known problem, because it is
very rarely necessary since CSS code contains non-ASCII characters
only in non-English generated contents like
P.introduction:before { content: "Einführung: " }
And even then it only fails if the encodings are different.
Although Mozilla implements this fully, perhaps a good compromise is
simply to remove a @charset rule and print a warning.
(@charset is mentioned in section 4.4 in the CSS specification.)
Tschoe,
Torsten.