In my stylesheets directory I have application.css
, ie_fixes.css
, and a themes
directory. The themes directory has about twenty css files in it. All of these stylesheets, minus the ie_fixes, are needed application wide, hence they are included in the application layout. The ie_fixes.css only needs to be included when the user's browser is IE. I would like to be able to include everything in the themes folder in a single, concise line of code.
Rails provides an easy way to include all stylesheets by doing this:
stylesheet_link_tag :all, :recursive => true
Fancy, but the problem with this is it includes my ie_fixes.css
in every browser, blowing my IE conditional comments out of the water. So my question is, is there an easy way to include all stylesheets for a subdirectory without having to specify each file name?
I've tried different variations of stylesheet_link_tag 'themes/', :recursive => true
to no avail. It seems all this method does is prepend the stylehseet directory and append .css if necessary.