This sounds like a good use for a sass function.

http://groups.google.com/group/haml/msg/a61f09c16058bb38

You can define a function that will manipulate your filename at
generation time.

.foo
  :background-image= url(timestamped_file(/images/foo.gif))

You can then write a combination of capistrano and rake tasks to
update your sass scripts on demand like I've done:

http://gist.github.com/25265

The implementation of the function will likely be specific to your
environment (rails, merb, etc) but generally useful so please post it
back to this thread if you write it.

Hope that helps,
Chris

On Nov 12, 9:21 pm, "Ramon Tayag" <[EMAIL PROTECTED]> wrote:
> Please indulge me :) When is the sass regenerated?  When it's saved?
>
> Theoretically, is it possible to upload the sass on the server, then
> call a command which generates the css from the sass, because at least
> then it has time to look at all the image files and insert their
> timestamps in the css?
>
> This would also solve the problem of regenerating it everytime an
> image is changed - we make the deployer call the generate command
> (preferrably through capistrano after deploy callback).
>
> Ramon Tayag
>
> 2008/11/13 Nathan Weizenbaum <[EMAIL PROTECTED]>:
>
>
>
> > There are other issues, as well. If the stylesheet is guaranteed to have
> > the correct timestamps, it needs to be regenerated each time an image is
> > changed. This means that it needs to be fully parsed for every request
> > so that each image can be stat-ed, which is often not a fast task. Then
> > there's the issue of finding images in a reasonably general way... it's
> > just not practical.
>
>
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to