Last active
August 29, 2015 13:57
-
-
Save therebelrobot/9554995 to your computer and use it in GitHub Desktop.
How to install compass code to split style sheets for IE selector limit
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from http://stackoverflow.com/questions/12204900/how-to-install-compass-code-to-split-style-sheets-for-ie-selector-limit | |
Create css_spliter.rb file (https://gist.github.com/therebelrobot/9554968) beside your config.rb file, at the root of your sass project. | |
Add the following line at the beginning of your config.rb file | |
require 'css_splitter' | |
And add the 3 following lines at the end (of config.rb) | |
on_stylesheet_saved do |path| | |
CssSplitter.split(path) unless path[/\d+$/] | |
end | |
Then run compass compile as you usually do. You won't see the files *myFile_2.css*, *myFile_3.css*, ... appear in the logs but they are well created in your css folder. Also the command compass clean won't remove them, you'll have to dele[te] them manually from your css/ folder. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment