Re: XHTML+CSS single-source (multi-channel)

On Monday 19 September 2005 08:40, David Woolley wrote:
> > Today there is clear support for media-specific markup (@media
> > screen, @media print) however I have not found in current CSS
> > features the ability to support multiple different types of screen
> > output or printed output (targets or channels).
>
> This is supported by HTML in the form of alternative style sheets. 
> As usual, the main problem is that the most popular browser (at least
> in a global context) doesn't support it, and that the selection needs
> to be made on a site by site, if not page by page basis.
>
> I'm not sure if the generic XML mechanisms support such a feature,
> but you are not using generic XML (and you've indicated no reason why
> you really need to use XML at all).

Yes, <?xml-stylesheet?> has the same features as HTML's <link>.

The CSS WG also decided to allow alternative style sheets to be declared 
in CSS itself, or at least to put that proposal in the next draft of 
"Cascading and Inheritance."

So instead of requiring multiple links of the form

    <link rel="alternate stylesheet" href="red.css" title="Extra red">
    <link rel="alternate stylesheet" href="r2.css" title="Technical">

a single link is enough and the other links are in CSS:

    @import url(red.css) "Extra red";
    @import url(r2.css) "Technical";

The @media rules would also get an optional title, so the alternatives 
can even be all in one file.



Bert
-- 
  Bert Bos                                ( W 3 C ) http://www.w3.org/
  http://www.w3.org/people/bos                               W3C/ERCIM
  bert@w3.org                             2004 Rt des Lucioles / BP 93
  +33 (0)4 92 38 76 92            06902 Sophia Antipolis Cedex, France

Received on Thursday, 22 September 2005 18:56:43 UTC