lucasmazza/ruby-stylus — Issue #12: Include asset paths in .styl partials?
Author: RISCfuture
Created: 2011-11-05 02:34:38+00:00
State: open

I'm using Rails 3.1, and I've got some CSS files that each include a common partial. This common partial needs to reference image assets (using the `image_path` method, for instance). Is there a way to do this?

If I append `.erb` to my `_partial.styl` file, Stylus complains the partial cannot be found. If I instead name the file `_partial.styl.css.erb`, the `@import "_partial.css"` directive is treated as a CSS import and not a Stylus import. There doesn't seem to be any way to get asset filenames into a partial. :(