Hi! We make Facebook-Apps. We need something to parse css-Files. The matter on Facebook-Apps is, that they want full paths for images. So we have to use image_path as css attribute. For the moment I put relevant selectors in the application.fbml.erb in an <style> tag. But thats not an option i like. Before i hack something by myself i want to ask if there is some kind of solution for this. -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
I''m not quite sure what you are trying to do, but there''s no reason not to create a foo.css.erb file with an action that renders it and have it parse the file. If you only change it on deployment you can also cache the action (so it generates a static file on the first call and Apache serves that). You could also do this with Rails Metal if you want it dynamically generated but not going through the whole Rails stack. Finally, you could look in to Sass... Cheers, Andy -- Andy Jeffries http://andyjeffries.co.uk/ #rubyonrails #mysql #jquery Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS Company number: 5452840 On 24 February 2010 23:00, kb <bannii-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi! > > We make Facebook-Apps. > We need something to parse css-Files. The matter on Facebook-Apps is, > that they want full paths for images. So we have to use image_path as > css attribute. > > For the moment I put relevant selectors in the application.fbml.erb in > an <style> tag. But thats not an option i like. > > Before i hack something by myself i want to ask if there is some kind > of solution for this. > > -- > You received this message because you are subscribed to the Google Groups > "Ruby on Rails: Talk" group. > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To unsubscribe from this group, send email to > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > . > For more options, visit this group at > http://groups.google.com/group/rubyonrails-talk?hl=en. > >-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
Hey, thanks for your support. What I want to do, are statements like: div#main-start {width:738px;background-image: url(<%= image_path "bg- all-start.jpg" %>);background-repeat: no-repeat;background- color:#ecac99;height:700px;display: block;position:relative;} in a separate css-file rather than displaying it in an <style>tag. I think I try to render it through a controller but I wish there were a better and cleaner possibility. Regards, kb On 25 Feb., 12:05, Andy Jeffries <andyjeffr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m not quite sure what you are trying to do, but there''s no reason not to > create a foo.css.erb file with an action that renders it and have it parse > the file. > > If you only change it on deployment you can also cache the action (so it > generates a static file on the first call and Apache serves that). > > You could also do this with Rails Metal if you want it dynamically generated > but not going through the whole Rails stack. > > Finally, you could look in to Sass... > > Cheers, > > Andy > > -- > Andy Jeffrieshttp://andyjeffries.co.uk/ #rubyonrails #mysql #jquery > Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS > Company number: 5452840 > > On 24 February 2010 23:00, kb <ban...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi! > > > We make Facebook-Apps. > > We need something to parse css-Files. The matter on Facebook-Apps is, > > that they want full paths for images. So we have to use image_path as > > css attribute. > > > For the moment I put relevant selectors in the application.fbml.erb in > > an <style> tag. But thats not an option i like. > > > Before i hack something by myself i want to ask if there is some kind > > of solution for this. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
On 25 February 2010 12:27, kb <bannii-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> What I want to do, are statements like: > div#main-start {width:738px;background-image: url(<%= image_path "bg- > all-start.jpg" %>);background-repeat: no-repeat;background- > color:#ecac99;height:700px;display: block;position:relative;} > in a separate css-file rather than displaying it in an <style>tag.Like Andy says, check out Sass (http://sass-lang.com/) -- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
If i make it so, I have a problem. It includes just the http://path.css but without ?timestamp. I have made it now like: <%= stylesheet_link_tag stylesheet_url(:canvas => false, :what => Time.new.to_s) %> But thats a request every time and not really a cache. On 25 Feb., 12:05, Andy Jeffries <andyjeffr...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''m not quite sure what you are trying to do, but there''s no reason not to > create a foo.css.erb file with an action that renders it and have it parse > the file. > > If you only change it on deployment you can also cache the action (so it > generates a static file on the first call and Apache serves that). > > You could also do this with Rails Metal if you want it dynamically generated > but not going through the whole Rails stack. > > Finally, you could look in to Sass... > > Cheers, > > Andy > > -- > Andy Jeffrieshttp://andyjeffries.co.uk/ #rubyonrails #mysql #jquery > Registered address: 64 Sish Lane, Stevenage, Herts, SG1 3LS > Company number: 5452840 > > On 24 February 2010 23:00, kb <ban...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > Hi! > > > We make Facebook-Apps. > > We need something to parse css-Files. The matter on Facebook-Apps is, > > that they want full paths for images. So we have to use image_path as > > css attribute. > > > For the moment I put relevant selectors in the application.fbml.erb in > > an <style> tag. But thats not an option i like. > > > Before i hack something by myself i want to ask if there is some kind > > of solution for this. > > > -- > > You received this message because you are subscribed to the Google Groups > > "Ruby on Rails: Talk" group. > > To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > > To unsubscribe from this group, send email to > > rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org<rubyonrails-talk%2Bunsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> > > . > > For more options, visit this group at > >http://groups.google.com/group/rubyonrails-talk?hl=en.-- You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group. To post to this group, send email to rubyonrails-talk-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.