Skip to content

Instantly share code, notes, and snippets.

@mariafromkorea
Last active August 29, 2015 14:06
Show Gist options
  • Select an option

  • Save mariafromkorea/85626c19508249ba3aea to your computer and use it in GitHub Desktop.

Select an option

Save mariafromkorea/85626c19508249ba3aea to your computer and use it in GitHub Desktop.
=====================================================
Remove Old IE Splitter & Implement AdvAgg CSS Spliter
=====================================================
#There are 2 different legacy CSS splitters that may be on your site and need to be removed before implementing the new AdvAgg module.
-If your split stylesheets are named in the format of vrweb_foundation_2.css, vrweb_foundation_3.cs (etc.) the configuration for the splitter is in /sites/all/themes/custom/vrweb_foundation/config.rb
Open this file and remove lines #6-#66 and #95-#97.
-If your split stylesheets are named in the format of vrweb_foundation_ie.css, vrweb_foudation_ie-blessed1.css (etc.), the configuration for the splitter are in Gruntfile.js and package.json under /sites/all/themes/custom/vrweb_foundation/
Open Gruntfile.js and remove the Grunt task for 'bless' on lines #75-#85, and from the task lists on lines #105 and #120. Open package.json and remove 'grunt-bless' from the devDependencies. You will likely need to quit and restart terminal to make it run the gruntfile without bless.
----------------------------------------------------
#Now that the old css splitters are removed:
-Delete the extraneous css files from /sites/all/themes/custom/vrweb_foundation/css/
-Remove the links to these old css files, starting on line #22/23 in template.php
-Run a test compile and make sure you are only getting vrweb_foundation.css
----------------------------------------------------
#Double check that AdvAgg is not already installed by searching 'Adv'-- it has been installed on every site of mine so far....
-If it is already installed, enable 'Advanced CSS/JS Aggregation' and run $drush up advagg-7.x-2.x-dev to get the correct version
-If it is not, you can download it here: https://www.drupal.org/project/advagg, then enable Advanced CSS/JS Aggregation
-Once enable, click configure, and check the following options:
Global Options:
+ Enable Advanced Configuration
+ Create .gz files
AdvAgg Cache Settings
+ Normal ~ 10ms
CSS Options
+ Prevent more than [3000] selectors in an aggregated CSS file. (Note: Although IE should technically be able to read 4095 selectors, media queries can throw this off. Set to 3000 per Colin to be safe)
+ Fix Improperly Set Type
JS Options
+ Fix Impoperly Set Type
#In order for this to work CSS aggregation must be turned on in the Development settings...so you may want to turn it on and test, then turn it off depending on what you're working on. If you have questions, please see Colin or Maria
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment