[Seaside] Support for CSS?

Kamil Kukura kamk@volny.cz
Fri, 26 Apr 2002 06:58:32 +0200


Avi Bryant wrote:

>On Thu, 25 Apr 2002, Nevin Pratt wrote:
>
>  
>
>>I've tried the following embedded CSS code within the header area of an
>>html file (both with and without the quotes around the background image
>>URL), and it doesn't seem to be expanded by Seaside (I've set the
>>document root of the Seaside app to 'http://www.test.com').  Instead, it
>>seems to be treated as literal text, and thus the browser receives it
>>just like this, and of course can't make sense of the '@' in the URL.
>>
>>   <style type="text/css">
>>   <!--
>>   body {background-image: url(@images/background.jpg)}
>>   -->
>>   </style>
>>    
>>
>
>Ok, basic misunderstanding here.
>There is nothing special about the @ character *except* when it's in the
>attribute of a tag.  There is a direct macro expansion from
><foo someattr="@someid"> to <foo sea:id="someid">.
>In any other context, the @ symbol is, indeed, treated as literal text.
>  
>
Exactly. Instantly, I tried the following and it worked :)

   <style type="text/css">
   <!--
   body {background-image: url([session.application.documentRoot]/images/background.jpg)}
   -->
   </style>

-- 
Kamil