You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@lenya.apache.org by Peter Shipley <ps...@nomensa.com> on 2004/05/18 21:40:43 UTC

@import stylesheets

Anyone know how I might use the following for a template:

<style type="text/css" media="screen">
	    @import url({$root}/style.css);
</style>
<link rel="stylesheet" type="text/css" media="print" 
href="{$root}/print.css"/>

The problem is the @import rule doesn't get the "root" parameter 
expanded into /lenya/default/... whilst the <link> tag does indeed work 
as expected.

Unless I am doing this incorrectly anyone got any ideas ?
@import rule is quite important so I can't settle for:

<link rel="stylesheet" type="text/css" media="screen" 
href="{$root}/style.css"/>

say.

Regards

Pete


---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: @import stylesheets

Posted by Peter Shipley <ps...@nomensa.com>.
I should have known better. Thought I tried it but obviously made a 
mistake. Thanks very much.

Brian Maddy wrote:

> If the following works, it was because the curly brackets are only 
> usable inside xml tags, not normal text.
> 
> <style type="text/css" media="screen">
>         @import url(<xsl:value-of select="$root"/>/style.css);
> </style>
> 
> If that doesn't work, I'm not sure.  :)  Good luck!
> 
> Brian
> brian@brianmaddy.com
> 
> 
> Peter Shipley wrote:
> 
>> Anyone know how I might use the following for a template:
>>
>> <style type="text/css" media="screen">
>>         @import url({$root}/style.css);
>> </style>
>> <link rel="stylesheet" type="text/css" media="print" 
>> href="{$root}/print.css"/>
>>
>> The problem is the @import rule doesn't get the "root" parameter 
>> expanded into /lenya/default/... whilst the <link> tag does indeed 
>> work as expected.
>>
>> Unless I am doing this incorrectly anyone got any ideas ?
>> @import rule is quite important so I can't settle for:
>>
>> <link rel="stylesheet" type="text/css" media="screen" 
>> href="{$root}/style.css"/>



---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org


Re: @import stylesheets

Posted by Brian Maddy <br...@brianmaddy.com>.
If the following works, it was because the curly brackets are only 
usable inside xml tags, not normal text.

<style type="text/css" media="screen">
         @import url(<xsl:value-of select="$root"/>/style.css);
</style>

If that doesn't work, I'm not sure.  :)  Good luck!

Brian
brian@brianmaddy.com


Peter Shipley wrote:

> Anyone know how I might use the following for a template:
> 
> <style type="text/css" media="screen">
>         @import url({$root}/style.css);
> </style>
> <link rel="stylesheet" type="text/css" media="print" 
> href="{$root}/print.css"/>
> 
> The problem is the @import rule doesn't get the "root" parameter 
> expanded into /lenya/default/... whilst the <link> tag does indeed work 
> as expected.
> 
> Unless I am doing this incorrectly anyone got any ideas ?
> @import rule is quite important so I can't settle for:
> 
> <link rel="stylesheet" type="text/css" media="screen" 
> href="{$root}/style.css"/>
> 
> say.
> 
> Regards
> 
> Pete
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
> For additional commands, e-mail: lenya-user-help@cocoon.apache.org
> 

---------------------------------------------------------------------
To unsubscribe, e-mail: lenya-user-unsubscribe@cocoon.apache.org
For additional commands, e-mail: lenya-user-help@cocoon.apache.org