Hi,
I'm using context-add-assets in conjunction with the Drupal Sassy module. This means that my theme's CSS files have the extension .scss (.sass is also supported) - and therefore don't show up (and are not supported) in the 'CSS from Themes' Context UI reactions.
I made a couple of tweaks to make this work. Below are updates to two files in the context_addassets/plugins directory. I'm using the 7.x-1.0-beta1 build. I'm not sure if similar changes are needed in context_reaction_addcss_module.inc, and context_reaction_addcss_path.inc - I've not tested these. Hopefully somebody will find these tweaks useful, or can suggest a better workaround!
context_reaction_addassets_base.inc:
/*
* File: plugins/context_reaction_addassets_base.inc
* Line: 109
*/
case 'css':
case 'scss': case 'sass': /* add scss and sass as supported extensions */
drupal_add_css($path, array('group' => CSS_THEME));
context_reaction_addcss.inc:
/*
* File: plugins/context_reaction_addcss.inc
* Line: 23
*/
$this->search_type = 'css|sass|scss'; /* add .scss and .sass to the search filter */
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | context_addassets-sass-1438952-2.patch | 1.38 KB | retrodans |
Comments
Comment #1
ryanwebpage commentedI know this is trivial to implement. It's that free time has been quite an issue for myself and electblake. I would like to implement this as soon as possible. Look for an update this weekend with some small update likes this and the patch written here http://drupal.org/node/1232330
Comment #2
retrodans commentedGreat fix, saved me a lot of work, I put the above code into a patch file, and added less to the list, as we are using that on our site.
Patch attached.
Dan
Comment #3
longwaveComment #4
damienmckennaOut of interest, are there any hooks available that might possibly be used to trigger a Compass regeneration of the SASS rather than using Sassy?
Comment #5
chrisjlee commentedCommitted
Comment #6.0
(not verified) commentedclarification of where the issue occurs