forrest-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thorsten Scherler <>
Subject Re: [SKIN] css-style
Date Mon, 05 Jul 2004 11:42:06 GMT
Nicola Ken Barozzi wrote:

> Very well done! :-)

Cheers :).

> ...
>> Next todos:
>> - introduce the color profiles feature
>> This can be tricky, because right now the screen css infos are stored 
>> in  screen.css. I just know how to make the profile working 
>> (forrest.css.xslt) for the page.css. Saying this I would just copy 
>> the screen.css to page.css and add the feature. Maybe somebody can 
>> tell me how to edit the screen.css directly with the forrest.css.xslt 
>> instead.
> Sorry, I'm in difficulty to help you, I'm not sure I understand.
> In any case, you can write _any_ css file in two ways:
>  - mycss.css
>  - mycss.css.xslt

That is exactly what I was planing to do!


...but I am not sure why it is not working the following way:

First I copied the skinconf.xsl from the krysalis-site skin to the 
css-style-dev skin. Then I created a screen.css.xslt:
<?xml version="1.0"?>
<xsl:stylesheet version="1.0" 
  <xsl:import href="../../common/css/forrest.css.xslt"/>
  <!-- This is not used by Forrest but makes it possible to debug the
       stylesheet in standalone editors -->
  <xsl:output method = "text"  omit-xml-declaration="yes"  />
<!-- ==================== main block colors ============================ -->

<xsl:template match="color[@name='header']">
    #top {    background: <xsl:value-of select="@value"/>;}

Then I used in skinconf.xml:
 <color name="header"    value="#000000"/>

...but unlike the forrest.css.xslt (in the krysalis-site skin) which 
will set the header in {build}/site/skin/forrest.css to black. The 
screen.css.xslt are not setting any value in {build}/site/skin/screen.css!

Then I noticed that there where no forrest.css in the krysalis-site skin.

So I renamed the screen.css.xslt to test.css.xslt (and did *not* provide 
a test.css) and called it before the screen.css like
        <link rel="stylesheet" href="{$root}skin/test.css" 
type="text/css" />
        <link rel="stylesheet" href="{$root}skin/screen.css" 
type="text/css" media="screen" />

...and the header was black :).

To make sure that is had nothing to do with the order I just switched:
        <link rel="stylesheet" href="{$root}skin/screen.css" 
type="text/css" media="screen" />
        <link rel="stylesheet" href="{$root}skin/test.css" 
type="text/css" />

...and the header still was black :).

Then I did the ultimate test and added a test.css to 
...and /suprise/ the header was *NOT* black.

Then I removed the test.css and the header was black again.

The color-profiles work only if you use a profile.css.xslt *without* a 
profile.css within .../skins/css-style-dev/css.
e.g. if you have
- profile.css.xslt and
- profile.css

The profile.css will be parsed without transforming the 
profile.css.xslt. This way the color-profiles are *not* working for the 
static site.

If you use *only* the profile.css.xslt within 
.../skins/css-style-dev/css and add
<link rel="stylesheet" href="{$root}skin/profile.css" type="text/css" /> 
to the site2xhtml.xslt the profile is working.

HTH someone that is trying to enable in his/her skin the color-profile ;-).

King regards

Thorsten Scherler

Departamento de Desarrollo de Proyectos
Sociedad Andaluza para el Desarrollo de la Sociedad de la InformaciĆ³n S.A.U.

View raw message