Splits stylesheets that go beyond the IE limit of 4096 selectors. See this MSDN blog post for more information about this.
Use composer
The default max selectors is 4095.
$splitter = new \CssSplitter\Splitter();
$count = $splitter->countSelectors($css) - 4095;
if ($count > 0) {
$part = 2;
for($i = $count; $i > 0; $i -= 4095) {
file_put_contents("styles-split{$part}.css", $splitter->split($css, 2));
}
}
Original inspiration came from the Ruby gem CssSplitter.
Uses the MIT license.