With assets cache enabled if you include more than one css in the page only one css is returned.
Example of this behaviour:
In _head.haml I have:
Both are compiled correctly in the tmp folder, but if I click on bootstrap.css link and on screen.css I get the same file content ( which is the content of the bootstrap.css file, as it comes before the other... )
I found a workaround:
To prevent this behaviour you must DISABLE assets.cache_enabled:
The caching system implemented in Wordless create a hash from the concatenation of all sass files found inside the theme/assets/stylesheet folder, so that if one of that files is changed ( regardless of what file it is ) the hash changes and the cache is rebuilt.
To overcome this problem the hash need to be unique for every root sass file, but this means that we must understand which partials are imported in the root sass file, creating the hash with only the content included in the root file.
Would it not be enough for the hash to be unique for each root sass file alone? It should be safe to assume that each root sass file is unique, even if they only contain @import statements. Changing any SASS file would start a recompile which is suboptimal but a lot less work and should fix this bug.
What I am proposing is that we maintain two hashes - a unique hash for each root SASS file, and a hash of all SASS files in the theme. The root hash is used to return the cached_file_path.
I'll work on a pull request.
Fix for issue #98 and #107. Includes fix for #99.
We can close this issue.