[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
@media in --css-include file
From: |
Dumas Patrice |
Subject: |
@media in --css-include file |
Date: |
Tue, 22 Jul 2003 12:13:29 +0200 |
User-agent: |
Mutt/1.4.1i |
Hi,
I found a potential bug in the handling of css with --css-include. There
is an @-directive, @media, which appears in the inline part of the css
file, like:
@media tv,screen {
h1 {text-align: center}
}
I think that the function process_css_file in makeinfo/html.c should be
changed a bit such that if a @media appears the state switches to
inline_state and the @media is put in inline_text.
A example of a problematic case badly handled could be something like
makeinfo called with --css-include file.css and the following file.css
/* file.css */
@import "truc.css";
@media tv,screen {
pre.display { font-family: Helvetica; font-size : larger }
}
In that case, makeinfo would include
/* file.css */
@import "truc.css";
@media tv,screen {
pre.display { font-family: Helvetica;
before the makeinfo specific css commands, and after these
font-size : larger }
}
A test confirms that:
style type="text/css"><!--
@import "truc.css";
@media tv,screen {
pre.display { font-family: Helvetica;
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 }
font-size : larger }
}
--></style>
Maybe I haven't understood the @media directive. My knowledge comes from
an O'Reilly book "HTML & XHTML: The Definitive Guide" (french edition).
Pat
- @media in --css-include file,
Dumas Patrice <=