Ezequiel Schwartzman
2011-Aug-08 03:34 UTC
How do I select the include order of CSS/SASS files?
Hello, I''m tweaking around with SASS and I''m kind of stuck here. I did a /app/assets/stylesheets/reset.css.scss file, surprisingly it''s included automagically in all controllers. The problem is that it''s included after the layout CSS and before the controllers CSS, and I need it to be included after everything =/ How do I specify this? -- Posted via http://www.ruby-forum.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.
Chris Kottom
2011-Aug-08 08:06 UTC
Re: How do I select the include order of CSS/SASS files?
At the top of your app/assets/stylesheets/application.css file you should see something like this. /* * This is a manifest file that''ll automatically include all the stylesheets available in this directory * and any sub-directories. You''re free to add application-wide styles to this file and they''ll appear at * the top of the compiled file, but it''s generally better to create a new file per style scope. *= require_self *= require_tree . */ The two comments at the bottom tell Sprockets to build a compiled asset file using first the contents of this file and then the contents of every other file in this directory. If the import order matters to you, you''ll need to replace the require_tree directive with individual requests to require each file in the order you need. Ex: /* * This is a manifest file that''ll automatically include all the stylesheets available in this directory * and any sub-directories. You''re free to add application-wide styles to this file and they''ll appear at * the top of the compiled file, but it''s generally better to create a new file per style scope. *= require_self *= require reset *= require layout *= require fonts *= require ... */ On Mon, Aug 8, 2011 at 5:34 AM, Ezequiel Schwartzman <lists-fsXkhYbjdPsEEoCn2XhGlw@public.gmane.org>wrote:> Hello, I''m tweaking around with SASS and I''m kind of stuck here. > > I did a /app/assets/stylesheets/reset.css.scss file, surprisingly it''s > included automagically in all controllers. > > The problem is that it''s included after the layout CSS and before the > controllers CSS, and I need it to be included after everything =/ > > How do I specify this? > > -- > Posted via http://www.ruby-forum.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. > >-- 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.