We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 76ecb53 commit c22e40aCopy full SHA for c22e40a
compressor/filters/cssmin.py
@@ -0,0 +1,15 @@
1
+from compressor.filters import FilterBase, FilterError
2
+
3
+class CSSMinFilter(FilterBase):
4
+ """
5
+ A filter that utilizes Zachary Voase's Python port of
6
+ the YUI CSS compression algorithm: http://pypi.python.org/pypi/cssmin/
7
8
+ def output(self, **kwargs):
9
+ try:
10
+ import cssmin
11
+ except ImportError, e:
12
+ if self.verbose:
13
+ raise FilterError('Failed to import cssmin: %s' % e)
14
+ return self.content
15
+ return cssmin.cssmin(self.content)
0 commit comments