Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stylesheet order and CSS caching support #6

Open
randomblast opened this issue Apr 1, 2011 · 0 comments
Open

Stylesheet order and CSS caching support #6

randomblast opened this issue Apr 1, 2011 · 0 comments

Comments

@randomblast
Copy link
Contributor

Hi,

I've been having issues with the order my generated files get inserted into $styles, as well as all the generated CSS disappearing when I enable CSS compression/aggregation in Drupal.

I think the best fix is to use the stylesheets[] array in the theme info to supply source files, and process them individually using hook_css_alter. Unfortunately that hook isn't available to theme engines, so you'd have to put a 1-liner in your theme's template.php to get that to work.

I can add the necessary functions if you'll accept a patch.

I'm suggesting adding _peroxide_process_sass()/_peroxide_process_less() functions, and a peroxide_css_alter() implementation which passes any file in stylesheets[] with a scss/sass/less extension to the appropriate function.

You'd just need to put in the theme's template.php
function THEME_css_alter(&$css) {peroxide_css_alter($css);}

Could maybe put it in oxygen's template.php as well, to keep it clean.

Caveat: this obviously only works on D7.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant