There is no license information available for the latest version (v2.0.0) of this package.

Minifies CSS requirements using Minify (

Installs: 104 141

Dependents: 1

Suggesters: 0

Security: 0

Stars: 27

Watchers: 4

Forks: 9

Open Issues: 4


v2.0.0 2017-08-14 22:32 UTC

This package is not auto-updated.

Last update: 2024-02-20 01:42:20 UTC


This module replaces part of the Requirements system to compress CSS files using The idea and implementation are basically stolen from Tonyair (


Nathan Cox (


SilverStripe 3.1+ Check out the SS-3.0 branch for a version compatible with SS 3.0

Installation Instructions

  1. Place the files in a directory called "minify" in the root of your SilverStripe installation
  2. Visit


The module will automatically replace the Requirements backend with a custom subclass, so you don't need to do anything differently.

Just use combine_files to include your CSS as normal:


$themeFolder = $this->ThemeDir();
$files = array(
	$themeFolder . '/css/layout.css',
	$themeFolder . '/css/typography.css',
	$themeFolder . '/css/form.css'

Requirements::combine_files("common.min.css", $files);

Your CSS files will automatically be minified when combining (like JavaScript is).

By default relative urls in the CSS files (eg background-image:url('../images/background.png');) will be rewritten so the combined CSS file can be kept in assets (eg to background-image:url('/themes/mytheme/images/background.png');) but you can turn this behaviour off by putting the following line in your _config.php:


Config::inst()->update('Minify_Requirements_Backend', 'rewrite_uris', false);

Known Issues

Issue Tracker


JSMin Minify