This should maybe be a documentation request, or a bug report, not sure how to categorize it because I don't know if it is working as designed and I just missed something in a README file.
LESS won't process and render properly unless the theme is set to: "Peace! the css isnt touched, just as Drupal wants it to be ..."
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | fix-css-alter-hook-1136678-1.patch | 882 bytes | rwohleb |
Comments
Comment #1
rwohlebThe issue here is that drupal_add_css() is being used inside hook_css_alter(). This hook gets an array of CSS files that could have already been sent through this hook in other modules. In this case it's LESS. By using drupal_add_css() and having no way to pass the CSS array, it ends up getting reset to what it's in the static cache handled by the drupal_static() function. I've updated the issue title to reflect this.
I see two options. We can either stop using drupal_add_css() inside this hook, or we temporarily change the static cache while we are in this hook. I'm attaching a patch that does the latter. While I don't like the idea of messing with the static cache like this, it's better than doing something like making a virtual copy of the drupal_add_css() function for our own use.
Comment #2
rwohlebSetting this to 'bug report'.
Comment #3
mortendk commentedcan you test it with the latest copy the css file removal code has been rewritten.
btw why dont you use a precompiler like less app / codekit etc ?
Comment #4
mortendk commented